]> git.ipfire.org Git - thirdparty/gcc.git/blame - fixincludes/Makefile.in
re PR middle-end/55859 (Mention -Og/-Ofast in "error: argument to '-O' should be...
[thirdparty/gcc.git] / fixincludes / Makefile.in
CommitLineData
71b5d516 1# Makefile for fixincludes.
4839149c 2#
d652f226 3# Copyright (C) 1998, 1999, 2000, 2001, 2003, 2004, 2009, 2010
ad643a75 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 9#it under the terms of the GNU General Public License as published by
748086b7 10#the Free Software Foundation; either version 3, or (at your option)
0083c904
BK
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
748086b7
JJ
19#along with fixincludes; see the file COPYING3. If not see
20#<http://www.gnu.org/licenses/>.
0083c904 21
b41e09a7 22SHELL=@SHELL@
d577781c 23
d9835ae8
MM
24# Some versions of `touch' (such as the version on Solaris 2.8)
25# do not correctly set the timestamp due to buggy versions of `utime'
26# in the kernel. So, we use `echo' instead.
27STAMP = echo timestamp >
28
71b5d516
PB
29CC = @CC@
30CFLAGS = @CFLAGS@
87fbb651 31WARN_CFLAGS = @WARN_CFLAGS@ @WARN_PEDANTIC@ @WERROR@
71b5d516
PB
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
6efbd53f
RW
66AUTOCONF = autoconf
67AUTOHEADER = autoheader
68ACLOCAL = aclocal
678abdd9 69ACLOCAL_AMFLAGS = -I .. -I ../config
6efbd53f 70
35dfe415 71default : all
0083c904
BK
72
73# Now figure out from those variables how to compile and link.
74
0083c904 75.c.o:
87fbb651 76 $(CC) -c $(CFLAGS) $(WARN_CFLAGS) $(CPPFLAGS) $(FIXINC_CFLAGS) $<
0083c904
BK
77
78# The only suffixes we want for implicit rules are .c and .o.
79.SUFFIXES:
80.SUFFIXES: .c .o
81
82#\f
83
84## # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
85##
86## Makefile for constructing the "best" include fixer we can
87##
0083c904
BK
88## # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
89
71b5d516 90LIBIBERTY=../libiberty/libiberty.a
2629a114
BK
91
92ALLOBJ = fixincl.o fixtests.o fixfixes.o server.o procopen.o \
ad643a75 93 fixlib.o fixopts.o
5abc1f74 94
ad643a75
PB
95TESTOBJ = fixincl.o fixlib.o fixtests.o fixopts.o
96FIXOBJ = fixfixes.o fixlib.o fixopts.o
0083c904 97
89b8abbf 98HDR = server.h fixlib.h
71b5d516
PB
99FI = fixincl@EXEEXT@
100AF = applyfix@EXEEXT@
0083c904 101
53c7ffe7 102all : @TARGET@ fixinc.sh mkheaders
42cfed37 103gen : $(srcdir)/fixincl.x
0083c904 104
71b5d516 105
2629a114
BK
106oneprocess : full-stamp
107twoprocess : test-stamp $(AF)
108
71b5d516 109full-stamp : $(ALLOBJ) $(LIBIBERTY)
27f0dff4 110 $(CC) $(CFLAGS) $(LDFLAGS) -o $(FI) $(ALLOBJ) $(LIBIBERTY)
d9835ae8 111 $(STAMP) $@
2629a114 112
71b5d516 113test-stamp : $(TESTOBJ) $(LIBIBERTY)
27f0dff4 114 $(CC) $(CFLAGS) $(LDFLAGS) -o $(FI) $(TESTOBJ) $(LIBIBERTY)
d9835ae8 115 $(STAMP) $@
2629a114 116
71b5d516 117$(AF): $(FIXOBJ) $(LIBIBERTY)
27f0dff4 118 $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(FIXOBJ) $(LIBIBERTY)
0083c904 119
2629a114
BK
120$(ALLOBJ) : $(HDR)
121fixincl.o : fixincl.c $(srcdir)/fixincl.x
35dfe415 122fixtests.o : fixtests.c
2629a114 123fixfixes.o : fixfixes.c $(srcdir)/fixincl.x
35dfe415
BK
124server.o : server.c
125procopen.o : procopen.c
35dfe415 126fixlib.o : fixlib.c
7d7f30cf 127
53c7ffe7
GK
128fixinc.sh : fixinc.in mkfixinc.sh Makefile
129 srcdir="$(srcdir)" $(SHELL) $(srcdir)/mkfixinc.sh $(target)
130
86251d81 131$(srcdir)/fixincl.x: @MAINT@ fixincl.tpl inclhack.def
89b8abbf 132 cd $(srcdir) ; $(SHELL) ./genfixes
35dfe415 133
ea595d4f
GK
134mostlyclean :
135 rm -f *.o *-stamp $(AF) $(FI) *~ fixinc.sh
e1e0c658 136
54f88091 137clean: mostlyclean
90ee1368 138 rm -f mkheaders mkheaders.almost
54f88091
PB
139
140distclean: clean
141 rm -f Makefile config.h config.log config.status stamp-h
142
143maintainer-clean: distclean
e1e0c658 144 rm -f $(srcdir)/fixincl.x
0083c904 145
ea595d4f
GK
146distclean : clean
147
71b5d516
PB
148Makefile: $(srcdir)/Makefile.in config.status
149 $(SHELL) ./config.status Makefile
150
90ee1368
ZW
151mkheaders.almost: $(srcdir)/mkheaders.in config.status
152 CONFIG_FILES=mkheaders.almost:mkheaders.in \
153 CONFIG_HEADERS= ./config.status
154
155mkheaders: mkheaders.almost $(srcdir)/../gcc/BASE-VER
156 sed -e 's/@gcc_version@/$(gcc_version)/' < $< > $@T
157 mv -f $@T $@
53c7ffe7 158
71b5d516
PB
159config.h: stamp-h
160stamp-h: $(srcdir)/config.h.in config.status
161 $(SHELL) ./config.status config.h
162
163config.status: $(srcdir)/configure
164 $(SHELL) ./config.status --recheck
165
deb984e6 166$(srcdir)/configure: @MAINT@ $(srcdir)/configure.ac $(srcdir)/aclocal.m4
6efbd53f 167 cd $(srcdir) && $(AUTOCONF)
71b5d516
PB
168
169$(srcdir)/config.h.in: @MAINT@ $(srcdir)/configure.ac
6efbd53f 170 cd $(srcdir) && $(AUTOHEADER)
71b5d516 171
deb984e6 172$(srcdir)/aclocal.m4: @MAINT@ $(srcdir)/configure.ac
6efbd53f 173 cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
71b5d516
PB
174
175check : all
380c5d40 176 autogen -T $(srcdir)/check.tpl $(srcdir)/inclhack.def
1b813bfe
BK
177 $(SHELL) ./check.sh $(srcdir)/tests/base
178 @rm -f ./check.sh
53c7ffe7
GK
179
180install : all
181 -rm -rf $(DESTDIR)$(itoolsdir)
182 $(mkinstalldirs) $(DESTDIR)$(itoolsdir)
183 $(mkinstalldirs) $(DESTDIR)$(itoolsdatadir)/include
184 $(INSTALL_DATA) $(srcdir)/README-fixinc \
185 $(DESTDIR)$(itoolsdatadir)/include/README
186 $(INSTALL_SCRIPT) fixinc.sh $(DESTDIR)$(itoolsdir)/fixinc.sh
098b96ab
AP
187 $(INSTALL_PROGRAM) fixincl@EXEEXT@ \
188 $(DESTDIR)$(itoolsdir)/fixincl@EXEEXT@
53c7ffe7 189 $(INSTALL_SCRIPT) mkheaders $(DESTDIR)$(itoolsdir)/mkheaders
ea595d4f 190
455c8f48
RW
191install-strip: install
192 test -z '$(STRIP)' \
193 || $(STRIP) $(DESTDIR)$(itoolsdir)/fixincl@EXEEXT@
194
195.PHONY: all check install install-strip
07f1ac6d 196.PHONY: dvi pdf info html install-pdf install-info install-html
ae022d32 197
ea595d4f 198dvi :
b5422ad7 199pdf :
ea595d4f 200info :
251089a0 201html :
b31f8484 202install-pdf :
07f1ac6d 203install-info :
ae022d32 204install-html :
ea595d4f 205installcheck :