]> git.ipfire.org Git - thirdparty/gcc.git/blame - fixincludes/Makefile.in
--(top level)--------------------------------------------
[thirdparty/gcc.git] / fixincludes / Makefile.in
CommitLineData
71b5d516 1# Makefile for fixincludes.
4839149c 2#
ad643a75
PB
3# Copyright (C) 1998, 1999, 2000, 2001, 2003, 2004
4# Free Software Foundation, Inc.
0083c904 5
71b5d516 6#This file is part of fixincludes.
0083c904 7
71b5d516 8#fixincludes is free software; you can redistribute it and/or modify
0083c904
BK
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.
12
71b5d516 13#fixincludes is distributed in the hope that it will be useful,
0083c904
BK
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.
17
18#You should have received a copy of the GNU General Public License
71b5d516 19#along with fixincludes; see the file COPYING. If not, write to
df065c82
KC
20#the Free Software Foundation, 51 Franklin Street, Fifth Floor,
21#Boston, MA 02110-1301, USA.
0083c904 22
b41e09a7 23SHELL=@SHELL@
d577781c 24
d9835ae8
MM
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.
28STAMP = echo timestamp >
29
71b5d516
PB
30CC = @CC@
31CFLAGS = @CFLAGS@
87fbb651 32WARN_CFLAGS = @WARN_CFLAGS@ @WARN_PEDANTIC@ @WERROR@
71b5d516
PB
33LDFLAGS = @LDFLAGS@
34INCLUDES = -I. -I$(srcdir) -I../include -I$(srcdir)/../include
35FIXINC_CFLAGS = -DHAVE_CONFIG_H $(INCLUDES)
0083c904 36
0083c904
BK
37# Directory where sources are, from where we are.
38srcdir = @srcdir@
4839149c 39VPATH = $(srcdir)
0083c904 40
53c7ffe7
GK
41# Directory in which to put the directories used by the compiler.
42libdir = @libdir@
43# Directory in which GCC puts its executables.
44libexecdir = @libexecdir@
45
0083c904
BK
46# End of variables for you to override.
47
53c7ffe7
GK
48# The target that we're configured for.
49target = @target@
50target_noncanonical:=@target_noncanonical@
51
52# The version of GCC in this tree
90ee1368 53gcc_version := $(shell cat $(srcdir)/../gcc/BASE-VER)
53c7ffe7
GK
54
55# Directory in which the compiler finds libraries etc.
90ee1368 56libsubdir = $(libdir)/gcc/$(target_noncanonical)/$(gcc_version)
53c7ffe7
GK
57# Directory in which the compiler finds executables
58libexecsubdir = $(libexecdir)/gcc/$(target_noncanonical)/$(gcc_version)
59# Where our executable files go
60itoolsdir = $(libexecsubdir)/install-tools
61# Where our data files go
62itoolsdatadir = $(libsubdir)/install-tools
63
64# Locate mkinstalldirs.
65mkinstalldirs=$(SHELL) $(srcdir)/../mkinstalldirs
66
35dfe415 67default : all
0083c904
BK
68
69# Now figure out from those variables how to compile and link.
70
0083c904 71.c.o:
87fbb651 72 $(CC) -c $(CFLAGS) $(WARN_CFLAGS) $(CPPFLAGS) $(FIXINC_CFLAGS) $<
0083c904
BK
73
74# The only suffixes we want for implicit rules are .c and .o.
75.SUFFIXES:
76.SUFFIXES: .c .o
77
78#\f
79
80## # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
81##
82## Makefile for constructing the "best" include fixer we can
83##
0083c904
BK
84## # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
85
71b5d516 86LIBIBERTY=../libiberty/libiberty.a
2629a114
BK
87
88ALLOBJ = fixincl.o fixtests.o fixfixes.o server.o procopen.o \
ad643a75 89 fixlib.o fixopts.o
5abc1f74 90
ad643a75
PB
91TESTOBJ = fixincl.o fixlib.o fixtests.o fixopts.o
92FIXOBJ = fixfixes.o fixlib.o fixopts.o
0083c904 93
89b8abbf 94HDR = server.h fixlib.h
71b5d516
PB
95FI = fixincl@EXEEXT@
96AF = applyfix@EXEEXT@
0083c904 97
53c7ffe7 98all : @TARGET@ fixinc.sh mkheaders
42cfed37 99gen : $(srcdir)/fixincl.x
0083c904 100
71b5d516 101
2629a114
BK
102oneprocess : full-stamp
103twoprocess : test-stamp $(AF)
104
71b5d516 105full-stamp : $(ALLOBJ) $(LIBIBERTY)
27f0dff4 106 $(CC) $(CFLAGS) $(LDFLAGS) -o $(FI) $(ALLOBJ) $(LIBIBERTY)
d9835ae8 107 $(STAMP) $@
2629a114 108
71b5d516 109test-stamp : $(TESTOBJ) $(LIBIBERTY)
27f0dff4 110 $(CC) $(CFLAGS) $(LDFLAGS) -o $(FI) $(TESTOBJ) $(LIBIBERTY)
d9835ae8 111 $(STAMP) $@
2629a114 112
71b5d516 113$(AF): $(FIXOBJ) $(LIBIBERTY)
27f0dff4 114 $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(FIXOBJ) $(LIBIBERTY)
0083c904 115
2629a114
BK
116$(ALLOBJ) : $(HDR)
117fixincl.o : fixincl.c $(srcdir)/fixincl.x
35dfe415 118fixtests.o : fixtests.c
2629a114 119fixfixes.o : fixfixes.c $(srcdir)/fixincl.x
35dfe415
BK
120server.o : server.c
121procopen.o : procopen.c
35dfe415 122fixlib.o : fixlib.c
7d7f30cf 123
53c7ffe7
GK
124fixinc.sh : fixinc.in mkfixinc.sh Makefile
125 srcdir="$(srcdir)" $(SHELL) $(srcdir)/mkfixinc.sh $(target)
126
86251d81 127$(srcdir)/fixincl.x: @MAINT@ fixincl.tpl inclhack.def
89b8abbf 128 cd $(srcdir) ; $(SHELL) ./genfixes
35dfe415 129
ea595d4f
GK
130mostlyclean :
131 rm -f *.o *-stamp $(AF) $(FI) *~ fixinc.sh
e1e0c658 132
54f88091 133clean: mostlyclean
90ee1368 134 rm -f mkheaders mkheaders.almost
54f88091
PB
135
136distclean: clean
137 rm -f Makefile config.h config.log config.status stamp-h
138
139maintainer-clean: distclean
e1e0c658 140 rm -f $(srcdir)/fixincl.x
0083c904 141
ea595d4f
GK
142distclean : clean
143
71b5d516
PB
144Makefile: $(srcdir)/Makefile.in config.status
145 $(SHELL) ./config.status Makefile
146
90ee1368
ZW
147mkheaders.almost: $(srcdir)/mkheaders.in config.status
148 CONFIG_FILES=mkheaders.almost:mkheaders.in \
149 CONFIG_HEADERS= ./config.status
150
151mkheaders: mkheaders.almost $(srcdir)/../gcc/BASE-VER
152 sed -e 's/@gcc_version@/$(gcc_version)/' < $< > $@T
153 mv -f $@T $@
53c7ffe7 154
71b5d516
PB
155config.h: stamp-h
156stamp-h: $(srcdir)/config.h.in config.status
157 $(SHELL) ./config.status config.h
158
159config.status: $(srcdir)/configure
160 $(SHELL) ./config.status --recheck
161
162$(srcdir)/configure: @MAINT@ $(srcdir)/configure.ac
c76e55ea 163 cd $(srcdir) && autoconf
71b5d516
PB
164
165$(srcdir)/config.h.in: @MAINT@ $(srcdir)/configure.ac
c76e55ea 166 cd $(srcdir) && autoheader
71b5d516
PB
167
168$(srcdir)/aclocal.m4: @MAINT@ $(srcdir)/../gcc/aclocal.m4
169 cp $(srcdir)/../gcc/aclocal.m4 .
170
171check : all
380c5d40 172 autogen -T $(srcdir)/check.tpl $(srcdir)/inclhack.def
1b813bfe
BK
173 $(SHELL) ./check.sh $(srcdir)/tests/base
174 @rm -f ./check.sh
53c7ffe7
GK
175
176install : all
177 -rm -rf $(DESTDIR)$(itoolsdir)
178 $(mkinstalldirs) $(DESTDIR)$(itoolsdir)
179 $(mkinstalldirs) $(DESTDIR)$(itoolsdatadir)/include
180 $(INSTALL_DATA) $(srcdir)/README-fixinc \
181 $(DESTDIR)$(itoolsdatadir)/include/README
182 $(INSTALL_SCRIPT) fixinc.sh $(DESTDIR)$(itoolsdir)/fixinc.sh
098b96ab
AP
183 $(INSTALL_PROGRAM) fixincl@EXEEXT@ \
184 $(DESTDIR)$(itoolsdir)/fixincl@EXEEXT@
53c7ffe7 185 $(INSTALL_SCRIPT) mkheaders $(DESTDIR)$(itoolsdir)/mkheaders
ea595d4f 186
ae022d32
CD
187.PHONY: dvi info html install-html
188
ea595d4f 189dvi :
b5422ad7 190pdf :
ea595d4f 191info :
251089a0 192html :
ae022d32 193install-html :
ea595d4f 194installcheck :