]> git.ipfire.org Git - thirdparty/gcc.git/blame - fixincludes/Makefile.in
Makefile.in: Set gcc_version directly, not via substitution.
[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
0083c904
BK
20#the Free Software Foundation, 59 Temple Place - Suite 330,
21#Boston, MA 02111-1307, USA.
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@
32LDFLAGS = @LDFLAGS@
33INCLUDES = -I. -I$(srcdir) -I../include -I$(srcdir)/../include
34FIXINC_CFLAGS = -DHAVE_CONFIG_H $(INCLUDES)
0083c904 35
0083c904
BK
36# Directory where sources are, from where we are.
37srcdir = @srcdir@
4839149c 38VPATH = $(srcdir)
0083c904 39
53c7ffe7
GK
40# Directory in which to put the directories used by the compiler.
41libdir = @libdir@
42# Directory in which GCC puts its executables.
43libexecdir = @libexecdir@
44
0083c904
BK
45# End of variables for you to override.
46
53c7ffe7
GK
47# The target that we're configured for.
48target = @target@
49target_noncanonical:=@target_noncanonical@
50
51# The version of GCC in this tree
90ee1368 52gcc_version := $(shell cat $(srcdir)/../gcc/BASE-VER)
53c7ffe7
GK
53
54# Directory in which the compiler finds libraries etc.
90ee1368 55libsubdir = $(libdir)/gcc/$(target_noncanonical)/$(gcc_version)
53c7ffe7
GK
56# Directory in which the compiler finds executables
57libexecsubdir = $(libexecdir)/gcc/$(target_noncanonical)/$(gcc_version)
58# Where our executable files go
59itoolsdir = $(libexecsubdir)/install-tools
60# Where our data files go
61itoolsdatadir = $(libsubdir)/install-tools
62
63# Locate mkinstalldirs.
64mkinstalldirs=$(SHELL) $(srcdir)/../mkinstalldirs
65
35dfe415 66default : all
0083c904
BK
67
68# Now figure out from those variables how to compile and link.
69
0083c904 70.c.o:
71b5d516 71 $(CC) -c $(CFLAGS) $(CPPFLAGS) $(FIXINC_CFLAGS) $<
0083c904
BK
72
73# The only suffixes we want for implicit rules are .c and .o.
74.SUFFIXES:
75.SUFFIXES: .c .o
76
77#\f
78
79## # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
80##
81## Makefile for constructing the "best" include fixer we can
82##
0083c904
BK
83## # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
84
71b5d516 85LIBIBERTY=../libiberty/libiberty.a
2629a114
BK
86
87ALLOBJ = fixincl.o fixtests.o fixfixes.o server.o procopen.o \
ad643a75 88 fixlib.o fixopts.o
5abc1f74 89
ad643a75
PB
90TESTOBJ = fixincl.o fixlib.o fixtests.o fixopts.o
91FIXOBJ = fixfixes.o fixlib.o fixopts.o
0083c904 92
89b8abbf 93HDR = server.h fixlib.h
71b5d516
PB
94FI = fixincl@EXEEXT@
95AF = applyfix@EXEEXT@
0083c904 96
53c7ffe7 97all : @TARGET@ fixinc.sh mkheaders
42cfed37 98gen : $(srcdir)/fixincl.x
0083c904 99
71b5d516 100
2629a114
BK
101oneprocess : full-stamp
102twoprocess : test-stamp $(AF)
103
71b5d516 104full-stamp : $(ALLOBJ) $(LIBIBERTY)
27f0dff4 105 $(CC) $(CFLAGS) $(LDFLAGS) -o $(FI) $(ALLOBJ) $(LIBIBERTY)
d9835ae8 106 $(STAMP) $@
2629a114 107
71b5d516 108test-stamp : $(TESTOBJ) $(LIBIBERTY)
27f0dff4 109 $(CC) $(CFLAGS) $(LDFLAGS) -o $(FI) $(TESTOBJ) $(LIBIBERTY)
d9835ae8 110 $(STAMP) $@
2629a114 111
71b5d516 112$(AF): $(FIXOBJ) $(LIBIBERTY)
27f0dff4 113 $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(FIXOBJ) $(LIBIBERTY)
0083c904 114
2629a114
BK
115$(ALLOBJ) : $(HDR)
116fixincl.o : fixincl.c $(srcdir)/fixincl.x
35dfe415 117fixtests.o : fixtests.c
2629a114 118fixfixes.o : fixfixes.c $(srcdir)/fixincl.x
35dfe415
BK
119server.o : server.c
120procopen.o : procopen.c
35dfe415 121fixlib.o : fixlib.c
7d7f30cf 122
53c7ffe7
GK
123fixinc.sh : fixinc.in mkfixinc.sh Makefile
124 srcdir="$(srcdir)" $(SHELL) $(srcdir)/mkfixinc.sh $(target)
125
86251d81 126$(srcdir)/fixincl.x: @MAINT@ fixincl.tpl inclhack.def
89b8abbf 127 cd $(srcdir) ; $(SHELL) ./genfixes
35dfe415 128
ea595d4f
GK
129mostlyclean :
130 rm -f *.o *-stamp $(AF) $(FI) *~ fixinc.sh
e1e0c658 131
54f88091 132clean: mostlyclean
90ee1368 133 rm -f mkheaders mkheaders.almost
54f88091
PB
134
135distclean: clean
136 rm -f Makefile config.h config.log config.status stamp-h
137
138maintainer-clean: distclean
e1e0c658 139 rm -f $(srcdir)/fixincl.x
0083c904 140
ea595d4f
GK
141distclean : clean
142
71b5d516
PB
143Makefile: $(srcdir)/Makefile.in config.status
144 $(SHELL) ./config.status Makefile
145
90ee1368
ZW
146mkheaders.almost: $(srcdir)/mkheaders.in config.status
147 CONFIG_FILES=mkheaders.almost:mkheaders.in \
148 CONFIG_HEADERS= ./config.status
149
150mkheaders: mkheaders.almost $(srcdir)/../gcc/BASE-VER
151 sed -e 's/@gcc_version@/$(gcc_version)/' < $< > $@T
152 mv -f $@T $@
53c7ffe7 153
71b5d516
PB
154config.h: stamp-h
155stamp-h: $(srcdir)/config.h.in config.status
156 $(SHELL) ./config.status config.h
157
158config.status: $(srcdir)/configure
159 $(SHELL) ./config.status --recheck
160
161$(srcdir)/configure: @MAINT@ $(srcdir)/configure.ac
162 autoconf
163
164$(srcdir)/config.h.in: @MAINT@ $(srcdir)/configure.ac
165 autoheader
166
167$(srcdir)/aclocal.m4: @MAINT@ $(srcdir)/../gcc/aclocal.m4
168 cp $(srcdir)/../gcc/aclocal.m4 .
169
170check : all
380c5d40 171 autogen -T $(srcdir)/check.tpl $(srcdir)/inclhack.def
1b813bfe
BK
172 $(SHELL) ./check.sh $(srcdir)/tests/base
173 @rm -f ./check.sh
53c7ffe7
GK
174
175install : 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
098b96ab
AP
182 $(INSTALL_PROGRAM) fixincl@EXEEXT@ \
183 $(DESTDIR)$(itoolsdir)/fixincl@EXEEXT@
53c7ffe7 184 $(INSTALL_SCRIPT) mkheaders $(DESTDIR)$(itoolsdir)/mkheaders
ea595d4f
GK
185
186dvi :
187info :
251089a0 188html :
ea595d4f 189installcheck :