Hi:
I've been seeing intermittent build failures with the extlinux target,
and I believe I've tracked it down to a VPATH issue. See this make -d
log:
Finished prerequisites of target file `extlinux'.
Prerequisite `extlinux.o' is newer than target `extlinux'.
Prerequisite `setadv.o' is newer than target `extlinux'.
Prerequisite `extlinux_bss_bin.o' is newer than target `extlinux'.
Prerequisite `extlinux_sys_bin.o' is newer than target `extlinux'.
No need to remake target `extlinux'; using VPATH name `../extlinux'.
Since the CWD is named extlinux, and the VPATH includes '..', make is
using the timestamp on the '../extlinux' directory to decide whether to
remake the 'extlinux' executable.
I believe the included fix should resolve the issue. It tells make to
only use the VPATH for *.c and *.o files, which means the VPATH will not
be searched for the 'extlinux' executable.
In case my email client munges up the patch, here is a link:
www.zachcarter.com/extlinux-scrict-vpath.patch
diff --git a/extlinux/Makefile b/extlinux/Makefile
index f426702..f155012 100644
--- a/extlinux/Makefile
+++ b/extlinux/Makefile
@@ -17,7 +17,7 @@ OBJS = $(patsubst %.c,%.o,$(notdir $(SRCS)))
.SUFFIXES: .c .o .i .s .S
-VPATH = .:..:../libinstaller
+vpath %.c %.o .:..:../libinstaller
all: installer
Zach Carter wrote:> Hi: > > I've been seeing intermittent build failures with the extlinux target, > and I believe I've tracked it down to a VPATH issue. See this make -d > log: > > Finished prerequisites of target file `extlinux'. > Prerequisite `extlinux.o' is newer than target `extlinux'. > Prerequisite `setadv.o' is newer than target `extlinux'. > Prerequisite `extlinux_bss_bin.o' is newer than target `extlinux'. > Prerequisite `extlinux_sys_bin.o' is newer than target `extlinux'. > No need to remake target `extlinux'; using VPATH name `../extlinux'. > > Since the CWD is named extlinux, and the VPATH includes '..', make is > using the timestamp on the '../extlinux' directory to decide whether to > remake the 'extlinux' executable. > > I believe the included fix should resolve the issue. It tells make to > only use the VPATH for *.c and *.o files, which means the VPATH will not > be searched for the 'extlinux' executable. >Interesting, I wasn't familiar with that construct. Either way, I don't know how useful it is, since have massively revamped the Makefiles in the 3.70 branch of the Syslinux development tree (see Syslinux 3.70-pre12); this should hopefully avoid this problem as well. Even so, it's a useful construct that might come in handy. -hpa