]>
Commit | Line | Data |
---|---|---|
9385eb3d A |
1 | # For the FreeBSD auto patching mechanism and compatibility environment |
2 | # setup, original FreeBSD sources a put into a FreeBSD subdirectory. | |
3 | # If a file with the same name, but suffix ".patch" is in that directory, | |
4 | # that patch will be applied before use. | |
5 | # | |
6 | # The FBSDMDSRCS, FBSDMISRCS, FBSDORIGHDRS and FBSDSRCS variables must be set, | |
7 | # and bracketed by .include of Makefile.fbsd_begin and Makefile.fbsd_end | |
8 | # | |
9 | # Set up dependencies between the FreeBSD source (in a FreeBSD subdirectory) | |
10 | # and a file with a -fbsd.x suffix (where x is 'c' or 's'). The suffix | |
11 | # rules will then compile the file with the simulate FreeBSD environment. | |
12 | ||
13 | FBSDSECTIONS= 1 2 3 4 5 6 7 8 9 | |
14 | ||
9385eb3d | 15 | .for _src in ${FBSDSRCS} |
59e0d9fe | 16 | ${SYMROOT}/${_src:R}-fbsd.${_src:E}: FreeBSD/${_src} _AUTOPATCHSYM |
9385eb3d | 17 | SRCS+= ${_src} |
59e0d9fe | 18 | AUTOPATCHSRCS+= ${SYMROOT}/${_src:R}-fbsd.${_src:E} |
9385eb3d A |
19 | .endfor |
20 | ||
21 | .for _src in ${FBSDMDSRCS} | |
59e0d9fe | 22 | ${SYMROOT}/${_src:R}-fbsd.${_src:E}: FreeBSD/${_src} _AUTOPATCHSYM |
9385eb3d | 23 | MDSRCS+= ${_src} |
59e0d9fe | 24 | AUTOPATCHSRCS+= ${SYMROOT}/${_src:R}-fbsd.${_src:E} |
9385eb3d A |
25 | .endfor |
26 | ||
27 | .for _src in ${FBSDMISRCS} | |
59e0d9fe | 28 | ${SYMROOT}/${_src:R}-fbsd.${_src:E}: FreeBSD/${_src} _AUTOPATCHSYM |
9385eb3d | 29 | MISRCS+= ${_src} |
59e0d9fe | 30 | AUTOPATCHSRCS+= ${SYMROOT}/${_src:R}-fbsd.${_src:E} |
9385eb3d A |
31 | .endfor |
32 | ||
59e0d9fe A |
33 | .for _src in ${FBSDHDRS} |
34 | ${SYMROOT}/${_src}: FreeBSD/${_src} _AUTOPATCHSYM | |
35 | AUTOPATCHHDRS+= ${SYMROOT}/${_src} | |
9385eb3d A |
36 | .endfor |
37 | ||
38 | .for _sect in ${FBSDSECTIONS} | |
39 | .for _src in ${FBSDMAN${_sect}} | |
59e0d9fe | 40 | ${_src}: FreeBSD/${_src} _AUTOPATCH |
9385eb3d | 41 | MAN${_sect}+= ${_src} |
59e0d9fe | 42 | AUTOPATCHMAN+= ${_src} |
9385eb3d A |
43 | .endfor |
44 | .endfor |