Merged revisions 96681,96683-96686,96689-96692,96698-96701,96705,96708,96710,96712...
[official-gcc.git] / fixincludes / Makefile.in
blob54382cc80214f4a6f8ac5ac017d84695feef0349
1 # Makefile for fixincludes.
3 # Copyright (C) 1998, 1999, 2000, 2001, 2003, 2004
4 # Free Software Foundation, Inc.
6 #This file is part of fixincludes.
8 #fixincludes is free software; you can redistribute it and/or modify
9 #it under the terms of the GNU General Public License as published by
10 #the Free Software Foundation; either version 2, or (at your option)
11 #any later version.
13 #fixincludes is distributed in the hope that it will be useful,
14 #but WITHOUT ANY WARRANTY; without even the implied warranty of
15 #MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 #GNU General Public License for more details.
18 #You should have received a copy of the GNU General Public License
19 #along with fixincludes; see the file COPYING. If not, write to
20 #the Free Software Foundation, 59 Temple Place - Suite 330,
21 #Boston, MA 02111-1307, USA.
23 SHELL=@SHELL@
25 # Some versions of `touch' (such as the version on Solaris 2.8)
26 # do not correctly set the timestamp due to buggy versions of `utime'
27 # in the kernel. So, we use `echo' instead.
28 STAMP = echo timestamp >
30 CC = @CC@
31 CFLAGS = @CFLAGS@
32 LDFLAGS = @LDFLAGS@
33 INCLUDES = -I. -I$(srcdir) -I../include -I$(srcdir)/../include
34 FIXINC_CFLAGS = -DHAVE_CONFIG_H $(INCLUDES)
36 # Directory where sources are, from where we are.
37 srcdir = @srcdir@
38 VPATH = $(srcdir)
40 # Directory in which to put the directories used by the compiler.
41 libdir = @libdir@
42 # Directory in which GCC puts its executables.
43 libexecdir = @libexecdir@
45 # End of variables for you to override.
47 # The target that we're configured for.
48 target = @target@
49 target_noncanonical:=@target_noncanonical@
51 # The version of GCC in this tree
52 gcc_version := $(shell cat $(srcdir)/../gcc/BASE-VER)
54 # Directory in which the compiler finds libraries etc.
55 libsubdir = $(libdir)/gcc/$(target_noncanonical)/$(gcc_version)
56 # Directory in which the compiler finds executables
57 libexecsubdir = $(libexecdir)/gcc/$(target_noncanonical)/$(gcc_version)
58 # Where our executable files go
59 itoolsdir = $(libexecsubdir)/install-tools
60 # Where our data files go
61 itoolsdatadir = $(libsubdir)/install-tools
63 # Locate mkinstalldirs.
64 mkinstalldirs=$(SHELL) $(srcdir)/../mkinstalldirs
66 default : all
68 # Now figure out from those variables how to compile and link.
70 .c.o:
71 $(CC) -c $(CFLAGS) $(CPPFLAGS) $(FIXINC_CFLAGS) $<
73 # The only suffixes we want for implicit rules are .c and .o.
74 .SUFFIXES:
75 .SUFFIXES: .c .o
77 #\f
79 ## # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
81 ## Makefile for constructing the "best" include fixer we can
83 ## # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
85 LIBIBERTY=../libiberty/libiberty.a
87 ALLOBJ = fixincl.o fixtests.o fixfixes.o server.o procopen.o \
88 fixlib.o fixopts.o
90 TESTOBJ = fixincl.o fixlib.o fixtests.o fixopts.o
91 FIXOBJ = fixfixes.o fixlib.o fixopts.o
93 HDR = server.h fixlib.h
94 FI = fixincl@EXEEXT@
95 AF = applyfix@EXEEXT@
97 all : @TARGET@ fixinc.sh mkheaders
98 gen : $(srcdir)/fixincl.x
101 oneprocess : full-stamp
102 twoprocess : test-stamp $(AF)
104 full-stamp : $(ALLOBJ) $(LIBIBERTY)
105 $(CC) $(CFLAGS) $(LDFLAGS) -o $(FI) $(ALLOBJ) $(LIBIBERTY)
106 $(STAMP) $@
108 test-stamp : $(TESTOBJ) $(LIBIBERTY)
109 $(CC) $(CFLAGS) $(LDFLAGS) -o $(FI) $(TESTOBJ) $(LIBIBERTY)
110 $(STAMP) $@
112 $(AF): $(FIXOBJ) $(LIBIBERTY)
113 $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(FIXOBJ) $(LIBIBERTY)
115 $(ALLOBJ) : $(HDR)
116 fixincl.o : fixincl.c $(srcdir)/fixincl.x
117 fixtests.o : fixtests.c
118 fixfixes.o : fixfixes.c $(srcdir)/fixincl.x
119 server.o : server.c
120 procopen.o : procopen.c
121 fixlib.o : fixlib.c
123 fixinc.sh : fixinc.in mkfixinc.sh Makefile
124 srcdir="$(srcdir)" $(SHELL) $(srcdir)/mkfixinc.sh $(target)
126 $(srcdir)/fixincl.x: @MAINT@ fixincl.tpl inclhack.def
127 cd $(srcdir) ; $(SHELL) ./genfixes
129 mostlyclean :
130 rm -f *.o *-stamp $(AF) $(FI) *~ fixinc.sh
132 clean: mostlyclean
133 rm -f mkheaders mkheaders.almost
135 distclean: clean
136 rm -f Makefile config.h config.log config.status stamp-h
138 maintainer-clean: distclean
139 rm -f $(srcdir)/fixincl.x
141 distclean : clean
143 Makefile: $(srcdir)/Makefile.in config.status
144 $(SHELL) ./config.status Makefile
146 mkheaders.almost: $(srcdir)/mkheaders.in config.status
147 CONFIG_FILES=mkheaders.almost:mkheaders.in \
148 CONFIG_HEADERS= ./config.status
150 mkheaders: mkheaders.almost $(srcdir)/../gcc/BASE-VER
151 sed -e 's/@gcc_version@/$(gcc_version)/' < $< > $@T
152 mv -f $@T $@
154 config.h: stamp-h
155 stamp-h: $(srcdir)/config.h.in config.status
156 $(SHELL) ./config.status config.h
158 config.status: $(srcdir)/configure
159 $(SHELL) ./config.status --recheck
161 $(srcdir)/configure: @MAINT@ $(srcdir)/configure.ac
162 autoconf
164 $(srcdir)/config.h.in: @MAINT@ $(srcdir)/configure.ac
165 autoheader
167 $(srcdir)/aclocal.m4: @MAINT@ $(srcdir)/../gcc/aclocal.m4
168 cp $(srcdir)/../gcc/aclocal.m4 .
170 check : all
171 autogen -T $(srcdir)/check.tpl $(srcdir)/inclhack.def
172 $(SHELL) ./check.sh $(srcdir)/tests/base
173 @rm -f ./check.sh
175 install : all
176 -rm -rf $(DESTDIR)$(itoolsdir)
177 $(mkinstalldirs) $(DESTDIR)$(itoolsdir)
178 $(mkinstalldirs) $(DESTDIR)$(itoolsdatadir)/include
179 $(INSTALL_DATA) $(srcdir)/README-fixinc \
180 $(DESTDIR)$(itoolsdatadir)/include/README
181 $(INSTALL_SCRIPT) fixinc.sh $(DESTDIR)$(itoolsdir)/fixinc.sh
182 $(INSTALL_PROGRAM) fixincl@EXEEXT@ \
183 $(DESTDIR)$(itoolsdir)/fixincl@EXEEXT@
184 $(INSTALL_SCRIPT) mkheaders $(DESTDIR)$(itoolsdir)/mkheaders
186 dvi :
187 info :
188 html :
189 installcheck :