Merge from the pain train
[official-gcc.git] / fixincludes / Makefile.in
blob1383ef61b61a76916c647e101287037536480b8a
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=@gcc_version@
54 # Directory in which the compiler finds libraries etc.
55 libsubdir = $(libdir)/gcc/$(target_noncanonical)/$(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
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: $(srcdir)/mkheaders.in config.status
147 CONFIG_FILES=mkheaders CONFIG_HEADERS= ./config.status
149 config.h: stamp-h
150 stamp-h: $(srcdir)/config.h.in config.status
151 $(SHELL) ./config.status config.h
153 config.status: $(srcdir)/configure
154 $(SHELL) ./config.status --recheck
156 $(srcdir)/configure: @MAINT@ $(srcdir)/configure.ac
157 autoconf
159 $(srcdir)/config.h.in: @MAINT@ $(srcdir)/configure.ac
160 autoheader
162 $(srcdir)/aclocal.m4: @MAINT@ $(srcdir)/../gcc/aclocal.m4
163 cp $(srcdir)/../gcc/aclocal.m4 .
165 check : all
166 autogen -T $(srcdir)/check.tpl $(srcdir)/inclhack.def
167 $(SHELL) ./check.sh $(srcdir)/tests/base
168 @rm -f ./check.sh
170 install : all
171 -rm -rf $(DESTDIR)$(itoolsdir)
172 $(mkinstalldirs) $(DESTDIR)$(itoolsdir)
173 $(mkinstalldirs) $(DESTDIR)$(itoolsdatadir)/include
174 $(INSTALL_DATA) $(srcdir)/README-fixinc \
175 $(DESTDIR)$(itoolsdatadir)/include/README
176 $(INSTALL_SCRIPT) fixinc.sh $(DESTDIR)$(itoolsdir)/fixinc.sh
177 $(INSTALL_PROGRAM) fixincl@EXEEXT@ \
178 $(DESTDIR)$(itoolsdir)/fixincl@EXEEXT@
179 $(INSTALL_SCRIPT) mkheaders $(DESTDIR)$(itoolsdir)/mkheaders
181 dvi :
182 info :
183 html :
184 installcheck :