[syslinux:firmware] Makefile: Correct version.mk path

syslinux-bot for Matt Fleming matt.fleming at intel.com
Fri Nov 9 09:06:35 PST 2012


Commit-ID:  ba1f0dd888474d80a82e4c97367cc789e67b1333
Gitweb:     http://www.syslinux.org/commit/ba1f0dd888474d80a82e4c97367cc789e67b1333
Author:     Matt Fleming <matt.fleming at intel.com>
AuthorDate: Tue, 6 Nov 2012 12:55:28 +0000
Committer:  Matt Fleming <matt.fleming at intel.com>
CommitDate: Fri, 9 Nov 2012 15:59:54 +0000

Makefile: Correct version.mk path

Each firmware generates its own version.mk, but they're all exactly
the same. Place a single version.mk in the top-level output directory
(as specified with the O= command line argument) so that this can be
included by Makefile.private.

Signed-off-by: Matt Fleming <matt.fleming at intel.com>

---
 Makefile |   21 ++++++++++++---------
 1 files changed, 12 insertions(+), 9 deletions(-)

diff --git a/Makefile b/Makefile
index 32b7e5f..57b1846 100644
--- a/Makefile
+++ b/Makefile
@@ -50,8 +50,9 @@ $(if $(cd-output),, \
 # make,
 #
 # 'topdir' - the top-level directory containing the Syslinux source
-# 'objdir' - the top-level directory of output files
+# 'objdir' - the top-level directory of output files for this firmware
 # 'MAKEDIR' - contains Makefile fragments
+# 'OBJDIR' - the top-level directory of output files
 #
 # There are also a handful of variables that are passed to each
 # sub-make,
@@ -66,7 +67,9 @@ $(if $(cd-output),, \
 #
 
 MAKEDIR = $(topdir)/mk
-export MAKEDIR topdir
+export MAKEDIR topdir OBJDIR
+
+-include $(OBJDIR)/version.mk
 
 ifeq ($(MAKECMDGOALS),)
 	MAKECMDGOALS += all
@@ -98,7 +101,6 @@ $(MAKECMDGOALS):
 else # ifeq ($(topdir),)
 
 include $(MAKEDIR)/syslinux.mk
--include $(topdir)/version.mk
 
 #
 # The BTARGET refers to objects that are derived from ldlinux.asm; we
@@ -133,7 +135,7 @@ INSTALLABLE_MODULES = $(filter-out com32/gpllib%,$(MODULES))
 
 # syslinux.exe is BTARGET so as to not require everyone to have the
 # mingw suite installed
-BTARGET  = version.gen version.h version.mk
+BTARGET  = version.gen version.h $(OBJDIR)/version.mk
 BOBJECTS = $(BTARGET) \
 	mbr/*.bin \
 	core/pxelinux.0 core/isolinux.bin core/isolinux-debug.bin \
@@ -292,8 +294,6 @@ version.gen: $(topdir)/version $(topdir)/version.pl
 	$(PERL) $(topdir)/version.pl $< $@ '%define < @'
 version.h: $(topdir)/version $(topdir)/version.pl
 	$(PERL) $(topdir)/version.pl $< $@ '#define < @'
-version.mk: $(topdir)/version $(topdir)/version.pl
-	$(PERL) $(topdir)/version.pl $< $@ '< := @'
 
 local-install: installer
 	mkdir -m 755 -p $(INSTALLROOT)$(BINDIR)
@@ -365,7 +365,10 @@ klibc:
 	$(MAKE) CC=klcc ITARGET= ISUBDIRS='linux extlinux' BSUBDIRS=
 endif # ifeq ($(HAVE_FIRMWARE),)
 
-# Hook to add private Makefile targets for the maintainer.
--include $(topdir)/Makefile.private
-
 endif # ifeq ($(topdir),)
+
+#
+# Common rules that are needed by every invocation of make.
+#
+$(OBJDIR)/version.mk: $(topdir)/version $(topdir)/version.pl
+	$(PERL) $(topdir)/version.pl $< $@ '< := @'


More information about the Syslinux-commits mailing list