[syslinux:elflink] ldlinux: Don't delete ldlinux.c32 with ' make clean'

syslinux-bot for Matt Fleming matt.fleming at intel.com
Fri Jan 4 03:48:07 PST 2013


Commit-ID:  e1680d483ead4a0afdc672ce9c5c7942941f985b
Gitweb:     http://www.syslinux.org/commit/e1680d483ead4a0afdc672ce9c5c7942941f985b
Author:     Matt Fleming <matt.fleming at intel.com>
AuthorDate: Fri, 4 Jan 2013 11:33:21 +0000
Committer:  Matt Fleming <matt.fleming at intel.com>
CommitDate: Fri, 4 Jan 2013 11:43:53 +0000

ldlinux: Don't delete ldlinux.c32 with 'make clean'

The documented command sequence for distributions wishing to package a
Syslinux release is,

	 make clean
	 make installer

Unfortunately, becaues ldlinux.c32 is deleted by 'make clean' the
installer target fails like so,

make[1]: *** No rule to make target `../com32/elflink/ldlinux/ldlinux.c32', needed by `ldlinuxc32_bin.c'.  Stop.
make: *** [installer] Error 2

Follow the example set by core/Makefile for ldlinux.sys, etc and add
any build files that are required by the installers to
$(BTARGET). $(BTARGET) only gets deleted when running 'make spotless'.

Reported-by: László Házy <hazy_l at yahoo.com>
Signed-off-by: Matt Fleming <matt.fleming at intel.com>

---
 com32/elflink/ldlinux/Makefile | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/com32/elflink/ldlinux/Makefile b/com32/elflink/ldlinux/Makefile
index 43ea632..fa53226 100644
--- a/com32/elflink/ldlinux/Makefile
+++ b/com32/elflink/ldlinux/Makefile
@@ -17,7 +17,9 @@ include $(MAKEDIR)/elf.mk
 CFLAGS += -I$(topdir)/core/elflink -I$(topdir)/core/include -I$(topdir)/com32/lib -fvisibility=hidden
 LIBS = --whole-archive $(com32)/lib/libcom32min.a
 
-all: ldlinux.c32 ldlinux_lnx.a
+BTARGET = ldlinux.c32
+
+all: $(BTARGET) ldlinux_lnx.a
 
 ldlinux.c32 : ldlinux.o cli.o readconfig.o refstr.o colors.o getadv.o \
 		adv.o execute.o chainboot.o kernel.o get_key.o \
@@ -35,14 +37,14 @@ tidy dist:
 	rm -f *.o *.lo *.a *.lst .*.d 
 
 clean: tidy
-	rm -f *.lss *.lnx *.com *.c32
+	rm -f *.lss *.lnx *.com
 
 spotless: clean
-	rm -f *~ \#*
+	rm -f *~ \#* $(BTARGET)
 
 install: all
 	mkdir -m 755 -p $(INSTALLROOT)$(AUXDIR)
-	install -m 644 ldlinux.c32 $(INSTALLROOT)$(AUXDIR)
+	install -m 644 $(BTARGET) $(INSTALLROOT)$(AUXDIR)
 
 
 -include .*.d


More information about the Syslinux-commits mailing list