Loading...
Makefile.nbsd_end /dev/null Libc-498
--- /dev/null
+++ Libc/Libc-498/Makefile.nbsd_end
@@ -0,0 +1,58 @@
+# For the NetBSD auto patching mechanism and compatibility environment
+# setup, original NetBSD sources a put into a NetBSD subdirectory.
+# If a file with the same name, but suffix ".patch" is in that directory,
+# that patch will be applied before use.
+#
+# The NBSDMDSRCS, NBSDMISRCS, NBSDORIGHDRS and NBSDSRCS variables must be set,
+# and bracketed by .include of Makefile.nbsd_begin and Makefile.nbsd_end
+#
+# Set up dependencies between the NetBSD source (in a NetBSD subdirectory)
+# and a file with a -nbsd.x suffix (where x is 'c' or 's').  The suffix
+# rules will then compile the file with the simulate NetBSD environment.
+
+NBSDSECTIONS= 1 2 3 4 5 6 7 8 9
+
+.for _src in ${NBSDSRCS}
+.ifmake autopatch
+${_src:R}-nbsd.${_src:E}: NetBSD/${_src} _AUTOPATCHCUR
+AUTOPATCHSRCS+= ${_src:R}-nbsd.${_src:E}
+.else # !autopatch
+SRCS+= ${_src}
+.endif # autopatch
+.endfor
+
+.for _src in ${NBSDMDSRCS}
+.ifmake autopatch
+${_src:R}-nbsd.${_src:E}: NetBSD/${_src} _AUTOPATCHCUR
+AUTOPATCHSRCS+= ${_src:R}-nbsd.${_src:E}
+.else # !autopatch
+MDSRCS+= ${_src}
+.endif # autopatch
+.endfor
+
+.for _src in ${NBSDMISRCS}
+.ifmake autopatch
+${_src:R}-nbsd.${_src:E}: NetBSD/${_src} _AUTOPATCHCUR
+AUTOPATCHSRCS+= ${_src:R}-nbsd.${_src:E}
+.else # !autopatch
+MISRCS+= ${_src}
+.endif # autopatch
+.endfor
+
+.ifmake autopatch
+.for _src in ${NBSDHDRS}
+${_src}: NetBSD/${_src} _AUTOPATCHCUR
+AUTOPATCHHDRS+= ${_src}
+.endfor
+.endif # autopatch
+
+.for _sect in ${NBSDSECTIONS}
+.for _src in ${NBSDMAN${_sect}}
+.ifmake autopatch
+${_src}: NetBSD/${_src} _AUTOPATCH
+AUTOPATCHMAN+= ${_src}
+.else # !autopatch
+MAN${_sect}+= ${_src}
+.endif # autopatch
+.endfor
+.endfor