aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatt Fleming <matt.fleming@intel.com>2012-11-06 12:55:28 +0000
committerMatt Fleming <matt.fleming@intel.com>2012-11-09 15:59:54 +0000
commitba1f0dd888474d80a82e4c97367cc789e67b1333 (patch)
treeb721feb1a9c7f4faf202376f301bd9035eeb950f
parent1d2ad3054aa1e91a30e613b820d5145914177d21 (diff)
downloadsyslinux-ba1f0dd888474d80a82e4c97367cc789e67b1333.tar.gz
syslinux-ba1f0dd888474d80a82e4c97367cc789e67b1333.tar.xz
syslinux-ba1f0dd888474d80a82e4c97367cc789e67b1333.zip
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@intel.com>
-rw-r--r--Makefile21
1 files changed, 12 insertions, 9 deletions
diff --git a/Makefile b/Makefile
index 32b7e5f9..57b1846c 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 $< $@ '< := @'