summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorBruce Evans <bde@FreeBSD.org>1998-03-13 09:41:58 +0000
committerBruce Evans <bde@FreeBSD.org>1998-03-13 09:41:58 +0000
commit13a8a44971b3d0ae9f3ddceb58c03501215c71b3 (patch)
treecde02cf2619e899cab63284a584396903d20c69a /Makefile
parent1baf87502ec65557a05a635ea6d4748fdc866e9c (diff)
downloadsrc-test-13a8a44971b3d0ae9f3ddceb58c03501215c71b3.tar.gz
src-test-13a8a44971b3d0ae9f3ddceb58c03501215c71b3.zip
Build all tools shared, and don't build any shared libraries for tools.
Build libraries (for linking the tools to) in a more correct order (for linking freshly created shared libraries to each other). This is probably a no-op now that shared libraries for tools aren't built, but I didn't test any intermediate versions. Security-related directories that are not built by default may now be misordered for the shared case. Don't build libcompat specially. It isn't used for tools, and shouldn't be used in /usr/src (it is only used for IPXrouted and crufty games). Added missing ${.CURDIR} to existence tests for library directories. Existence tests for top-level directories are still broken. Test for library directories actually being built, not for directories above them.
Notes
Notes: svn path=/head/; revision=34541
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile88
1 files changed, 47 insertions, 41 deletions
diff --git a/Makefile b/Makefile
index 068c84dc3a0ae..a8a4a8f49b1ad 100644
--- a/Makefile
+++ b/Makefile
@@ -1,5 +1,5 @@
#
-# $Id: Makefile,v 1.161 1998/03/12 10:55:02 bde Exp $
+# $Id: Makefile,v 1.162 1998/03/12 13:19:59 bde Exp $
#
# While porting to the another architecture include the bootstrap instead
# of the normal build.
@@ -137,10 +137,10 @@ SUP?= sup
SUPFLAGS?= -v
#
-# While building tools for bootstrapping, we dont need to waste time on
-# profiled libraries or man pages. This speeds things up somewhat.
+# While building tools for bootstrapping, we don't need to waste time on
+# shared or profiled libraries, shared linkage, or documentation.
#
-MK_FLAGS= -DNOINFO -DNOMAN -DNOPROFILE
+MK_FLAGS= -DNOINFO -DNOMAN -DNOPIC -DNOPROFILE -DNOSHARED
#
# world
@@ -569,57 +569,63 @@ lib-tools:
#
# libraries - build and install the libraries
#
-libraries:
-.if exists(lib/csu/${MACHINE})
- cd ${.CURDIR}/lib/csu/${MACHINE} && ${MAKE} ${MK_FLAGS} depend && \
- ${MAKE} ${MK_FLAGS} all && \
- ${MAKE} ${MK_FLAGS} -B install ${CLEANDIR} ${OBJDIR}
-.endif
-.if exists(lib/libcompat)
- cd ${.CURDIR}/lib/libcompat && ${MAKE} ${MK_FLAGS} depend && \
- ${MAKE} ${MK_FLAGS} all && \
- ${MAKE} ${MK_FLAGS} -B install ${CLEANDIR} ${OBJDIR}
+
+# We have to know too much about botches in the lib tree:
+.if exists(csu/${MACHINE}.pcc)
+_csu=csu/${MACHINE}.pcc
+.else
+_csu=csu/${MACHINE}
.endif
-.if exists(lib/libncurses)
- cd ${.CURDIR}/lib/libncurses && ${MAKE} ${MK_FLAGS} depend && \
- ${MAKE} ${MK_FLAGS} all && \
- ${MAKE} ${MK_FLAGS} -B install ${CLEANDIR} ${OBJDIR}
+
+.if defined(WANT_CSRG_LIBM)
+_libm= libm
+.else
+_libm= msun
.endif
-.if exists(lib/libtermcap)
- cd ${.CURDIR}/lib/libtermcap && ${MAKE} ${MK_FLAGS} depend && \
- ${MAKE} ${MK_FLAGS} all && \
- ${MAKE} ${MK_FLAGS} -B install ${CLEANDIR} ${OBJDIR}
+
+libraries:
+#
+# Build csu early so that some tools get linked to the new version (too
+# late for the main tools, however).
+#
+# To satisfy shared library or ELF linkage when only the libraries being
+# built are visible:
+#
+# libcom_err must be built before libss.
+# libcrypt and libmd must be built before libskey.
+# libm must be built before libtcl.
+# libmytinfo must be built before libdialog and libncurses.
+# libncurses must be built before libdialog.
+# libtermcap must be built before libcurses, libedit and libreadline.
+#
+.for _lib in ${_csu} libcom_err libcrypt ${_libm} libmytinfo \
+ libncurses libtermcap
+.if exists(${.CURDIR}/lib/${_lib})
+ cd ${.CURDIR}/lib/${_lib} && \
+ ${MAKE} ${MK_FLAGS:S/-DNOPIC//} depend && \
+ ${MAKE} ${MK_FLAGS:S/-DNOPIC//} all && \
+ ${MAKE} ${MK_FLAGS:S/-DNOPIC//} -B install
.endif
-.if exists(gnu)
- cd ${.CURDIR}/gnu/lib && ${MAKE} ${MK_FLAGS} depend && \
+.endfor
+.for _lib in gnu/lib lib usr.bin/lex/lib usr.sbin/pcvt/keycap
+.if exists(${.CURDIR}/${_lib})
+ cd ${.CURDIR}/${_lib} && \
+ ${MAKE} ${MK_FLAGS} depend && \
${MAKE} ${MK_FLAGS} all && \
${MAKE} ${MK_FLAGS} -B install ${CLEANDIR} ${OBJDIR}
.endif
-.if exists(secure) && !defined(NOCRYPT) && !defined(NOSECURE)
+.endfor
+.if exists(${.CURDIR}/secure/lib) && !defined(NOCRYPT) && !defined(NOSECURE)
cd ${.CURDIR}/secure/lib && ${MAKE} ${MK_FLAGS} depend && \
${MAKE} ${MK_FLAGS} all && \
${MAKE} ${MK_FLAGS} -B install ${CLEANDIR} ${OBJDIR}
.endif
-.if exists(lib)
- cd ${.CURDIR}/lib && ${MAKE} ${MK_FLAGS} depend && \
- ${MAKE} ${MK_FLAGS} all && \
- ${MAKE} ${MK_FLAGS} -B install ${CLEANDIR} ${OBJDIR}
-.endif
-.if exists(usr.bin/lex/lib)
- cd ${.CURDIR}/usr.bin/lex/lib && ${MAKE} ${MK_FLAGS} depend && \
- ${MAKE} ${MK_FLAGS} all && \
- ${MAKE} ${MK_FLAGS} -B install ${CLEANDIR} ${OBJDIR}
-.endif
-.if exists(kerberosIV) && !defined(NOCRYPT) && defined(MAKE_KERBEROS4)
+.if exists(${.CURDIR}/kerberosIV/lib) && !defined(NOCRYPT) && \
+ defined(MAKE_KERBEROS4)
cd ${.CURDIR}/kerberosIV/lib && ${MAKE} ${MK_FLAGS} depend && \
${MAKE} ${MK_FLAGS} all && \
${MAKE} ${MK_FLAGS} -B install ${CLEANDIR} ${OBJDIR}
.endif
-.if exists(usr.sbin/pcvt/keycap)
- cd ${.CURDIR}/usr.sbin/pcvt/keycap && ${MAKE} ${MK_FLAGS} depend && \
- ${MAKE} ${MK_FLAGS} all && \
- ${MAKE} ${MK_FLAGS} -B install ${CLEANDIR} ${OBJDIR}
-.endif
#
# build-tools - build and install any other tools needed to complete the