comparison fixincludes/Makefile.in @ 0:a06113de4d67

first commit
author kent <kent@cr.ie.u-ryukyu.ac.jp>
date Fri, 17 Jul 2009 14:47:48 +0900
parents
children 77e2b8dfacca
comparison
equal deleted inserted replaced
-1:000000000000 0:a06113de4d67
1 # Makefile for fixincludes.
2 #
3 # Copyright (C) 1998, 1999, 2000, 2001, 2003, 2004, 2009
4 # Free Software Foundation, Inc.
5
6 #This file is part of fixincludes.
7
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 3, or (at your option)
11 #any later version.
12
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.
17
18 #You should have received a copy of the GNU General Public License
19 #along with fixincludes; see the file COPYING3. If not see
20 #<http://www.gnu.org/licenses/>.
21
22 SHELL=@SHELL@
23
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.
27 STAMP = echo timestamp >
28
29 CC = @CC@
30 CFLAGS = @CFLAGS@
31 WARN_CFLAGS = @WARN_CFLAGS@ @WARN_PEDANTIC@ @WERROR@
32 LDFLAGS = @LDFLAGS@
33 INCLUDES = -I. -I$(srcdir) -I../include -I$(srcdir)/../include
34 FIXINC_CFLAGS = -DHAVE_CONFIG_H $(INCLUDES)
35
36 # Directory where sources are, from where we are.
37 srcdir = @srcdir@
38 VPATH = $(srcdir)
39
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@
44
45 # End of variables for you to override.
46
47 # The target that we're configured for.
48 target = @target@
49 target_noncanonical:=@target_noncanonical@
50
51 # The version of GCC in this tree
52 gcc_version := $(shell cat $(srcdir)/../gcc/BASE-VER)
53
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
62
63 # Locate mkinstalldirs.
64 mkinstalldirs=$(SHELL) $(srcdir)/../mkinstalldirs
65
66 default : all
67
68 # Now figure out from those variables how to compile and link.
69
70 .c.o:
71 $(CC) -c $(CFLAGS) $(WARN_CFLAGS) $(CPPFLAGS) $(FIXINC_CFLAGS) $<
72
73 # The only suffixes we want for implicit rules are .c and .o.
74 .SUFFIXES:
75 .SUFFIXES: .c .o
76
77 #
78
79 ## # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
80 ##
81 ## Makefile for constructing the "best" include fixer we can
82 ##
83 ## # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
84
85 LIBIBERTY=../libiberty/libiberty.a
86
87 ALLOBJ = fixincl.o fixtests.o fixfixes.o server.o procopen.o \
88 fixlib.o fixopts.o
89
90 TESTOBJ = fixincl.o fixlib.o fixtests.o fixopts.o
91 FIXOBJ = fixfixes.o fixlib.o fixopts.o
92
93 HDR = server.h fixlib.h
94 FI = fixincl@EXEEXT@
95 AF = applyfix@EXEEXT@
96
97 all : @TARGET@ fixinc.sh mkheaders
98 gen : $(srcdir)/fixincl.x
99
100
101 oneprocess : full-stamp
102 twoprocess : test-stamp $(AF)
103
104 full-stamp : $(ALLOBJ) $(LIBIBERTY)
105 $(CC) $(CFLAGS) $(LDFLAGS) -o $(FI) $(ALLOBJ) $(LIBIBERTY)
106 $(STAMP) $@
107
108 test-stamp : $(TESTOBJ) $(LIBIBERTY)
109 $(CC) $(CFLAGS) $(LDFLAGS) -o $(FI) $(TESTOBJ) $(LIBIBERTY)
110 $(STAMP) $@
111
112 $(AF): $(FIXOBJ) $(LIBIBERTY)
113 $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(FIXOBJ) $(LIBIBERTY)
114
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
122
123 fixinc.sh : fixinc.in mkfixinc.sh Makefile
124 srcdir="$(srcdir)" $(SHELL) $(srcdir)/mkfixinc.sh $(target)
125
126 $(srcdir)/fixincl.x: @MAINT@ fixincl.tpl inclhack.def
127 cd $(srcdir) ; $(SHELL) ./genfixes
128
129 mostlyclean :
130 rm -f *.o *-stamp $(AF) $(FI) *~ fixinc.sh
131
132 clean: mostlyclean
133 rm -f mkheaders mkheaders.almost
134
135 distclean: clean
136 rm -f Makefile config.h config.log config.status stamp-h
137
138 maintainer-clean: distclean
139 rm -f $(srcdir)/fixincl.x
140
141 distclean : clean
142
143 Makefile: $(srcdir)/Makefile.in config.status
144 $(SHELL) ./config.status Makefile
145
146 mkheaders.almost: $(srcdir)/mkheaders.in config.status
147 CONFIG_FILES=mkheaders.almost:mkheaders.in \
148 CONFIG_HEADERS= ./config.status
149
150 mkheaders: mkheaders.almost $(srcdir)/../gcc/BASE-VER
151 sed -e 's/@gcc_version@/$(gcc_version)/' < $< > $@T
152 mv -f $@T $@
153
154 config.h: stamp-h
155 stamp-h: $(srcdir)/config.h.in config.status
156 $(SHELL) ./config.status config.h
157
158 config.status: $(srcdir)/configure
159 $(SHELL) ./config.status --recheck
160
161 $(srcdir)/configure: @MAINT@ $(srcdir)/configure.ac $(srcdir)/aclocal.m4
162 cd $(srcdir) && autoconf
163
164 $(srcdir)/config.h.in: @MAINT@ $(srcdir)/configure.ac
165 cd $(srcdir) && autoheader
166
167 $(srcdir)/aclocal.m4: @MAINT@ $(srcdir)/configure.ac
168 cd $(srcdir) && aclocal -I ../gcc -I .. -I ../config
169
170 check : all
171 autogen -T $(srcdir)/check.tpl $(srcdir)/inclhack.def
172 $(SHELL) ./check.sh $(srcdir)/tests/base
173 @rm -f ./check.sh
174
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
185
186 .PHONY: dvi pdf info html install-pdf install-info install-html
187
188 dvi :
189 pdf :
190 info :
191 html :
192 install-pdf :
193 install-info :
194 install-html :
195 installcheck :