Be less hostile to building on a mingw-less system.
authorhpa <hpa>
Wed, 8 Dec 2004 19:28:05 +0000 (19:28 +0000)
committerhpa <hpa>
Wed, 8 Dec 2004 19:28:05 +0000 (19:28 +0000)
Makefile
NEWS
win32/Makefile

index f23ec15..f77f259 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -95,11 +95,11 @@ ISUBDIRS = sample com32
 
 all:   $(BTARGET) $(ITARGET)
        for i in $(BSUBDIRS) $(ISUBDIRS) ; do $(MAKE) -C $$i $@ ; done
-       ls -l $(BTARGET) $(ITARGET) memdisk/memdisk
+       -ls -l $(BTARGET) $(ITARGET) memdisk/memdisk
 
 installer: $(ITARGET)
        for i in $(ISUBDIRS); do $(MAKE) -C $$i all ; done
-       ls -l $(BTARGET) $(ITARGET)
+       -ls -l $(BTARGET) $(ITARGET)
 
 version.gen: version version.pl
        $(PERL) version.pl version
diff --git a/NEWS b/NEWS
index 152445a..a3a0849 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -9,6 +9,8 @@ Changes in 2.12:
          programs.
        * MEMDISK: Work around a linker bug by rearranging the code to
          not use the linker for the 16-bit code.
+       * SYSLINUX: If we're building on a machine without a Win32
+         (mingw) compiler, just skip building syslinux.exe.
 
 Changes in 2.11:
        * ALL: Add an API call to get the configuration file name.
index fd890ec..3106d6b 100644 (file)
@@ -36,6 +36,8 @@ CC       = mingw-gcc
 AR      = mingw-ar
 RANLIB   = mingw-ranlib
 endif
+CC_IS_GOOD := $(shell $(CC) $(CFLAGS) $(LDFLAGS) -o hello.exe hello.c >/dev/null 2>&1 ; echo $$?)
+
 CFLAGS   = -W -Wall -O2 -fomit-frame-pointer -D_FILE_OFFSET_BITS=64
 PIC      =
 LDFLAGS  = -O2 -s
@@ -52,7 +54,12 @@ VERSION  = $(shell cat ../version)
 .c.i:
        $(CC) $(INCLUDE) $(CFLAGS) -E -o $@ $<
 
+ifeq ($(CC_IS_GOOD),0)
 all: ../syslinux.exe
+else
+all:   # We don't have a working win32 compiler
+       rm -f ../syslinux.exe
+endif
 
 libsyslinux.a: bootsect_bin.o ldlinux_bin.o syslxmod.o
        rm -f $@