On Sun, 13 Jul 2003, Tim Kientzle wrote: > Bruce Evans wrote: > > I think splitting it or making it exit after just setting variables > > in the userland case is the right fix. ... [it == newvers.sh] > > I think you're right, but don't see a very simple way to make that > work, especially given the surprising number of places > that newvers.sh is used.
I think there aren't so many -- only kernel Makefiles and src/include/Makefile. There seems to be a simple way due to bitrot. $1 in newvers.sh is not set when newvers.sh is invoked from src/include/Makefile, but it seems to always be set when newvers.sh is invoked from kernel Makefiles, due to garbage in the latter. The garbage is now centralized in sys/conf/kern.post.mk: sh $S/conf/newvers.sh ${KERN_IDENT} ^^^^^^^^^^^^^ This passes an unused variable to newvers.sh. Passing and use of this variable was removed in 4.4BSD-Lite1, but FreeBSD's kernel Makefiles are based on Net/2 and haven't caught up with this change yet, while FreeBSD's newvers.sh is based on the Lite1 so it has the change. This variable became needed again in newvers.sh last month, but it wasn't used; the make -V hack was used instead. Some relevant uses and non-uses of $1 in newvers.sh: %%% FreeBSD rev.1.1 (same as Net/2?) echo "char version[] = \"version: ${v} ($1) ${t}\";" ^^^^ FreeBSD-1.1.5: echo "const char version[] = \"${kernvers} ($1) #${v}: ${t}\\n [EMAIL PROTECTED]:${dir}\\n\";" ^^^^ 4.4BSD-Lite1: echo "char version[] = \"4.4BSD-Lite #${v}: ${t}\\n [EMAIL PROTECTED]:${d}\\n\";" >>vers.c [No $1's here or elsewhere in newvers.sh] -current: i=`make -V KERN_IDENT` ... char version[] = "${VERSION} #${v}: ${t}\\n [EMAIL PROTECTED]:${d}\\n"; ... char kern_ident[] = "${i}"; [No $1's here or elsewhere in newvers.sh, but I think $i is always the same as $1.] %%% So removing the make -V line and just using $1 should fix the main problem and the bitrot. Bruce _______________________________________________ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "[EMAIL PROTECTED]"