OSDN Git Service

1383ef61b61a76916c647e101287037536480b8a
[pf3gnuchains/gcc-fork.git] / fixincludes / Makefile.in
1 # Makefile for fixincludes.
2 #
3 #   Copyright (C) 1998, 1999, 2000, 2001, 2003, 2004
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 2, 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 COPYING.  If not, write to
20 #the Free Software Foundation, 59 Temple Place - Suite 330,
21 #Boston, MA 02111-1307, USA.
22
23 SHELL=@SHELL@
24
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 >
29
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)
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=@gcc_version@
53
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
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) $(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 #\f
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
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: $(srcdir)/mkheaders.in config.status
147         CONFIG_FILES=mkheaders CONFIG_HEADERS= ./config.status
148
149 config.h: stamp-h
150 stamp-h: $(srcdir)/config.h.in config.status
151         $(SHELL) ./config.status config.h
152
153 config.status: $(srcdir)/configure
154         $(SHELL) ./config.status --recheck
155
156 $(srcdir)/configure: @MAINT@ $(srcdir)/configure.ac
157         autoconf
158
159 $(srcdir)/config.h.in: @MAINT@ $(srcdir)/configure.ac
160         autoheader
161
162 $(srcdir)/aclocal.m4: @MAINT@ $(srcdir)/../gcc/aclocal.m4
163         cp $(srcdir)/../gcc/aclocal.m4 .
164
165 check : all
166         autogen -T $(srcdir)/check.tpl $(srcdir)/inclhack.def
167         $(SHELL) ./check.sh $(srcdir)/tests/base
168         @rm -f ./check.sh
169
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
180
181 dvi :
182 info :
183 html :
184 installcheck :