X-Git-Url: https://git.saurik.com/apple/libc.git/blobdiff_plain/224c70764cab4e0e39a26aaf3ad3016552f62f55..b5d655f7532a546b54809da387f7467d128a756b:/Makefile.obsd_end diff --git a/Makefile.obsd_end b/Makefile.obsd_end index 801a018..9b3ef1a 100644 --- a/Makefile.obsd_end +++ b/Makefile.obsd_end @@ -12,10 +12,13 @@ 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} .ifmake autopatch -${_src:R}-obsd.${_src:E}: OpenBSD/${_src} _AUTOPATCHCUR -AUTOPATCHSRCS+= ${_src:R}-obsd.${_src:E} +${_cwd}/${_src:R}-obsd.${_src:E}: ${_cwd}/OpenBSD/${_src} _AUTOPATCH +AUTOPATCHSRCS+= ${_cwd}/${_src:R}-obsd.${_src:E} .else # !autopatch SRCS+= ${_src} .endif # autopatch @@ -23,8 +26,8 @@ SRCS+= ${_src} .for _src in ${OBSDMDSRCS} .ifmake autopatch -${_src:R}-obsd.${_src:E}: OpenBSD/${_src} _AUTOPATCHCUR -AUTOPATCHSRCS+= ${_src:R}-obsd.${_src:E} +${_cwd}/${_src:R}-obsd.${_src:E}: ${_cwd}/OpenBSD/${_src} _AUTOPATCH +AUTOPATCHSRCS+= ${_cwd}/${_src:R}-obsd.${_src:E} .else # !autopatch MDSRCS+= ${_src} .endif # autopatch @@ -32,8 +35,8 @@ MDSRCS+= ${_src} .for _src in ${OBSDMISRCS} .ifmake autopatch -${_src:R}-obsd.${_src:E}: OpenBSD/${_src} _AUTOPATCHCUR -AUTOPATCHSRCS+= ${_src:R}-obsd.${_src:E} +${_cwd}/${_src:R}-obsd.${_src:E}: ${_cwd}/OpenBSD/${_src} _AUTOPATCH +AUTOPATCHSRCS+= ${_cwd}/${_src:R}-obsd.${_src:E} .else # !autopatch MISRCS+= ${_src} .endif # autopatch @@ -41,18 +44,20 @@ MISRCS+= ${_src} .ifmake autopatch .for _src in ${OBSDHDRS} -${_src}: OpenBSD/${_src} _AUTOPATCHCUR -AUTOPATCHHDRS+= ${_src} +${_cwd}/${_src}: ${_cwd}/OpenBSD/${_src} _AUTOPATCH +AUTOPATCHHDRS+= ${_cwd}/${_src} .endfor .endif # autopatch .for _sect in ${OBSDSECTIONS} .for _src in ${OBSDMAN${_sect}} .ifmake autopatch -${_src}: OpenBSD/${_src} _AUTOPATCH -AUTOPATCHMAN+= ${_src} +${_cwd}/${_src}: ${_cwd}/OpenBSD/${_src} _AUTOPATCH +AUTOPATCHMAN+= ${_cwd}/${_src} .else # !autopatch MAN${_sect}+= ${_src} .endif # autopatch .endfor .endfor + +.endfor # _cwd