Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 15 Sep 1999 16:27:16 +1000
From:      Peter Jeremy <jeremyp@gsmx07.alcatel.com.au>
To:        current@FreeBSD.ORG
Subject:   Building PicoBSD
Message-ID:  <99Sep15.162511est.40343@border.alcanet.com.au>

next in thread | raw e-mail | index | archive | help
I'm trying to build a `net' PicoBSD on a -current system and am
running into problems that appear to be inside make(1) (and how it
imports/exports/treats MAKEFLAGS).

I thought I'd try to shrink things by stripping the ISDN and RADIUS
support out of ppp (amongst other things), but ppp/i4b.c kept getting
included in the crunch1.cache and crunch1.mk.  I eventually wound up
with the patches below which:
1) Within crunchgen(8), explicitly pass the environment MAKEFLAGS to
   the subordinate make as a commandline option.
2) Add various options to net/crunch1/Makefile's MAKEFLAGS to disable
   unwanted bits and pieces.
3) Explicitly pass MAKEFLAGS to both crunchgen and the `build it all`
   make.
4) Remote ipfw and -lradius from the crunch.conf file.
5) Fix the password diffs to suit a -current system.  (Note that there
   is a generic problem with including the $FreeBSD$ tag in the diffs).

The result of all this is that ppp/i4b.o _has_ been left out (suggesting
that the -DNOI4B in MAKEFLAGS is being seen), but ppp/nat_cmd.o and
ppp/chap_ms.o are still being included (suggesting that the -DNONAT,
-DNOALIAS, -DRELEASE_CRUNCH and -DNOCRYPT _aren't_ being seen).

Does anyone have any ideas?  I _hope_ I'm doing soething silly...

Index: src/usr.sbin/crunch/crunchgen/crunchgen.c
===================================================================
RCS file: /home/CVSROOT/./src/usr.sbin/crunch/crunchgen/crunchgen.c,v
retrieving revision 1.11
diff -u -r1.11 crunchgen.c
--- crunchgen.c	1998/09/14 11:33:38	1.11
+++ crunchgen.c	1999/09/15 05:41:23
@@ -544,7 +544,7 @@
     fprintf(f, "crunchgen_objs:\n\t@echo 'OBJS= '${OBJS}\n");
     fclose(f);
 
-    sprintf(line, "make -f %s crunchgen_objs 2>&1", tempfname);
+    sprintf(line, "make 'MAKEFLAGS=$MAKEFLAGS' -f %s crunchgen_objs 2>&1", tempfname);
     if((f = popen(line, "r")) == NULL) {
 	warn("submake pipe");
 	goterror = 1;
Index: src/release/picobsd/net/crunch1/Makefile
===================================================================
RCS file: /home/CVSROOT/./src/release/picobsd/net/crunch1/Makefile,v
retrieving revision 1.5
diff -u -r1.5 Makefile
--- Makefile	1999/08/28 01:33:39	1.5
+++ Makefile	1999/09/15 05:47:50
@@ -3,6 +3,8 @@
 #
 SRC?=/usr/src
 
+MAKEFLAGS+=-DNOPAM -DNOSECURE -DNOCRYPT -DRELEASE_CRUNCH -DNOI4B -DNORADIUS -DNONAT
+
 all: crunch
 
 crunch:
@@ -11,8 +13,8 @@
 		touch /usr/src/usr.bin/passwd/.picobsd.patched; \
 	fi
 	@cat crunch.conf|sed -e "s@/usr/src@${SRC}@" >crunch1.conf
-	@crunchgen ./crunch1.conf
-	@${MAKE} -f crunch1.mk -DNOPAM all \
+	@MAKEFLAGS="${MAKEFLAGS}" crunchgen ./crunch1.conf
+	@${MAKE} ${MAKEFLAGS} -f crunch1.mk -DNOPAM all \
 	    "CFLAGS=${CFLAGS} -DRELEASE_CRUNCH -DCRUNCHED_BINARY -DNOSECURE -DNOCRYPT" #2>&1 >/dev/null
 
 clean:
Index: src/release/picobsd/net/crunch1/crunch.conf
===================================================================
RCS file: /home/CVSROOT/./src/release/picobsd/net/crunch1/crunch.conf,v
retrieving revision 1.9
diff -u -r1.9 crunch.conf
--- crunch.conf	1999/08/28 01:33:39	1.9
+++ crunch.conf	1999/09/15 05:52:33
@@ -25,7 +25,8 @@
 
 progs pwd ppp telnet more
 progs passwd date
-progs mount_cd9660 mount_nfs ping traceroute routed ipfw
+progs mount_cd9660 mount_nfs ping traceroute routed
+# ipfw
 
 ln mount_cd9660 cd9660
 ln mount_nfs nfs
@@ -42,4 +43,4 @@
 libs -lncurses -lmytinfo -lipx -lz -lpcap -lalias -lwrap
 libs -ledit -lutil -lmd -lcrypt -lmp -lgmp -lm -lkvm
 libs -lgnuregex -ltelnet
-libs -lradius # used by ppp
+# libs -lradius # used by ppp
Index: src/release/picobsd/net/crunch1/passwd.diff
===================================================================
RCS file: /home/CVSROOT/./src/release/picobsd/net/crunch1/passwd.diff,v
retrieving revision 1.5
diff -u -r1.5 passwd.diff
--- passwd.diff	1999/08/28 01:33:39	1.5
+++ passwd.diff	1999/09/13 03:08:52
@@ -2,14 +2,14 @@
 --- Makefile	Sat Aug  1 20:40:38 1998
 ***************
 *** 2,24 ****
-  # $FreeBSD: ./src/release/picobsd/net/crunch1/passwd.diff,v 1.5 1999/08/28 01:33:39 peter Exp $
+  # $FreeBSD: ./src/usr.bin/passwd/Makefile,v 1.34 1999/09/06 17:30:02 peter Exp $
   
   PROG=	passwd
 ! SRCS=	local_passwd.c passwd.c pw_copy.c pw_util.c pw_yp.c \
 ! 	yp_passwd.c ypxfr_misc.c ${GENSRCS}
   GENSRCS=yp.h yp_clnt.c yppasswd.h yppasswd_clnt.c \
   	yppasswd_private.h yppasswd_private_clnt.c yppasswd_private_xdr.c
-  CFLAGS+=-Wall -DPASSWD_IGNORE_COMMENTS
+  CFLAGS+=-Wall
   
 ! DPADD=	${LIBCRYPT} ${LIBRPCSVC} ${LIBUTIL}
 ! LDADD=	-lcrypt -lrpcsvc -lutil
@@ -26,14 +26,14 @@
   
   CLEANFILES= ${GENSRCS}
 --- 2,21 ----
-  # $FreeBSD: ./src/release/picobsd/net/crunch1/passwd.diff,v 1.5 1999/08/28 01:33:39 peter Exp $
+  # $FreeBSD: ./src/usr.bin/passwd/Makefile,v 1.34 1999/09/06 17:30:02 peter Exp $
   
   PROG=	passwd
 ! SRCS=	local_passwd.c passwd.c pw_copy.c pw_util.c 
 ! 
   GENSRCS=yp.h yp_clnt.c yppasswd.h yppasswd_clnt.c \
   	yppasswd_private.h yppasswd_private_clnt.c yppasswd_private_xdr.c
-  CFLAGS+=-Wall -DPASSWD_IGNORE_COMMENTS
+  CFLAGS+=-Wall
   
 ! DPADD=	${LIBCRYPT} ${LIBUTIL}
 ! LDADD=	-lcrypt -lutil

Peter


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?99Sep15.162511est.40343>