OSDN Git Service

2004-08-14 Paolo Bonzini <bonzini@gnu.org>
[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 # End of variables for you to override.
41
42 default : all
43
44 # Now figure out from those variables how to compile and link.
45
46 .c.o:
47         $(CC) -c $(CFLAGS) $(CPPFLAGS) $(FIXINC_CFLAGS) $<
48
49 # The only suffixes we want for implicit rules are .c and .o.
50 .SUFFIXES:
51 .SUFFIXES: .c .o
52
53 #\f
54
55 ## # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
56 ##
57 ##  Makefile for constructing the "best" include fixer we can
58 ##
59 ## # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
60
61 LIBIBERTY=../libiberty/libiberty.a
62
63 ALLOBJ = fixincl.o fixtests.o fixfixes.o server.o procopen.o \
64       fixlib.o fixopts.o
65
66 TESTOBJ = fixincl.o fixlib.o fixtests.o fixopts.o
67 FIXOBJ  = fixfixes.o fixlib.o fixopts.o
68
69 HDR = server.h fixlib.h
70 FI  = fixincl@EXEEXT@
71 AF  = applyfix@EXEEXT@
72
73 all : @TARGET@
74 gen : $(srcdir)/fixincl.x
75
76
77 oneprocess : full-stamp
78 twoprocess : test-stamp $(AF)
79
80 full-stamp : $(ALLOBJ) $(LIBIBERTY)
81         $(CC) $(LDFLAGS) -o $(FI) $(ALLOBJ) $(LIBIBERTY)
82         $(STAMP) $@
83
84 test-stamp : $(TESTOBJ) $(LIBIBERTY)
85         $(CC) $(LDFLAGS) -o $(FI) $(TESTOBJ) $(LIBIBERTY)
86         $(STAMP) $@
87
88 $(AF): $(FIXOBJ) $(LIBIBERTY)
89         $(CC) $(LDFLAGS) -o $@ $(FIXOBJ) $(LIBIBERTY)
90
91 $(ALLOBJ)   : $(HDR)
92 fixincl.o   : fixincl.c  $(srcdir)/fixincl.x
93 fixtests.o  : fixtests.c
94 fixfixes.o  : fixfixes.c $(srcdir)/fixincl.x
95 server.o    : server.c
96 procopen.o  : procopen.c
97 fixlib.o    : fixlib.c
98
99 $(srcdir)/fixincl.x: @MAINT@ fixincl.tpl inclhack.def
100         cd $(srcdir) ; $(SHELL) ./genfixes
101
102 clean:
103         rm -f *.o *-stamp $(AF) $(FI) *~
104
105 maintainer-clean : clean
106         rm -f $(srcdir)/fixincl.x
107
108 Makefile: $(srcdir)/Makefile.in config.status
109         $(SHELL) ./config.status Makefile
110
111 config.h: stamp-h
112 stamp-h: $(srcdir)/config.h.in config.status
113         $(SHELL) ./config.status config.h
114
115 config.status: $(srcdir)/configure
116         $(SHELL) ./config.status --recheck
117
118 $(srcdir)/configure: @MAINT@ $(srcdir)/configure.ac
119         autoconf
120
121 $(srcdir)/config.h.in: @MAINT@ $(srcdir)/configure.ac
122         autoheader
123
124 $(srcdir)/aclocal.m4: @MAINT@ $(srcdir)/../gcc/aclocal.m4
125         cp $(srcdir)/../gcc/aclocal.m4 .
126
127 check : all
128         autogen -T $(srcdir)/check.tpl $(srcdir)/inclhack.def
129         $(SHELL) ./check.sh $(srcdir)/tests/base
130         @rm -f ./check.sh