This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

PATCH: minor fixincludes cleanups


It gets rid of __MSDOS__ and SEPARATE_FIX_PROC defines in 
Makefile.DOS, because __MSDOS__ is always set by preprocessor 
itself, and SEPARATE_FIX_PROC can be set in sources too, depending
on __MSDOS__.

Also it makes Makefile.in use $(build_exeext), which will be
required if this file is going to be used for DOS, BeOS, etc.

My longer term plan is to autoconfiscate tests for fork() and pipe(),
and set SEPARATE_FIX_PROC if they are not found, and not by per-platform
basis. Also most mkfixinc.sh (choosing the right fixer and its build
method) should be moved into configure, and gcc/fixinc/Makefile.in made
as a fragment of gcc/Makefile.in.

Laurynas

2000-12-05  Laurynas Biveinis  <lauras@softhome.net>

	* fixinc/Makefile.DOS: remove -D__MSDOS__ -DSEPARATE_FIX_PROC
        from FIXINC_DEFS.
	* fixinc/Makefile.in: let configure define build_exeext. New
        variable, FIXINCL. Set and use it instead of fixincl.
	* fixinc/fixfixes.c: define SEPARATE_FIX_PROC if __MSDOS__ defined.
	* fixinc/fixincl.c: likewise.
	* fixinc/fixlib.h: likewise.
	* fixinc/fixlib.c: likewise.


Index: fixinc/Makefile.DOS
===================================================================
RCS file: /cvs/gcc/egcs/gcc/fixinc/Makefile.DOS,v
retrieving revision 1.3
diff -u -r1.3 Makefile.DOS
--- Makefile.DOS        2000/12/04 18:16:04     1.3
+++ Makefile.DOS        2000/12/05 12:47:22
@@ -24,8 +24,7 @@
 # the DJGPP (aka MS-DOS) port of GCC.

 CFLAGS = -Wall -g -O2
-FIXINC_DEFS = -DIN_GCC $(CFLAGS) $(CPPFLAGS) $(INCLUDES) \
- -D__MSDOS__ -DSEPARATE_FIX_PROC
+FIXINC_DEFS = -DIN_GCC $(CFLAGS) $(CPPFLAGS) $(INCLUDES)

 CC = gcc
 SHELL = /bin/sh
Index: fixinc/Makefile.in
===================================================================
RCS file: /cvs/gcc/egcs/gcc/fixinc/Makefile.in,v
retrieving revision 1.26
diff -u -r1.26 Makefile.in
--- Makefile.in 2000/12/04 18:16:04     1.26
+++ Makefile.in 2000/12/05 12:47:24
@@ -25,6 +25,7 @@
 FIXINC_DEFS = -DIN_GCC $(CFLAGS) $(CPPFLAGS) $(INCLUDES)

 CC = @CC@
+build_exeext = @build_exeext@
 SHELL = /bin/sh

 target=@target@
@@ -67,12 +68,13 @@

 HDR = server.h gnu-regex.h fixlib.h machname.h

-TARGETS = fixincl
+FIXINCL = fixincl$(build_exeext)
+TARGETS = $(FIXINCL)

 all : $(TARGETS)
 gen : $(srcdir)/fixincl.x

-fixincl: $(OBJ) $(LIBERTY)
+$(FIXINCL): $(OBJ) $(LIBERTY)
        $(CC) $(FIXINC_DEFS) $(LDFLAGS) -o $@ $(OBJ) $(LIBERTY)

 $(OBJ)      : $(HDR)
@@ -94,7 +96,7 @@
        cd $(srcdir) ; $(SHELL) ./genfixes $@

 clean:
-       rm -f *.o $(TARGETS) machname.h *~ *.exe
+       rm -f *.o $(TARGETS) machname.h *~

 maintainer-clean : clean
        rm -f $(srcdir)/fixincl.x
@@ -102,7 +104,7 @@
 #  Build the executable and copy up into gcc dir.
 #  We still copy the script because we still have alternative scripts.
 #
-install-bin : fixincl
+install-bin : $(FIXINCL)
        ./fixincl -v
        @if [ -f ../fixinc.sh ] ; then rm -f ../fixinc.sh || \
            mv -f ../fixinc.sh ../fixinc.sh.$$ || exit 1 ; fi
@@ -118,7 +120,7 @@
          && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= \
          $(SHELL) ./config.status

-check : fixincl
+check : $(FIXINCL)
        autogen -T $(srcdir)/check.tpl $(srcdir)/inclhack.def
        $(SHELL) ./check.sh $(srcdir)/tests/base
        @rm -f ./check.sh
Index: fixinc/fixfixes.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/fixinc/fixfixes.c,v
retrieving revision 1.38
diff -u -r1.38 fixfixes.c
--- fixfixes.c  2000/12/02 19:46:32     1.38
+++ fixfixes.c  2000/12/05 12:47:33
@@ -60,6 +60,11 @@
 #include "fixlib.h"
 #define    GTYPE_SE_CT 1

+/* On some systems, we use separate executables.  */
+#ifdef __MSDOS__
+#define SEPARATE_FIX_PROC
+#endif
+
 #ifdef SEPARATE_FIX_PROC
 #include "fixincl.x"
 #endif
Index: fixinc/fixincl.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/fixinc/fixincl.c,v
retrieving revision 1.44
diff -u -r1.44 fixincl.c
--- fixincl.c   2000/12/02 19:46:32     1.44
+++ fixincl.c   2000/12/05 12:47:42
@@ -29,6 +29,11 @@
 #define  BAD_ADDR ((void*)-1)
 #endif

+/* On some systems, we use separate executables.  */
+#ifdef __MSDOS__
+#define SEPARATE_FIX_PROC
+#endif
+
 #include <signal.h>
 #ifndef SEPARATE_FIX_PROC
 #include "server.h"
Index: fixinc/fixlib.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/fixinc/fixlib.c,v
retrieving revision 1.15
diff -u -r1.15 fixlib.c
--- fixlib.c    2000/12/02 19:46:32     1.15
+++ fixlib.c    2000/12/05 12:48:17
@@ -24,6 +24,11 @@

 #include "fixlib.h"

+/* On some systems, we use separate executables.  */
+#ifdef __MSDOS__
+#define SEPARATE_FIX_PROC
+#endif
+
 /* * * * * * * * * * * * *

    load_file_data loads all the contents of a file into malloc-ed memory.
Index: fixinc/fixlib.h
===================================================================
RCS file: /cvs/gcc/egcs/gcc/fixinc/fixlib.h,v
retrieving revision 1.19
diff -u -r1.19 fixlib.h
--- fixlib.h    2000/12/02 19:46:32     1.19
+++ fixlib.h    2000/12/05 12:48:18
@@ -33,6 +33,11 @@
 #include "machname.h"
 #include "libiberty.h"

+/* On some systems, we use separate executables.  */
+#ifdef __MSDOS__
+#define SEPARATE_FIX_PROC
+#endif
+
 #ifndef STDIN_FILENO
 # define STDIN_FILENO   0
 #endif

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]