diff mbox

fixincludes/Makefile for Interix Rev 2

Message ID 4DEDAAFB.8050302@gnat.com
State New
Headers show

Commit Message

Douglas B Rupp June 7, 2011, 4:37 a.m. UTC
Revised and retested patch attached.

OK to commit?

--Douglas Rupp
2011-06-06  Douglas B Rupp  <rupp@gnat.com>

	* fixincludes/configure.ac (host_makefile_frag): Use mh-interix.
	* fixincludes/configure: Regenerate
	* fixincludes/Makefile.in (FIXINC_CPPFLAGS): New flag macro.
	(@host_makefile_frag@): New substitution placeholder.
	(.c.o): Use FIXINC_CPPFLAGS.

Comments

Paolo Bonzini June 7, 2011, 7:20 a.m. UTC | #1
On 06/07/2011 06:37 AM, Douglas B Rupp wrote:
> Revised and retested patch attached.
>
> OK to commit?

It should be enough to add AC_USE_SYSTEM_EXTENSIONS to configure.ac 
instead (right after AC_PROG_CC).

Paolo
diff mbox

Patch

diff -rupN gcc.orig/fixincludes/configure.ac gcc/fixincludes/configure.ac
--- gcc.orig/fixincludes/configure.ac	2011-04-06 17:01:09.000000000 -0700
+++ gcc/fixincludes/configure.ac	2011-06-06 21:31:54.000000000 -0700
@@ -23,6 +23,16 @@ 
 # Determine the noncanonical target name, for directory use.
 ACX_NONCANONICAL_TARGET
 
+[host_makefile_frag=/dev/null
+if test -d ${srcdir}/../config ; then
+case "${host}" in
+  *-interix[3-9]*)
+    host_makefile_frag="${srcdir}/../config/mh-interix"
+    ;;
+esac
+fi]
+AC_SUBST_FILE(host_makefile_frag)
+
 # Specify the local prefix
 local_prefix=
 AC_ARG_WITH(local-prefix,
diff -rupN gcc.orig/fixincludes/Makefile.in gcc/fixincludes/Makefile.in
--- gcc.orig/fixincludes/Makefile.in	2011-04-06 17:01:09.000000000 -0700
+++ gcc/fixincludes/Makefile.in	2011-06-06 21:31:54.000000000 -0700
@@ -1,6 +1,6 @@ 
 # Makefile for fixincludes.
 #
-#   Copyright (C) 1998, 1999, 2000, 2001, 2003, 2004, 2009, 2010
+#   Copyright (C) 1998, 1999, 2000, 2001, 2003, 2004, 2009, 2010, 2011
 #   Free Software Foundation, Inc.
 
 #This file is part of fixincludes.
@@ -32,6 +32,11 @@ 
 LDFLAGS = @LDFLAGS@
 INCLUDES = -I. -I$(srcdir) -I../include -I$(srcdir)/../include
 FIXINC_CFLAGS = -DHAVE_CONFIG_H $(INCLUDES)
+FIXINC_CPPFLAGS =
+
+#### host specific makefile fragments come in here.
+@host_makefile_frag@
+###
 
 # Directory where sources are, from where we are.
 srcdir = @srcdir@
@@ -73,7 +78,7 @@ 
 # Now figure out from those variables how to compile and link.
 
 .c.o:
-	$(CC) -c $(CFLAGS) $(WARN_CFLAGS) $(CPPFLAGS) $(FIXINC_CFLAGS) $<
+	$(CC) -c $(CFLAGS) $(WARN_CFLAGS) $(CPPFLAGS) $(FIXINC_CPPFLAGS) $(FIXINC_CFLAGS) $<
 
 # The only suffixes we want for implicit rules are .c and .o.
 .SUFFIXES: