summaryrefslogtreecommitdiff
path: root/gnu
diff options
context:
space:
mode:
authorcjs <cjs@NetBSD.org>1997-05-26 03:55:19 +0000
committercjs <cjs@NetBSD.org>1997-05-26 03:55:19 +0000
commit5fd7ce706643c8a60759eaffd1c6abce21fd92b5 (patch)
treedf1210d11ba7530658dc43a7b13dd743544e3474 /gnu
parent42012469efc2e12b6e37829abff5ae8a055d939a (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')
-rw-r--r--gnu/lib/libg++/Makefile52
-rw-r--r--gnu/lib/libg++/libg++/src/Makefile12
-rw-r--r--gnu/lib/libg++/libg++2netbsd62
-rw-r--r--gnu/lib/libg++/libstdc++/Makefile11
4 files changed, 118 insertions, 19 deletions
diff --git a/gnu/lib/libg++/Makefile b/gnu/lib/libg++/Makefile
index 2e515ce32cf..b9b31ef346e 100644
--- a/gnu/lib/libg++/Makefile
+++ b/gnu/lib/libg++/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.22 1997/02/07 07:14:02 mikel Exp $
+# $NetBSD: Makefile,v 1.23 1997/05/26 03:55:57 cjs Exp $
SUBDIR= libg++ libstdc++ # libio libiostream
@@ -8,8 +8,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 || \
@@ -47,4 +86,13 @@ 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>
diff --git a/gnu/lib/libg++/libg++/src/Makefile b/gnu/lib/libg++/libg++/src/Makefile
index 7abed7fd5f3..d414bd88c19 100644
--- a/gnu/lib/libg++/libg++/src/Makefile
+++ b/gnu/lib/libg++/libg++/src/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.5 1997/05/07 07:57:56 mycroft Exp $
+# $NetBSD: Makefile,v 1.6 1997/05/26 03:56:03 cjs Exp $
LIB= g++
@@ -13,6 +13,8 @@ bitset1.c bitxor.c builtin.cc compare.cc error.cc fmtq.cc \
gcd.cc hash.cc ioob.cc lg.cc pow.cc sqrt.cc \
timer.c
+.include <bsd.own.mk> # for BUILDDIR
+
CXXFLAGS+= -nostdinc++ -I$(.CURDIR)/../../include \
-I$(.CURDIR)/../../libio -I$(.CURDIR)/../../libstdc++
CFLAGS+= -I$(.CURDIR) -I$(.CURDIR)/../../libio
@@ -20,12 +22,12 @@ 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
-LIBCURSES!= printf "xxx: .MAKE\n\t@echo \$${LIBCURSES}\n.include <bsd.prog.mk>" |\
- $(MAKE) -s -f- xxx
+LIBCURSES!= printf "xxx:\n\techo \$${LIBCURSES}\n.include <bsd.prog.mk>" |\
+ $(MAKE) -r -s -f - xxx | grep curses
.include <bsd.lib.mk>
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
diff --git a/gnu/lib/libg++/libstdc++/Makefile b/gnu/lib/libg++/libstdc++/Makefile
index b75bc876feb..095c0f3978a 100644
--- a/gnu/lib/libg++/libstdc++/Makefile
+++ b/gnu/lib/libg++/libstdc++/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.6 1997/03/16 15:45:17 veego Exp $
+# $NetBSD: Makefile,v 1.7 1997/05/26 03:56:12 cjs Exp $
LIB= stdc++
@@ -22,13 +22,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
+LDADD= ${BULDDIR}/usr/lib/c++rt0.o
+DPADD= ${BULDDIR}/usr/lib/c++rt0.o
.endif
-.include <bsd.lib.mk>
-
cstrmain.cc: Makefile
@echo Creating cstrmain.cc
@(for i in REP MAIN TRAITS ADDSS ADDPS ADDCS ADDSP ADDSC EQSS EQPS EQSP NESS NEPS NESP LTSS LTPS LTSP GTSS GTPS GTSP LESS LEPS LESP GESS GEPS GESP ; do \
@@ -137,4 +137,3 @@ stdexcepti.so: stdexcepti.cc
@$(LD) -x -r $(.TARGET).o -o $(.TARGET)
@rm -f $(.TARGET).o
-