summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbrian <brian@FreeBSD.org>1998-01-17 14:21:21 +0000
committerbrian <brian@FreeBSD.org>1998-01-17 14:21:21 +0000
commitc73933598abd6a1d2341f4c5a98889ac0553c51f (patch)
tree66f3159bc05072bb04cd61207f7cb83f55c20642
parenta9f58b314583656d13806eceb2110a8ba618ef98 (diff)
downloadFreeBSD-src-c73933598abd6a1d2341f4c5a98889ac0553c51f.zip
FreeBSD-src-c73933598abd6a1d2341f4c5a98889ac0553c51f.tar.gz
Remove the necessity of -ldes and -lalias etc from release/Makefile.
When building a release, RELEASE_CRUNCH is defined for a `make' of the objects required by the crunch of each program. The object list is still obtained in the same way, so you must make sure that all objects are built (empty if necessary) by this make. ppp/Makefile provides an example. Reviewed by: jkh
-rw-r--r--release/Makefile6
-rw-r--r--release/alpha/boot_crunch.conf6
-rw-r--r--release/amd64/boot_crunch.conf6
-rw-r--r--release/boot_crunch.conf6
-rw-r--r--release/i386/boot_crunch.conf6
-rw-r--r--release/pc98/boot_crunch.conf6
-rw-r--r--usr.sbin/crunch/crunchgen/crunchgen.c9
-rw-r--r--usr.sbin/ppp/Makefile15
8 files changed, 38 insertions, 22 deletions
diff --git a/release/Makefile b/release/Makefile
index 1c802ac..85e1e92 100644
--- a/release/Makefile
+++ b/release/Makefile
@@ -1,4 +1,4 @@
-# $Id: Makefile,v 1.331 1997/10/05 22:31:40 jkh Exp $
+# $Id: Makefile,v 1.332 1997/10/20 21:57:14 joerg Exp $
#
# make release CHROOTDIR=/some/dir BUILDNAME=somename [ RELEASETAG=tag ]
#
@@ -294,8 +294,8 @@ release.4:
mkdir $${j}_crunch && \
( cd $${j}_crunch && \
crunchgen ${.CURDIR}/$${j}_crunch.conf && \
- ${MAKE} -f $${j}_crunch.mk all NOCRYPT=yes \
- "CFLAGS=${CFLAGS} -DCRUNCHED_BINARY") && \
+ ${MAKE} -DRELEASE_CRUNCH -f $${j}_crunch.mk subclean all
+ NOCRYPT=yes "CFLAGS=${CFLAGS} -DCRUNCHED_BINARY") && \
mv $${j}_crunch/$${j}_crunch ${RD}/crunch/$${j} && \
true || { rm -rf $${j}_crunch ; false ; } ; \
done
diff --git a/release/alpha/boot_crunch.conf b/release/alpha/boot_crunch.conf
index 4d3cbbf..b98ceeb 100644
--- a/release/alpha/boot_crunch.conf
+++ b/release/alpha/boot_crunch.conf
@@ -1,4 +1,4 @@
-# $Id: boot_crunch.conf,v 1.31 1997/09/30 23:58:24 jkh Exp $
+# $Id: boot_crunch.conf,v 1.32 1997/12/04 14:22:01 jkh Exp $
srcdirs /usr/src/bin /usr/src/sbin /usr/src/release /usr/src/usr.bin
srcdirs /usr/src/gnu/usr.bin /usr/src/usr.sbin /usr/src/sbin/i386
@@ -11,5 +11,5 @@ ln gzip gunzip
ln gzip zcat
ln sh -sh
-libs -ll -ledit -lutil -lkvm -lmd -lcrypt -lftpio -lalias -lz
-libs -ldialog -lncurses -lmytinfo -L/usr/src/release/libdisk/obj -ldisk -lipx -ldes
+libs -ll -ledit -lutil -lkvm -lmd -lcrypt -lftpio -lz
+libs -ldialog -lncurses -lmytinfo -L/usr/src/release/libdisk/obj -ldisk -lipx
diff --git a/release/amd64/boot_crunch.conf b/release/amd64/boot_crunch.conf
index 4d3cbbf..b98ceeb 100644
--- a/release/amd64/boot_crunch.conf
+++ b/release/amd64/boot_crunch.conf
@@ -1,4 +1,4 @@
-# $Id: boot_crunch.conf,v 1.31 1997/09/30 23:58:24 jkh Exp $
+# $Id: boot_crunch.conf,v 1.32 1997/12/04 14:22:01 jkh Exp $
srcdirs /usr/src/bin /usr/src/sbin /usr/src/release /usr/src/usr.bin
srcdirs /usr/src/gnu/usr.bin /usr/src/usr.sbin /usr/src/sbin/i386
@@ -11,5 +11,5 @@ ln gzip gunzip
ln gzip zcat
ln sh -sh
-libs -ll -ledit -lutil -lkvm -lmd -lcrypt -lftpio -lalias -lz
-libs -ldialog -lncurses -lmytinfo -L/usr/src/release/libdisk/obj -ldisk -lipx -ldes
+libs -ll -ledit -lutil -lkvm -lmd -lcrypt -lftpio -lz
+libs -ldialog -lncurses -lmytinfo -L/usr/src/release/libdisk/obj -ldisk -lipx
diff --git a/release/boot_crunch.conf b/release/boot_crunch.conf
index 4d3cbbf..b98ceeb 100644
--- a/release/boot_crunch.conf
+++ b/release/boot_crunch.conf
@@ -1,4 +1,4 @@
-# $Id: boot_crunch.conf,v 1.31 1997/09/30 23:58:24 jkh Exp $
+# $Id: boot_crunch.conf,v 1.32 1997/12/04 14:22:01 jkh Exp $
srcdirs /usr/src/bin /usr/src/sbin /usr/src/release /usr/src/usr.bin
srcdirs /usr/src/gnu/usr.bin /usr/src/usr.sbin /usr/src/sbin/i386
@@ -11,5 +11,5 @@ ln gzip gunzip
ln gzip zcat
ln sh -sh
-libs -ll -ledit -lutil -lkvm -lmd -lcrypt -lftpio -lalias -lz
-libs -ldialog -lncurses -lmytinfo -L/usr/src/release/libdisk/obj -ldisk -lipx -ldes
+libs -ll -ledit -lutil -lkvm -lmd -lcrypt -lftpio -lz
+libs -ldialog -lncurses -lmytinfo -L/usr/src/release/libdisk/obj -ldisk -lipx
diff --git a/release/i386/boot_crunch.conf b/release/i386/boot_crunch.conf
index 4d3cbbf..b98ceeb 100644
--- a/release/i386/boot_crunch.conf
+++ b/release/i386/boot_crunch.conf
@@ -1,4 +1,4 @@
-# $Id: boot_crunch.conf,v 1.31 1997/09/30 23:58:24 jkh Exp $
+# $Id: boot_crunch.conf,v 1.32 1997/12/04 14:22:01 jkh Exp $
srcdirs /usr/src/bin /usr/src/sbin /usr/src/release /usr/src/usr.bin
srcdirs /usr/src/gnu/usr.bin /usr/src/usr.sbin /usr/src/sbin/i386
@@ -11,5 +11,5 @@ ln gzip gunzip
ln gzip zcat
ln sh -sh
-libs -ll -ledit -lutil -lkvm -lmd -lcrypt -lftpio -lalias -lz
-libs -ldialog -lncurses -lmytinfo -L/usr/src/release/libdisk/obj -ldisk -lipx -ldes
+libs -ll -ledit -lutil -lkvm -lmd -lcrypt -lftpio -lz
+libs -ldialog -lncurses -lmytinfo -L/usr/src/release/libdisk/obj -ldisk -lipx
diff --git a/release/pc98/boot_crunch.conf b/release/pc98/boot_crunch.conf
index 4d3cbbf..b98ceeb 100644
--- a/release/pc98/boot_crunch.conf
+++ b/release/pc98/boot_crunch.conf
@@ -1,4 +1,4 @@
-# $Id: boot_crunch.conf,v 1.31 1997/09/30 23:58:24 jkh Exp $
+# $Id: boot_crunch.conf,v 1.32 1997/12/04 14:22:01 jkh Exp $
srcdirs /usr/src/bin /usr/src/sbin /usr/src/release /usr/src/usr.bin
srcdirs /usr/src/gnu/usr.bin /usr/src/usr.sbin /usr/src/sbin/i386
@@ -11,5 +11,5 @@ ln gzip gunzip
ln gzip zcat
ln sh -sh
-libs -ll -ledit -lutil -lkvm -lmd -lcrypt -lftpio -lalias -lz
-libs -ldialog -lncurses -lmytinfo -L/usr/src/release/libdisk/obj -ldisk -lipx -ldes
+libs -ll -ledit -lutil -lkvm -lmd -lcrypt -lftpio -lz
+libs -ldialog -lncurses -lmytinfo -L/usr/src/release/libdisk/obj -ldisk -lipx
diff --git a/usr.sbin/crunch/crunchgen/crunchgen.c b/usr.sbin/crunch/crunchgen/crunchgen.c
index ae0a78f..946cbd1 100644
--- a/usr.sbin/crunch/crunchgen/crunchgen.c
+++ b/usr.sbin/crunch/crunchgen/crunchgen.c
@@ -748,6 +748,9 @@ void top_makefile_rules(FILE *outmk)
fprintf(outmk, "SUBMAKE_TARGETS=");
for(p = progs; p != NULL; p = p->next)
fprintf(outmk, " %s_make", p->ident);
+ fprintf(outmk, "\nSUBCLEAN_TARGETS=");
+ for(p = progs; p != NULL; p = p->next)
+ fprintf(outmk, " %s_clean", p->ident);
fprintf(outmk, "\n\n");
fprintf(outmk, "%s: %s.o $(CRUNCHED_OBJS)\n",
@@ -757,8 +760,10 @@ void top_makefile_rules(FILE *outmk)
fprintf(outmk, "\tstrip %s\n", execfname);
fprintf(outmk, "all: objs exe\nobjs: $(SUBMAKE_TARGETS)\n");
fprintf(outmk, "exe: %s\n", execfname);
+ fprintf(outmk, "realclean: clean subclean\n");
fprintf(outmk, "clean:\n\trm -f %s *.lo *.o *_stub.c\n",
execfname);
+ fprintf(outmk, "subclean: $(SUBCLEAN_TARGETS)\n");
}
@@ -773,8 +778,10 @@ void prog_makefile_rules(FILE *outmk, prog_t *p)
fprintf(outmk, "%s_OBJS=", p->ident);
output_strlst(outmk, p->objs);
fprintf(outmk, "%s_make:\n", p->ident);
- fprintf(outmk, "\t(cd $(%s_SRCDIR) && make depend && make $(%s_OBJS))\n\n",
+ fprintf(outmk, "\t(cd $(%s_SRCDIR) && make depend && make $(%s_OBJS))\n",
p->ident, p->ident);
+ fprintf(outmk, "%s_clean:\n", p->ident);
+ fprintf(outmk, "\t(cd $(%s_SRCDIR) && make clean)\n\n", p->ident);
}
else
fprintf(outmk, "%s_make:\n\t@echo \"** cannot make objs for %s\"\n\n",
diff --git a/usr.sbin/ppp/Makefile b/usr.sbin/ppp/Makefile
index 40ecd39..e67406b 100644
--- a/usr.sbin/ppp/Makefile
+++ b/usr.sbin/ppp/Makefile
@@ -1,4 +1,4 @@
-# $Id: Makefile,v 1.33 1997/12/03 10:23:44 brian Exp $
+# $Id: Makefile,v 1.34 1997/12/13 02:37:20 brian Exp $
PROG= ppp
SRCS= arp.c async.c auth.c ccp.c chap.c chat.c command.c deflate.c \
@@ -14,17 +14,26 @@ BINMODE=4550
BINOWN= root
BINGRP= network
-.if defined(NOALIAS)
+.if defined(NOALIAS) || defined(RELEASE_CRUNCH)
CFLAGS+=-DNOALIAS
.else
SRCS+= alias_cmd.c loadalias.c
.endif
-.if exists(${.CURDIR}/../../secure) && !defined(NOCRYPT) && !defined(NOSECURE)
+.if exists(${.CURDIR}/../../secure) && !defined(NOCRYPT) && !defined(NOSECURE) && !defined(RELEASE_CRUNCH)
CFLAGS+=-DHAVE_DES
SRCS+= chap_ms.c
LDADD+= -ldes
DPADD+= ${LIBDES}
.endif
+.if defined(RELEASE_CRUNCH)
+# We must create these objects because the crunchgen will link them,
+# and we don't want any unused symbols to spoil the final link.
+SRCS+= alias_cmd.c loadalias.c chap_ms.c
+chap_ms.o alias_cmd.o loadalias.o:
+ >null_$*.c
+ cc -c -o $@ null_$*.c
+.endif
+
.include <bsd.prog.mk>
OpenPOWER on IntegriCloud