]> git.saurik.com Git - apple/libc.git/blobdiff - Makefile.fbsd_end
Libc-498.1.5.tar.gz
[apple/libc.git] / Makefile.fbsd_end
index 9b43be085f2967a525b36f7c9a37a45eb6530e51..6275b0529672139b6bb39d6d604a8bb9bb70e26b 100644 (file)
 
 FBSDSECTIONS= 1 2 3 4 5 6 7 8 9
 
+# This .for statement forces evaluation of ${_cwd}
+.for _cwd in ${CWD}
+
 .for _src in ${FBSDSRCS}
-${SYMROOT}/${_src:R}-fbsd.${_src:E}: FreeBSD/${_src} _AUTOPATCHSYM
+.ifmake autopatch
+${_cwd}/${_src:R}-fbsd.${_src:E}: ${_cwd}/FreeBSD/${_src} _AUTOPATCH
+AUTOPATCHSRCS+= ${_cwd}/${_src:R}-fbsd.${_src:E}
+.else # !autopatch
 SRCS+= ${_src}
-AUTOPATCHSRCS+= ${SYMROOT}/${_src:R}-fbsd.${_src:E}
+.endif # autopatch
 .endfor
 
 .for _src in ${FBSDMDSRCS}
-${SYMROOT}/${_src:R}-fbsd.${_src:E}: FreeBSD/${_src} _AUTOPATCHSYM
+.ifmake autopatch
+${_cwd}/${_src:R}-fbsd.${_src:E}: ${_cwd}/FreeBSD/${_src} _AUTOPATCH
+AUTOPATCHSRCS+= ${_cwd}/${_src:R}-fbsd.${_src:E}
+.else # !autopatch
 MDSRCS+= ${_src}
-AUTOPATCHSRCS+= ${SYMROOT}/${_src:R}-fbsd.${_src:E}
+.endif # autopatch
 .endfor
 
 .for _src in ${FBSDMISRCS}
-${SYMROOT}/${_src:R}-fbsd.${_src:E}: FreeBSD/${_src} _AUTOPATCHSYM
+.ifmake autopatch
+${_cwd}/${_src:R}-fbsd.${_src:E}: ${_cwd}/FreeBSD/${_src} _AUTOPATCH
+AUTOPATCHSRCS+= ${_cwd}/${_src:R}-fbsd.${_src:E}
+.else # !autopatch
 MISRCS+= ${_src}
-AUTOPATCHSRCS+= ${SYMROOT}/${_src:R}-fbsd.${_src:E}
+.endif # autopatch
+.endfor
+
+# FBSDPATCHSRCS are for source that need patching, but don't build
+# in base variant (only in other variants)
+.ifmake autopatch
+.for _src in ${FBSDPATCHSRCS}
+${_cwd}/${_src:R}-fbsd.${_src:E}: ${_cwd}/FreeBSD/${_src} _AUTOPATCH
+AUTOPATCHSRCS+= ${_cwd}/${_src:R}-fbsd.${_src:E}
 .endfor
+.endif # autopatch
 
+.ifmake autopatch
 .for _src in ${FBSDHDRS}
-${SYMROOT}/${_src}: FreeBSD/${_src} _AUTOPATCHSYM
-AUTOPATCHHDRS+= ${SYMROOT}/${_src}
+${_cwd}/${_src}: ${_cwd}/FreeBSD/${_src} _AUTOPATCH
+AUTOPATCHHDRS+= ${_cwd}/${_src}
 .endfor
+.endif # autopatch
 
 .for _sect in ${FBSDSECTIONS}
 .for _src in ${FBSDMAN${_sect}}
-${_src}: FreeBSD/${_src} _AUTOPATCH
+.ifmake autopatch
+${_cwd}/${_src}: ${_cwd}/FreeBSD/${_src} _AUTOPATCH
+AUTOPATCHMAN+= ${_cwd}/${_src}
+.else # !autopatch
 MAN${_sect}+= ${_src}
-AUTOPATCHMAN+= ${_src}
+.endif # autopatch
 .endfor
 .endfor
+
+.endfor # _cwd