Date: Thu, 26 Jun 1997 10:49:36 +0200 (MEST) From: arnej@mail.math.ntnu.no To: FreeBSD-gnats-submit@FreeBSD.ORG Subject: bin/3957: Makefile dependency error in amd Message-ID: <199706260849.KAA00720@frida.math.ntnu.no> Resent-Message-ID: <199706260850.BAA11970@hub.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 3957
>Category: bin
>Synopsis: Makefile dependency error in amd
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: freebsd-bugs
>State: open
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Thu Jun 26 01:50:01 PDT 1997
>Last-Modified:
>Originator: Arne Henrik Juul
>Organization:
Norwegian University of Technology and Science
>Release: FreeBSD 2.2-STABLE i386
>Environment:
I'm cvsup'ing and checking out RELENG_2_2.
It looks like this applies to -current as well.
>Description:
When making amd for the first time nfs_prot.h isn't built
resulting in this error message:
===> amq
cc -O -I/usr/obj/usr/src/usr.sbin/amd/amq -I/usr/src/usr.sbin/amd/amq/../include -I/usr/src/usr.sbin/amd/amq/../rpcx -I/usr/src/usr.sbin/amd/amq/../config -DARCH_REP=\"i386\" -DOS_REP=\"bsd44\" -DOS_HDR=\"os-bsd44.h\" -c /usr/src/usr.sbin/amd/amq/amq.c
In file included from /usr/src/usr.sbin/amd/amq/amq.c:61:
/usr/src/usr.sbin/amd/amq/../include/am.h:52: nfs_prot.h: No such file or directory
Doing make -k a couple of times doesn't help, but doing a
"make depend" will create the missing file:
===> amq
rpcgen -h /usr/include/rpcsvc/nfs_prot.x -o nfs_prot.h
rm -f .depend
mkdep -f .depend -a -I/usr/obj/usr/src/usr.sbin/amd/amq -I/usr/src/usr.sbin/amd/amq/../include -I/usr/src/usr.sbin/amd/amq/../rpcx -I/usr/src/usr.sbin/amd/amq/../config -DARCH_REP=\"i386\" -DOS_REP=\"bsd44\" -DOS_HDR=\"os-bsd44.h\" /usr/src/usr.sbin/amd/amq/amq.c /usr/src/usr.sbin/amd/amq/../rpcx/amq_clnt.c /usr/src/usr.sbin/amd/amq/../rpcx/amq_xdr.c /usr/src/usr.sbin/amd/amq/../amd/misc_rpc.c
I believe this should be unneccessary.
One possibility would be to use <rpcsvc/nfs_prot.h> instead
of building a local version, but the Makefile has this line in it:
${OBJS} beforedepend: nfs_prot.h
which looks like it should DTRT, but actually it doesn't because:
Variable substitution occurs at two distinct times, depending on where
the variable is being used. Variables in dependency lines are expanded
as the line is read. Variables in shell commands are expanded when the
shell command is executed. [From "man make"]
>How-To-Repeat:
cd /usr/src/usr.sbin/amd
make cleandir; make cleandir; make obj; make
>Fix:
Move the dependency line in question to a point where
the OBJS variable actually is set. I found one more
instance of this but in that case the line wasn't really
needed anyway (a redundant null operation :-) so I made
a patch to remove it.
Index: src/usr.sbin/amd/amd/Makefile
===================================================================
RCS file: /usr/cvs/src/usr.sbin/amd/amd/Makefile,v
retrieving revision 1.2.8.3
diff -u -r1.2.8.3 Makefile
--- Makefile 1997/05/23 07:47:01 1.2.8.3
+++ Makefile 1997/06/26 08:19:51
@@ -41,8 +41,6 @@
mount_xdr.c: mount.h ${MOUNT_X}
${RPCCOM} -c -DWANT_NFS3 ${MOUNT_X} -o ${.TARGET}
-${OBJS} beforedepend: nfs_prot.h
-
nfs_prot.h: ${NFS_PROT_X}
${RPCCOM} -h ${NFS_PROT_X} -o ${.TARGET}
@@ -55,3 +53,5 @@
.include "Makefile.config"
.include "../../Makefile.inc"
.include <bsd.prog.mk>
+
+${OBJS} beforedepend: nfs_prot.h
Index: src/usr.sbin/amd/amq/Makefile
===================================================================
RCS file: /usr/cvs/src/usr.sbin/amd/amq/Makefile,v
retrieving revision 1.3.8.2
diff -u -r1.3.8.2 Makefile
--- Makefile 1997/05/23 07:47:07 1.3.8.2
+++ Makefile 1997/06/26 08:17:12
@@ -18,7 +18,7 @@
nfs_prot.h: ${NFS_PROT_X}
${RPCCOM} -h ${NFS_PROT_X} -o ${.TARGET}
-${OBJS} beforedepend: nfs_prot.h
-
.include "../../Makefile.inc"
.include <bsd.prog.mk>
+
+${OBJS} beforedepend: nfs_prot.h
Index: src/usr.sbin/amd/mk-amd-map/Makefile
===================================================================
RCS file: /usr/cvs/src/usr.sbin/amd/mk-amd-map/Makefile,v
retrieving revision 1.2.8.2
diff -u -r1.2.8.2 Makefile
--- Makefile 1997/05/23 07:47:07 1.2.8.2
+++ Makefile 1997/06/26 08:20:13
@@ -14,7 +14,7 @@
nfs_prot.h: ${NFS_PROT_X}
${RPCCOM} -h ${NFS_PROT_X} -o ${.TARGET}
-${OBJS} beforedepend: nfs_prot.h
-
.include "../../Makefile.inc"
.include <bsd.prog.mk>
+
+${OBJS} beforedepend: nfs_prot.h
Index: src/usr.bin/tip/libacu/Makefile
===================================================================
RCS file: /usr/cvs/src/usr.bin/tip/libacu/Makefile,v
retrieving revision 1.3
diff -u -r1.3 Makefile
--- Makefile 1995/04/01 09:14:32 1.3
+++ Makefile 1997/06/26 08:29:32
@@ -4,8 +4,6 @@
multitech.c t3000.c tod.c unidialer.c v3451.c v831.c ventel.c
NOPROFILE= yes
-$(OBJS): ${.CURDIR}/../tip/tipconf.h
-
install:
@echo -n
>Audit-Trail:
>Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199706260849.KAA00720>
