OSDN Git Service

2004-09-22 Frank Ch. Eigler <fche@redhat.com>
[pf3gnuchains/gcc-fork.git] / fixincludes / Makefile.in
1 # Makefile for fixincludes.
2 #
3 #   Copyright (C) 1998, 1999, 2000, 2001, 2003 Free Software Foundation, Inc.
4
5 #This file is part of fixincludes.
6
7 #fixincludes is free software; you can redistribute it and/or modify
8 #it under the terms of the GNU General Public License as published by
9 #the Free Software Foundation; either version 2, or (at your option)
10 #any later version.
11
12 #fixincludes is distributed in the hope that it will be useful,
13 #but WITHOUT ANY WARRANTY; without even the implied warranty of
14 #MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15 #GNU General Public License for more details.
16
17 #You should have received a copy of the GNU General Public License
18 #along with fixincludes; see the file COPYING.  If not, write to
19 #the Free Software Foundation, 59 Temple Place - Suite 330,
20 #Boston, MA 02111-1307, USA.
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 LDFLAGS = @LDFLAGS@
32 INCLUDES = -I. -I$(srcdir) -I../include -I$(srcdir)/../include
33 FIXINC_CFLAGS = -DHAVE_CONFIG_H $(INCLUDES)
34
35 # Directory where sources are, from where we are.
36 srcdir = @srcdir@
37 VPATH = $(srcdir)
38
39 # End of variables for you to override.
40
41 default : all
42
43 # Now figure out from those variables how to compile and link.
44
45 .c.o:
46         $(CC) -c $(CFLAGS) $(CPPFLAGS) $(FIXINC_CFLAGS) $<
47
48 # The only suffixes we want for implicit rules are .c and .o.
49 .SUFFIXES:
50 .SUFFIXES: .c .o
51
52 #\f
53
54 ## # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
55 ##
56 ##  Makefile for constructing the "best" include fixer we can
57 ##
58 ## # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
59
60 LIBIBERTY=../libiberty/libiberty.a
61
62 ALLOBJ = fixincl.o fixtests.o fixfixes.o server.o procopen.o \
63       fixlib.o
64
65 TESTOBJ = fixincl.o fixlib.o fixtests.o
66 FIXOBJ  = fixfixes.o fixlib.o
67
68 HDR = server.h fixlib.h
69 FI  = fixincl@EXEEXT@
70 AF  = applyfix@EXEEXT@
71
72 all : @TARGET@
73 gen : $(srcdir)/fixincl.x
74
75
76 oneprocess : full-stamp
77 twoprocess : test-stamp $(AF)
78
79 full-stamp : $(ALLOBJ) $(LIBIBERTY)
80         $(CC) $(LDFLAGS) -o $(FI) $(ALLOBJ) $(LIBIBERTY)
81         $(STAMP) $@
82
83 test-stamp : $(TESTOBJ) $(LIBIBERTY)
84         $(CC) $(LDFLAGS) -o $(FI) $(TESTOBJ) $(LIBIBERTY)
85         $(STAMP) $@
86
87 $(AF): $(FIXOBJ) $(LIBIBERTY)
88         $(CC) $(LDFLAGS) -o $@ $(FIXOBJ) $(LIBIBERTY)
89
90 $(ALLOBJ)   : $(HDR)
91 fixincl.o   : fixincl.c  $(srcdir)/fixincl.x
92 fixtests.o  : fixtests.c
93 fixfixes.o  : fixfixes.c $(srcdir)/fixincl.x
94 server.o    : server.c
95 procopen.o  : procopen.c
96 fixlib.o    : fixlib.c
97
98 $(srcdir)/fixincl.x: @MAINT@ fixincl.tpl inclhack.def
99         cd $(srcdir) ; $(SHELL) ./genfixes
100
101 clean:
102         rm -f *.o *-stamp $(AF) $(FI) *~
103
104 maintainer-clean : clean
105         rm -f $(srcdir)/fixincl.x
106
107 Makefile: $(srcdir)/Makefile.in config.status
108         $(SHELL) ./config.status Makefile
109
110 config.h: stamp-h
111 stamp-h: $(srcdir)/config.h.in config.status
112         $(SHELL) ./config.status config.h
113
114 config.status: $(srcdir)/configure
115         $(SHELL) ./config.status --recheck
116
117 $(srcdir)/configure: @MAINT@ $(srcdir)/configure.ac
118         autoconf
119
120 $(srcdir)/config.h.in: @MAINT@ $(srcdir)/configure.ac
121         autoheader
122
123 $(srcdir)/aclocal.m4: @MAINT@ $(srcdir)/../gcc/aclocal.m4
124         cp $(srcdir)/../gcc/aclocal.m4 .
125
126 check : all
127         autogen -T $(srcdir)/check.tpl $(srcdir)/inclhack.def
128         $(SHELL) ./check.sh $(srcdir)/tests/base
129         @rm -f ./check.sh