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