X-Git-Url: https://git.saurik.com/apple/libc.git/blobdiff_plain/3d9156a7a519a5e3aa1b92e9d9d4b991f1aed7ff..b5d655f7532a546b54809da387f7467d128a756b:/Makefile.nbsd_end diff --git a/Makefile.nbsd_end b/Makefile.nbsd_end index 7e75dc5..63a8a85 100644 --- a/Makefile.nbsd_end +++ b/Makefile.nbsd_end @@ -12,33 +12,52 @@ NBSDSECTIONS= 1 2 3 4 5 6 7 8 9 +# This .for statement forces evaluation of ${CWD} +.for _cwd in ${CWD} + .for _src in ${NBSDSRCS} -${SYMROOT}/${_src:R}-nbsd.${_src:E}: NetBSD/${_src} _AUTOPATCHSYM +.ifmake autopatch +${_cwd}/${_src:R}-nbsd.${_src:E}: ${_cwd}/NetBSD/${_src} _AUTOPATCH +AUTOPATCHSRCS+= ${_cwd}/${_src:R}-nbsd.${_src:E} +.else # !autopatch SRCS+= ${_src} -AUTOPATCHSRCS+= ${SYMROOT}/${_src:R}-nbsd.${_src:E} +.endif # autopatch .endfor .for _src in ${NBSDMDSRCS} -${SYMROOT}/${_src:R}-nbsd.${_src:E}: NetBSD/${_src} _AUTOPATCHSYM +.ifmake autopatch +${_cwd}/${_src:R}-nbsd.${_src:E}: ${_cwd}/NetBSD/${_src} _AUTOPATCH +AUTOPATCHSRCS+= ${_cwd}/${_src:R}-nbsd.${_src:E} +.else # !autopatch MDSRCS+= ${_src} -AUTOPATCHSRCS+= ${SYMROOT}/${_src:R}-nbsd.${_src:E} +.endif # autopatch .endfor .for _src in ${NBSDMISRCS} -${SYMROOT}/${_src:R}-nbsd.${_src:E}: NetBSD/${_src} _AUTOPATCHSYM +.ifmake autopatch +${_cwd}/${_src:R}-nbsd.${_src:E}: ${_cwd}/NetBSD/${_src} _AUTOPATCH +AUTOPATCHSRCS+= ${_cwd}/${_src:R}-nbsd.${_src:E} +.else # !autopatch MISRCS+= ${_src} -AUTOPATCHSRCS+= ${SYMROOT}/${_src:R}-nbsd.${_src:E} +.endif # autopatch .endfor +.ifmake autopatch .for _src in ${NBSDHDRS} -${SYMROOT}/${_src}: NetBSD/${_src} _AUTOPATCHSYM -AUTOPATCHHDRS+= ${SYMROOT}/${_src} +${_cwd}/${_src}: ${_cwd}/NetBSD/${_src} _AUTOPATCH +AUTOPATCHHDRS+= ${_cwd}/${_src} .endfor +.endif # autopatch .for _sect in ${NBSDSECTIONS} .for _src in ${NBSDMAN${_sect}} -${_src}: NetBSD/${_src} _AUTOPATCH +.ifmake autopatch +${_cwd}/${_src}: ${_cwd}/NetBSD/${_src} _AUTOPATCH +AUTOPATCHMAN+= ${_cwd}/${_src} +.else # !autopatch MAN${_sect}+= ${_src} -AUTOPATCHMAN+= ${_src} +.endif # autopatch .endfor .endfor + +.endfor # _cwd