* fixinc/Makefile.in (FIXINC_DEFS): Add -DHAVE_CONFIG_H.
[official-gcc.git] / gcc / fixinc / Makefile.in
blob6557595a7d7da07ef5e7878d35808f088e41c472
1 # Makefile for GNU compilers.
3 # Copyright (C) 1998, 1999, 2000 Free Software Foundation, Inc.
5 #This file is part of GNU CC.
7 #GNU CC is free software; you can redistribute it and/or modify
8 #it under the terms of the GNU General Public License as published by
9 #the Free Software Foundation; either version 2, or (at your option)
10 #any later version.
12 #GNU CC is distributed in the hope that it will be useful,
13 #but WITHOUT ANY WARRANTY; without even the implied warranty of
14 #MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 #GNU General Public License for more details.
17 #You should have received a copy of the GNU General Public License
18 #along with GNU CC; see the file COPYING. If not, write to
19 #the Free Software Foundation, 59 Temple Place - Suite 330,
20 #Boston, MA 02111-1307, USA.
22 # The makefile built from this file lives in the fixinc subdirectory.
23 # Its purpose is to build the any-platforms fixinc.sh script.
25 FL_LIST = $(CFLAGS) $(CPPFLAGS) $(WARN_CFLAGS)
26 FIXINC_DEFS = -DIN_GCC -DHAVE_CONFIG_H $(FL_LIST) $(INCLUDES)
28 # Directory where sources are, from where we are.
29 srcdir = @srcdir@
30 VPATH = $(srcdir)
31 subdir = fixinc
33 # End of variables for you to override.
35 default : all
37 # Now figure out from those variables how to compile and link.
39 # Specify the directories to be searched for header files.
40 # Both . and srcdir are used, in that order.
42 INCLUDES = -I. -I.. -I$(srcdir) -I$(srcdir)/.. \
43 -I$(srcdir)/../config -I$(srcdir)/../../include
45 # Always use -I$(srcdir)/config when compiling.
46 .c.o:
47 $(CC) -c $(FIXINC_DEFS) $<
49 # The only suffixes we want for implicit rules are .c and .o.
50 .SUFFIXES:
51 .SUFFIXES: .c .o
53 #\f
55 ## # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
57 ## Makefile for constructing the "best" include fixer we can
59 ## # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
61 LIBERTY = ../../libiberty/libiberty.a
63 ALLOBJ = fixincl.o fixtests.o fixfixes.o server.o procopen.o \
64 gnu-regex.o fixlib.o
66 TESTOBJ = fixincl.o fixlib.o fixtests.o gnu-regex.o
67 FIXOBJ = fixfixes.o fixlib.o gnu-regex.o
69 HDR = server.h gnu-regex.h fixlib.h machname.h
70 FI = fixincl@build_exeext@
71 AF = applyfix@build_exeext@
73 all : $(TARGETS)
74 gen : $(srcdir)/fixincl.x
76 oneprocess : full-stamp
77 twoprocess : test-stamp $(AF)
79 full-stamp : $(ALLOBJ) $(LIBERTY)
80 $(CC) $(FIXINC_DEFS) $(LDFLAGS) -o $(FI) $(ALLOBJ) $(LIBERTY)
81 touch $@
83 test-stamp : $(TESTOBJ) $(LIBERTY)
84 $(CC) $(FIXINC_DEFS) $(LDFLAGS) -o $(FI) $(TESTOBJ) $(LIBERTY)
85 touch $@
87 $(AF): $(FIXOBJ) $(LIBERTY)
88 $(CC) $(FIXINC_DEFS) $(LDFLAGS) -o $@ $(FIXOBJ) $(LIBERTY)
90 $(ALLOBJ) : $(HDR)
91 fixincl.o : fixincl.c $(srcdir)/fixincl.x
92 fixtests.o : fixtests.c
93 fixfixes.o : fixfixes.c $(srcdir)/fixincl.x
94 server.o : server.c
95 procopen.o : procopen.c
96 gnu-regex.o : gnu-regex.c
97 fixlib.o : fixlib.c
99 # 'machname.h' is built in the build directory.
100 # 'fixincl.x' in the source dir.
102 machname.h: ../specs
103 $(SHELL) $(srcdir)/genfixes $@
105 $(srcdir)/fixincl.x: fixincl.tpl inclhack.def
106 cd $(srcdir) ; $(SHELL) ./genfixes $@
108 clean:
109 rm -f *.o *-stamp $(AF) $(FI) machname.h *~
111 maintainer-clean : clean
112 rm -f $(srcdir)/fixincl.x
114 # Build the executable and copy up into gcc dir.
115 # We still copy the script because we still have alternative scripts.
117 install-bin : $(TARGETS)
118 ./fixincl -v
119 @if [ -f ../fixinc.sh ] ; then rm -f ../fixinc.sh || \
120 mv -f ../fixinc.sh ../fixinc.sh.$$ || exit 1 ; else : ; fi
121 @cp $(srcdir)/fixincl.sh ../fixinc.sh
122 chmod 755 ../fixinc.sh
124 Makefile: Makefile.in ../config.status
125 cd .. \
126 && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= \
127 $(SHELL) ./config.status
129 check : $(TARGETS)
130 autogen -T $(srcdir)/check.tpl $(srcdir)/inclhack.def
131 $(SHELL) ./check.sh $(srcdir)/tests/base
132 @rm -f ./check.sh