Subject: port-vax/4090: vax boot Makefile problem
To: None <gnats-bugs@gnats.netbsd.org>
From: maximum entropy <entropy@vivax.bernstein.com>
List: netbsd-bugs
Date: 09/05/1997 22:48:44
>Number:         4090
>Category:       port-vax
>Synopsis:       If vers.o does not exist, boot fails to build
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    gnats-admin (GNATS administrator)
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Sep  5 19:50:02 1997
>Last-Modified:
>Originator:     maximum entropy
>Organization:
	
>Release:        <NetBSD-current source date>19970905
>Environment:
	
System: NetBSD vivax.bernstein.com 1.2G NetBSD 1.2G (VIVAX) #2: Thu Sep 4 07:55:32 EDT 1997 root@vivax.bernstein.com:/import/tardis/usr/src/sys/arch/vax/compile/VIVAX vax


>Description:
	
If vers.o does not exist, the VAX boot programs will not build.
This problem is masked by a related problem:  "make clean" does not
remove the vers.o object file.
>How-To-Repeat:
	
# cd /sys/arch/vax/boot
# rm -f *.o
# make clean && make cleandir && make depend && make
[... churns for a while ...]
make: don't know how to make vers.o. Stop
# touch vers.o
# make
[... build completes successfully ...]

>Fix:
	

--- /sys/arch/vax/boot/Makefile.orig	Mon Jun 30 07:22:20 1997
+++ /sys/arch/vax/boot/Makefile	Fri Sep  5 22:33:36 1997
@@ -57,21 +57,18 @@
 	@rm -f a.out
 
 boot:	boot.o srt0.o devopen.o conf.o ${DEVS} libsvax.a ${SALIB} vers.o
-	@date '+_vers: .globl _vers; .asciz ">> NetBSD/vax boot [%y%m%d %H:%M] <<"' | as -o vers.o
 	ld -N -Ttext ${RELOC} -e nisse -o $@ srt0.o devopen.o boot.o \
 	conf.o ${DEVS} ${LIBS} vers.o
 	@strip boot
 	@size boot
 
 edlabel: edlabel.o srt0.o devopen.o conf.o ${DEVS} libsvax.a vers.o
-	@date '+_vers: .globl _vers; .asciz ">> NetBSD/vax boot [%y%m%d %H:%M] <<"' | as -o vers.o
 	ld -N -Ttext ${RELOC} -e nisse -o $@ srt0.o devopen.o edlabel.o\
 	conf.o ${DEVS} ${LIBS} vers.o
 	@strip edlabel
 	@size edlabel
 
 copy:	copy.o srt0.o devopen.o conf.o ${DEVS} libsvax.a vers.o
-	@date '+_vers: .globl _vers; .asciz ">> NetBSD/vax boot [%y%m%d %H:%M] <<"' | as -o vers.o
 	ld -N -Ttext ${RELOC} -e nisse -o $@ srt0.o devopen.o copy.o \
 	conf.o ${DEVS} ${LIBS} vers.o
 	@strip copy
@@ -79,6 +76,9 @@
 
 #
 
+vers.o:
+	@date '+_vers: .globl _vers; .asciz ">> NetBSD/vax boot [%y%m%d %H:%M] <<"' | as -o vers.o
+
 hp.o:	hp.c
 	${CC} -c ${CFLAGS} $*.c
 
@@ -120,5 +120,5 @@
 	rm -f start.o romread.o bootxx.o init.o xxboot boot racopy \
 	libsvax.a udiv.o urem.o consio.o ${DEVS} edlabel edlabel.o
 	rm -f conf.o boot.o rom.o racopy.o srt0.o devopen.o rootcopy.o \
-	copy copy.o init.o str.o
+	copy copy.o init.o str.o vers.o
 
>Audit-Trail:
>Unformatted: