]> git.saurik.com Git - apple/libc.git/blob - Makefile.nbsd_end
Libc-498.tar.gz
[apple/libc.git] / Makefile.nbsd_end
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
13 NBSDSECTIONS= 1 2 3 4 5 6 7 8 9
14
15 .for _src in ${NBSDSRCS}
16 .ifmake autopatch
17 ${_src:R}-nbsd.${_src:E}: NetBSD/${_src} _AUTOPATCHCUR
18 AUTOPATCHSRCS+= ${_src:R}-nbsd.${_src:E}
19 .else # !autopatch
20 SRCS+= ${_src}
21 .endif # autopatch
22 .endfor
23
24 .for _src in ${NBSDMDSRCS}
25 .ifmake autopatch
26 ${_src:R}-nbsd.${_src:E}: NetBSD/${_src} _AUTOPATCHCUR
27 AUTOPATCHSRCS+= ${_src:R}-nbsd.${_src:E}
28 .else # !autopatch
29 MDSRCS+= ${_src}
30 .endif # autopatch
31 .endfor
32
33 .for _src in ${NBSDMISRCS}
34 .ifmake autopatch
35 ${_src:R}-nbsd.${_src:E}: NetBSD/${_src} _AUTOPATCHCUR
36 AUTOPATCHSRCS+= ${_src:R}-nbsd.${_src:E}
37 .else # !autopatch
38 MISRCS+= ${_src}
39 .endif # autopatch
40 .endfor
41
42 .ifmake autopatch
43 .for _src in ${NBSDHDRS}
44 ${_src}: NetBSD/${_src} _AUTOPATCHCUR
45 AUTOPATCHHDRS+= ${_src}
46 .endfor
47 .endif # autopatch
48
49 .for _sect in ${NBSDSECTIONS}
50 .for _src in ${NBSDMAN${_sect}}
51 .ifmake autopatch
52 ${_src}: NetBSD/${_src} _AUTOPATCH
53 AUTOPATCHMAN+= ${_src}
54 .else # !autopatch
55 MAN${_sect}+= ${_src}
56 .endif # autopatch
57 .endfor
58 .endfor