]> git.saurik.com Git - apple/libc.git/blame_incremental - Makefile.nbsd_end
Libc-583.tar.gz
[apple/libc.git] / Makefile.nbsd_end
... / ...
CommitLineData
1# For the NetBSD auto patching mechanism and compatibility environment
2# setup, original NetBSD sources a put into a NetBSD 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 NBSDMDSRCS, NBSDMISRCS, NBSDORIGHDRS and NBSDSRCS variables must be set,
7# and bracketed by .include of Makefile.nbsd_begin and Makefile.nbsd_end
8#
9# Set up dependencies between the NetBSD source (in a NetBSD subdirectory)
10# and a file with a -nbsd.x suffix (where x is 'c' or 's'). The suffix
11# rules will then compile the file with the simulate NetBSD environment.
12
13NBSDSECTIONS= 1 2 3 4 5 6 7 8 9
14
15# This .for statement forces evaluation of ${CWD}
16.for _cwd in ${CWD}
17
18.for _src in ${NBSDSRCS}
19.ifmake autopatch
20${_cwd}/${_src:R}-nbsd.${_src:E}: ${_cwd}/NetBSD/${_src} _AUTOPATCH
21AUTOPATCHSRCS+= ${_cwd}/${_src:R}-nbsd.${_src:E}
22.else # !autopatch
23SRCS+= ${_src}
24.endif # autopatch
25.endfor
26
27.for _src in ${NBSDMDSRCS}
28.ifmake autopatch
29${_cwd}/${_src:R}-nbsd.${_src:E}: ${_cwd}/NetBSD/${_src} _AUTOPATCH
30AUTOPATCHSRCS+= ${_cwd}/${_src:R}-nbsd.${_src:E}
31.else # !autopatch
32MDSRCS+= ${_src}
33.endif # autopatch
34.endfor
35
36.for _src in ${NBSDMISRCS}
37.ifmake autopatch
38${_cwd}/${_src:R}-nbsd.${_src:E}: ${_cwd}/NetBSD/${_src} _AUTOPATCH
39AUTOPATCHSRCS+= ${_cwd}/${_src:R}-nbsd.${_src:E}
40.else # !autopatch
41MISRCS+= ${_src}
42.endif # autopatch
43.endfor
44
45.ifmake autopatch
46.for _src in ${NBSDHDRS}
47${_cwd}/${_src}: ${_cwd}/NetBSD/${_src} _AUTOPATCH
48AUTOPATCHHDRS+= ${_cwd}/${_src}
49.endfor
50.endif # autopatch
51
52.for _sect in ${NBSDSECTIONS}
53.for _src in ${NBSDMAN${_sect}}
54.ifmake autopatch
55${_cwd}/${_src}: ${_cwd}/NetBSD/${_src} _AUTOPATCH
56AUTOPATCHMAN+= ${_cwd}/${_src}
57.else # !autopatch
58MAN${_sect}+= ${_src}
59.endif # autopatch
60.endfor
61.endfor
62
63.endfor # _cwd