X-Git-Url: https://git.saurik.com/apple/libc.git/blobdiff_plain/3d9156a7a519a5e3aa1b92e9d9d4b991f1aed7ff..51282358e8fdbfc483c0c34e7eae9b89b51f2570:/Makefile.obsd_end diff --git a/Makefile.obsd_end b/Makefile.obsd_end index 661dcc8..9b3ef1a 100644 --- a/Makefile.obsd_end +++ b/Makefile.obsd_end @@ -12,33 +12,52 @@ OBSDSECTIONS= 1 2 3 4 5 6 7 8 9 +# This .for statement forces evaluation of ${CWD} +.for _cwd in ${CWD} + .for _src in ${OBSDSRCS} -${SYMROOT}/${_src:R}-obsd.${_src:E}: OpenBSD/${_src} _AUTOPATCHSYM +.ifmake autopatch +${_cwd}/${_src:R}-obsd.${_src:E}: ${_cwd}/OpenBSD/${_src} _AUTOPATCH +AUTOPATCHSRCS+= ${_cwd}/${_src:R}-obsd.${_src:E} +.else # !autopatch SRCS+= ${_src} -AUTOPATCHSRCS+= ${SYMROOT}/${_src:R}-obsd.${_src:E} +.endif # autopatch .endfor .for _src in ${OBSDMDSRCS} -${SYMROOT}/${_src:R}-obsd.${_src:E}: OpenBSD/${_src} _AUTOPATCHSYM +.ifmake autopatch +${_cwd}/${_src:R}-obsd.${_src:E}: ${_cwd}/OpenBSD/${_src} _AUTOPATCH +AUTOPATCHSRCS+= ${_cwd}/${_src:R}-obsd.${_src:E} +.else # !autopatch MDSRCS+= ${_src} -AUTOPATCHSRCS+= ${SYMROOT}/${_src:R}-obsd.${_src:E} +.endif # autopatch .endfor .for _src in ${OBSDMISRCS} -${SYMROOT}/${_src:R}-obsd.${_src:E}: OpenBSD/${_src} _AUTOPATCHSYM +.ifmake autopatch +${_cwd}/${_src:R}-obsd.${_src:E}: ${_cwd}/OpenBSD/${_src} _AUTOPATCH +AUTOPATCHSRCS+= ${_cwd}/${_src:R}-obsd.${_src:E} +.else # !autopatch MISRCS+= ${_src} -AUTOPATCHSRCS+= ${SYMROOT}/${_src:R}-obsd.${_src:E} +.endif # autopatch .endfor +.ifmake autopatch .for _src in ${OBSDHDRS} -${SYMROOT}/${_src}: OpenBSD/${_src} _AUTOPATCHSYM -AUTOPATCHHDRS+= ${SYMROOT}/${_src} +${_cwd}/${_src}: ${_cwd}/OpenBSD/${_src} _AUTOPATCH +AUTOPATCHHDRS+= ${_cwd}/${_src} .endfor +.endif # autopatch .for _sect in ${OBSDSECTIONS} .for _src in ${OBSDMAN${_sect}} -${_src}: OpenBSD/${_src} _AUTOPATCH +.ifmake autopatch +${_cwd}/${_src}: ${_cwd}/OpenBSD/${_src} _AUTOPATCH +AUTOPATCHMAN+= ${_cwd}/${_src} +.else # !autopatch MAN${_sect}+= ${_src} -AUTOPATCHMAN+= ${_src} +.endif # autopatch .endfor .endfor + +.endfor # _cwd