Paul Bolle
2012-Jan-27 10:16 UTC
[syslinux] [PATCH] [RFC] Makefile: add mingw objects conditionally
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
H. Peter Anvin
2012-Jan-27 18:39 UTC
[syslinux] [PATCH] [RFC] Makefile: add mingw objects conditionally
On 01/27/2012 02:16 AM, Paul Bolle wrote:> 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). >I'd rather not, because it would make it more likely that *I* might have problems building a real release and not notice. It might be worthwhile to print an explanation, though. -hpa