]>
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} |
224c7076 A |
16 | .ifmake autopatch |
17 | ${_src:R}-fbsd.${_src:E}: FreeBSD/${_src} _AUTOPATCHCUR | |
18 | AUTOPATCHSRCS+= ${_src:R}-fbsd.${_src:E} | |
19 | .else # !autopatch | |
9385eb3d | 20 | SRCS+= ${_src} |
224c7076 | 21 | .endif # autopatch |
9385eb3d A |
22 | .endfor |
23 | ||
24 | .for _src in ${FBSDMDSRCS} | |
224c7076 A |
25 | .ifmake autopatch |
26 | ${_src:R}-fbsd.${_src:E}: FreeBSD/${_src} _AUTOPATCHCUR | |
27 | AUTOPATCHSRCS+= ${_src:R}-fbsd.${_src:E} | |
28 | .else # !autopatch | |
9385eb3d | 29 | MDSRCS+= ${_src} |
224c7076 | 30 | .endif # autopatch |
9385eb3d A |
31 | .endfor |
32 | ||
33 | .for _src in ${FBSDMISRCS} | |
224c7076 A |
34 | .ifmake autopatch |
35 | ${_src:R}-fbsd.${_src:E}: FreeBSD/${_src} _AUTOPATCHCUR | |
36 | AUTOPATCHSRCS+= ${_src:R}-fbsd.${_src:E} | |
37 | .else # !autopatch | |
9385eb3d | 38 | MISRCS+= ${_src} |
224c7076 | 39 | .endif # autopatch |
9385eb3d A |
40 | .endfor |
41 | ||
224c7076 A |
42 | # FBSDPATCHSRCS are for source that need patching, but don't build |
43 | # in base variant (only in other variants) | |
44 | .ifmake autopatch | |
45 | .for _src in ${FBSDPATCHSRCS} | |
46 | ${_src:R}-fbsd.${_src:E}: FreeBSD/${_src} _AUTOPATCHCUR | |
47 | AUTOPATCHSRCS+= ${_src:R}-fbsd.${_src:E} | |
48 | .endfor | |
49 | .endif # autopatch | |
50 | ||
51 | .ifmake autopatch | |
59e0d9fe | 52 | .for _src in ${FBSDHDRS} |
224c7076 A |
53 | ${_src}: FreeBSD/${_src} _AUTOPATCHCUR |
54 | AUTOPATCHHDRS+= ${_src} | |
9385eb3d | 55 | .endfor |
224c7076 | 56 | .endif # autopatch |
9385eb3d A |
57 | |
58 | .for _sect in ${FBSDSECTIONS} | |
59 | .for _src in ${FBSDMAN${_sect}} | |
224c7076 | 60 | .ifmake autopatch |
59e0d9fe | 61 | ${_src}: FreeBSD/${_src} _AUTOPATCH |
59e0d9fe | 62 | AUTOPATCHMAN+= ${_src} |
224c7076 A |
63 | .else # !autopatch |
64 | MAN${_sect}+= ${_src} | |
65 | .endif # autopatch | |
9385eb3d A |
66 | .endfor |
67 | .endfor |