[syslinux] [PATCH] [RFC] Makefile: add mingw objects conditionally
Paul Bolle
pebolle at tiscali.nl
Fri Jan 27 02:16:27 PST 2012
Signed-off-by: Paul Bolle <pebolle at tiscali.nl>
---
0) If I build syslinux on a system without mingw a (successful) build
will end with:
ls: cannot access win32/syslinux.exe: No such file or directory
ls: cannot access win64/syslinux64.exe: No such file or directory
[...]
make: [all] Error 2 (ignored)
Ie, it ends with an ignored error. That's confusing (and a bit
annoying).
1) This simple patch makes this error go away. It is sent as an RFC because:
- I don't have mingw installed: I'm not sure whether I broke something
or not;
- find-mingw32.sh and find-mingw64.sh are now called twice during the
build. It would be nice if they were only called once, but I'm a bit
uncomfortable with editing Makefiles and therefore I wanted to keep my
changes small.
Makefile | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)
diff --git a/Makefile b/Makefile
index 48b3420..dfd50c1 100644
--- a/Makefile
+++ b/Makefile
@@ -43,9 +43,14 @@ BOBJECTS = $(BTARGET) \
mbr/*.bin \
core/pxelinux.0 core/isolinux.bin core/isolinux-debug.bin \
gpxe/gpxelinux.0 dos/syslinux.com \
- win32/syslinux.exe win64/syslinux64.exe \
dosutil/*.com dosutil/*.sys \
$(MODULES)
+ifeq ($(shell win32/find-mingw32.sh gcc >/dev/null 2>&1 ; echo $$?), 0)
+BOBJECTS += win32/syslinux.exe
+endif
+ifeq ($(shell win64/find-mingw64.sh gcc >/dev/null 2>&1 ; echo $$?), 0)
+BOBJECTS += win64/syslinux64.exe
+endif
# BSUBDIRs build the on-target binary components.
# ISUBDIRs build the installer (host) components.
--
1.7.7.6
More information about the Syslinux
mailing list