make-w32
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

MinGW patch for make


From: John Cronin
Subject: MinGW patch for make
Date: Wed, 11 Sep 2002 17:10:45 +0100

Here is my patch to allow make to compile on MinGW with the MSYS environment.

However there is still a problem in hash.h:

#define STRING_COMPARE(X, Y, RESULT) do { \
  _RESULT_ = strcmp ((X), (Y)); \
} while (0)

does still give an undefined symbol on _RESULT_ (both here and in two other
places, STRINGN_COMPARE and ISTRING_COMPARE).  Now I see no mention of _RESULT_
anywhere apart from being assigned a value in these three functions.  As I don't
have another windows compiler, I can't test it with the static makefiles, but it
does really seem to me that it is supposed to be RESULT (no underscores).  I
have found this in 3.80rc1, 3.80rc2 and CVS.  The patch doesn't alter this, and
so as a consequence, it still won't build, but I await a response on this before
I try to change anything.



But anyway, on with the patch (apply with -p1):

diff -Naur make-3.80rc2/Makefile.am make-3.80rc2-jc/Makefile.am
--- make-3.80rc2/Makefile.am    Thu Jul 11 07:38:57 2002
+++ make-3.80rc2-jc/Makefile.am Wed Sep 11 16:51:49 2002
@@ -13,24 +13,38 @@
   remote =     remote-stub.c
 endif

+if MINGW
+  w32_include = -I$(top_srcdir)/w32/include
+  w32_sources = w32/pathstuff.c w32/compat/dirent.c w32/subproc/sub_proc.c \
+               w32/subproc/w32err.c
+  w32_misc =   w32misc.o
+endif
+
 make_SOURCES = ar.c arscan.c commands.c default.c dir.c expand.c file.c \
                function.c getopt.c getopt1.c implicit.c job.c main.c \
                misc.c read.c remake.c $(remote) rule.c signame.c \
-               variable.c version.c vpath.c hash.c
+               variable.c version.c vpath.c hash.c $(w32_sources)

 EXTRA_make_SOURCES = remote-stub.c remote-cstms.c

 noinst_HEADERS = commands.h dep.h filedef.h job.h make.h rule.h variable.h \
                debug.h getopt.h gettext.h hash.h

-make_LDADD =   @LIBOBJS@ @ALLOCA@ $(GLOBLIB) @GETLOADAVG_LIBS@ @LIBINTL@
+make_LDADD =   @LIBOBJS@ @ALLOCA@ $(w32_misc) $(GLOBLIB) @GETLOADAVG_LIBS@ \
+               @LIBINTL@

 man_MANS =     make.1

 DEFS
=               -DLOCALEDIR=\"$(localedir)\" -DLIBDIR=\"$(libdir)\" 
-DINCLUDEDIR=\"$(included
ir)\" @DEFS@

-AM_CPPFLAGS =  $(GLOBINC)
+AM_CPPFLAGS =  $(GLOBINC) $(w32_include)
+
+# How to build w32/subproc/misc.c
+# We need this to build it to w32misc.o (there is already a misc.c which builds
+# to misc.o in the toplevel directory)

+w32misc.o:
+       $(COMPILE) -c -o w32misc.o w32/subproc/misc.c

 # Extra stuff to include in the distribution.
 # Note we need all the glob stuff here, rather than in glob/Makefile.am,
diff -Naur make-3.80rc2/configure.in make-3.80rc2-jc/configure.in
--- make-3.80rc2/configure.in   Tue Sep 10 08:27:29 2002
+++ make-3.80rc2-jc/configure.in        Wed Sep 11 16:48:23 2002
@@ -58,6 +58,13 @@
 AC_TYPE_UID_T
 AC_TYPE_PID_T

+# See if we're building on the MinGW/MSYS combination
+if test "$host_os" = "mingw32"; then
+AC_DEFINE(WINDOWS32, 1, [Define if building on the MinGW/MSYS combination])
+fi
+
+AM_CONDITIONAL(MINGW, test "$host_os" = "mingw32")
+
 # Find some definition for uintmax_t

 AC_CHECK_TYPE(uintmax_t,,[


-----
John.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]