diff options
| author | cjs <cjs@NetBSD.org> | 1997-05-26 03:55:19 +0000 |
|---|---|---|
| committer | cjs <cjs@NetBSD.org> | 1997-05-26 03:55:19 +0000 |
| commit | 5fd7ce706643c8a60759eaffd1c6abce21fd92b5 (patch) | |
| tree | df1210d11ba7530658dc43a7b13dd743544e3474 /gnu/lib/libg++/libg++2netbsd | |
| parent | 42012469efc2e12b6e37829abff5ae8a055d939a (diff) | |
These updates to the build allow building against include files
and libs in the object tree, if you use a separate object tree,
while maintaining backward compatability with other build methods.
See the notes in src/share/mk/bsd.README for full details. Note
that the `make includes' target now only installs the include files
in the build directory (if you use one--otherwise they go in DESTDIR
just like before); `make install' will install include files in
DESTDIR.
Diffstat (limited to 'gnu/lib/libg++/libg++2netbsd')
| -rw-r--r-- | gnu/lib/libg++/libg++2netbsd | 62 |
1 files changed, 56 insertions, 6 deletions
diff --git a/gnu/lib/libg++/libg++2netbsd b/gnu/lib/libg++/libg++2netbsd index 52dd71c711e..86a5c8f01e2 100644 --- a/gnu/lib/libg++/libg++2netbsd +++ b/gnu/lib/libg++/libg++2netbsd @@ -1,6 +1,6 @@ #!/usr/local/bin/perl # -# $NetBSD: libg++2netbsd,v 1.20 1997/04/20 20:20:12 thorpej Exp $ +# $NetBSD: libg++2netbsd,v 1.21 1997/05/26 04:24:42 cjs Exp $ # # Perl script to convert a standard distribution directory for libg++ into # a NetBSD source tree. @@ -433,8 +433,47 @@ HEADERS= cassert cctype cerrno cfloat ciso646 climits clocale cmath complex \ algorithm deque list map queue set stack vector utility functional \ iterator memory numeric +.include <bsd.own.mk> # for OBJDIR -includes: +.PHONY: builddir +builddir: + @echo ${INSTALL} -d ${BUILDDIR}/usr/include/g++/gen + @${INSTALL} -d ${BUILDDIR}/usr/include/g++/gen + @echo ${INSTALL} -d ${BUILDDIR}/usr/include/g++/std + @${INSTALL} -d ${BUILDDIR}/usr/include/g++/std + @echo installing includes from libg++/src + @(cd libg++/src ; for j in *.[ih]; do \ + cmp -s $$j ${BUILDDIR}/usr/include/g++/$$j || \ + ${INSTALL} -c -m 444 $$j ${BUILDDIR}/usr/include/g++/$$j; \ + done) + @echo installing includes from include/gen + @(cd include/gen ; for j in *.*P; do \ + cmp -s $$j ${BUILDDIR}/usr/include/g++/gen/$$j || \ + ${INSTALL} -c -m 444 $$j ${BUILDDIR}/usr/include/g++/gen/$$j; \ + done) + @echo installing includes from libio + @(cd libio ; for j in *.h; do \ + cmp -s $$j ${BUILDDIR}/usr/include/g++/$$j || \ + ${INSTALL} -c -m 444 $$j ${BUILDDIR}/usr/include/g++/$$j; \ + done) + @echo installing includes from libstdc++/std + @(cd libstdc++/std ; for j in *.h *.cc; do \ + cmp -s $$j ${BUILDDIR}/usr/include/g++/std/$$j || \ + ${INSTALL} -c -m 444 $$j ${BUILDDIR}/usr/include/g++/std/$$j; \ + done) + @echo installing includes from libstdc++/stl + @(cd libstdc++/stl ; for j in *.h *.cc; do \ + cmp -s $$j ${BUILDDIR}/usr/include/g++/$$j || \ + ${INSTALL} -c -m 444 $$j ${BUILDDIR}/usr/include/g++/$$j; \ + done) + @echo installing includes from libstdc++ + @(cd libstdc++ ; for j in *.h ${HEADERS}; do \ + cmp -s $$j ${BUILDDIR}/usr/include/g++/$$j || \ + ${INSTALL} -c -m 444 $$j ${BUILDDIR}/usr/include/g++/$$j; \ + done) + +.PHONY: destdir +destdir: @echo installing includes from libg++/src @(cd libg++/src ; for j in *.[ih]; do \ cmp -s $$j ${DESTDIR}/usr/include/g++/$$j || \ @@ -472,6 +511,15 @@ includes: ${DESTDIR}/usr/include/g++/$$j; \ done) +.if defined(OBJDIR) +includes: builddir +.else +includes: destdir +.endif # defined(OBJDIR) + +.PHONY: install +install: destdir + .include <bsd.subdir.mk> %% file libg++/Makefile %% NetBSD @@ -496,6 +544,8 @@ LIB= g++ %% srcs libg++ +.include <bsd.own.mk> # for BUILDDIR + CXXFLAGS+= -nostdinc++ -I$(.CURDIR)/../../include \ -I$(.CURDIR)/../../libio -I$(.CURDIR)/../../libstdc++ CFLAGS+= -I$(.CURDIR) -I$(.CURDIR)/../../libio @@ -503,8 +553,8 @@ CFLAGS+= -I$(.CURDIR) -I$(.CURDIR)/../../libio LDADD= -lcurses DPADD= ${LIBCURSES} .else -LDADD= ${DESTDIR}/usr/lib/c++rt0.o -lcurses -DPADD= ${DESTDIR}/usr/lib/c++rt0.o ${LIBCURSES} +LDADD= ${BUILDDIR}/usr/lib/c++rt0.o -lcurses +DPADD= ${BUILDDIR}/usr/lib/c++rt0.o ${LIBCURSES} .endif NOMAN= noman NOLINT= nolint @@ -555,13 +605,13 @@ NOLINT= nolint .PATH: $(.CURDIR)/../libio $(.CURDIR)/stl $(.CURDIR)/../librx +.include <bsd.lib.mk> + .if (${MACHINE} != "alpha") LDADD= ${DESTDIR}/usr/lib/c++rt0.o DPADD= ${DESTDIR}/usr/lib/c++rt0.o .endif -.include <bsd.lib.mk> - %% frag %% rtti typeinfoi %% rtti stdexcepti |
