2004-08-31 09:27:00 +00:00
|
|
|
|
# Makefile for fixincludes.
|
2000-12-05 14:54:02 +00:00
|
|
|
|
#
|
2003-05-23 20:48:48 +00:00
|
|
|
|
# Copyright (C) 1998, 1999, 2000, 2001, 2003 Free Software Foundation, Inc.
|
1998-10-16 07:00:18 +00:00
|
|
|
|
|
2004-08-31 09:27:00 +00:00
|
|
|
|
#This file is part of fixincludes.
|
1998-10-16 07:00:18 +00:00
|
|
|
|
|
2004-08-31 09:27:00 +00:00
|
|
|
|
#fixincludes is free software; you can redistribute it and/or modify
|
1998-10-16 07:00:18 +00:00
|
|
|
|
#it under the terms of the GNU General Public License as published by
|
|
|
|
|
#the Free Software Foundation; either version 2, or (at your option)
|
|
|
|
|
#any later version.
|
|
|
|
|
|
2004-08-31 09:27:00 +00:00
|
|
|
|
#fixincludes is distributed in the hope that it will be useful,
|
1998-10-16 07:00:18 +00:00
|
|
|
|
#but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
|
#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
|
#GNU General Public License for more details.
|
|
|
|
|
|
|
|
|
|
#You should have received a copy of the GNU General Public License
|
2004-08-31 09:27:00 +00:00
|
|
|
|
#along with fixincludes; see the file COPYING. If not, write to
|
1998-10-16 07:00:18 +00:00
|
|
|
|
#the Free Software Foundation, 59 Temple Place - Suite 330,
|
|
|
|
|
#Boston, MA 02111-1307, USA.
|
|
|
|
|
|
2002-06-25 01:58:10 +00:00
|
|
|
|
SHELL=@SHELL@
|
2001-03-16 19:38:32 +00:00
|
|
|
|
|
2001-05-13 19:37:13 +00:00
|
|
|
|
# Some versions of `touch' (such as the version on Solaris 2.8)
|
|
|
|
|
# do not correctly set the timestamp due to buggy versions of `utime'
|
|
|
|
|
# in the kernel. So, we use `echo' instead.
|
|
|
|
|
STAMP = echo timestamp >
|
|
|
|
|
|
2004-08-31 09:27:00 +00:00
|
|
|
|
CC = @CC@
|
|
|
|
|
CFLAGS = @CFLAGS@
|
|
|
|
|
LDFLAGS = @LDFLAGS@
|
|
|
|
|
INCLUDES = -I. -I$(srcdir) -I../include -I$(srcdir)/../include
|
|
|
|
|
FIXINC_CFLAGS = -DHAVE_CONFIG_H $(INCLUDES)
|
1998-10-16 07:00:18 +00:00
|
|
|
|
|
|
|
|
|
# Directory where sources are, from where we are.
|
|
|
|
|
srcdir = @srcdir@
|
2000-12-05 14:54:02 +00:00
|
|
|
|
VPATH = $(srcdir)
|
1998-10-16 07:00:18 +00:00
|
|
|
|
|
|
|
|
|
# End of variables for you to override.
|
|
|
|
|
|
2000-05-11 13:41:12 +00:00
|
|
|
|
default : all
|
1998-10-16 07:00:18 +00:00
|
|
|
|
|
|
|
|
|
# Now figure out from those variables how to compile and link.
|
|
|
|
|
|
|
|
|
|
.c.o:
|
2004-08-31 09:27:00 +00:00
|
|
|
|
$(CC) -c $(CFLAGS) $(CPPFLAGS) $(FIXINC_CFLAGS) $<
|
1998-10-16 07:00:18 +00:00
|
|
|
|
|
|
|
|
|
# The only suffixes we want for implicit rules are .c and .o.
|
|
|
|
|
.SUFFIXES:
|
|
|
|
|
.SUFFIXES: .c .o
|
|
|
|
|
|
|
|
|
|
#
|
|
|
|
|
|
|
|
|
|
## # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
|
|
|
|
|
##
|
|
|
|
|
## Makefile for constructing the "best" include fixer we can
|
|
|
|
|
##
|
|
|
|
|
## # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
|
|
|
|
|
|
2004-08-31 09:27:00 +00:00
|
|
|
|
LIBIBERTY=../libiberty/libiberty.a
|
2000-12-13 20:07:46 +00:00
|
|
|
|
|
|
|
|
|
ALLOBJ = fixincl.o fixtests.o fixfixes.o server.o procopen.o \
|
2004-08-31 09:27:00 +00:00
|
|
|
|
fixlib.o
|
1999-10-12 14:44:18 +00:00
|
|
|
|
|
2003-07-08 20:42:19 +00:00
|
|
|
|
TESTOBJ = fixincl.o fixlib.o fixtests.o
|
|
|
|
|
FIXOBJ = fixfixes.o fixlib.o
|
1998-10-16 07:00:18 +00:00
|
|
|
|
|
2004-08-30 13:32:57 +00:00
|
|
|
|
HDR = server.h fixlib.h
|
2004-08-31 09:27:00 +00:00
|
|
|
|
FI = fixincl@EXEEXT@
|
|
|
|
|
AF = applyfix@EXEEXT@
|
1998-10-16 07:00:18 +00:00
|
|
|
|
|
2004-08-31 09:27:00 +00:00
|
|
|
|
all : @TARGET@
|
2000-11-30 16:30:05 +00:00
|
|
|
|
gen : $(srcdir)/fixincl.x
|
1998-10-16 07:00:18 +00:00
|
|
|
|
|
2004-08-31 09:27:00 +00:00
|
|
|
|
|
2000-12-13 20:07:46 +00:00
|
|
|
|
oneprocess : full-stamp
|
|
|
|
|
twoprocess : test-stamp $(AF)
|
|
|
|
|
|
2004-08-31 09:27:00 +00:00
|
|
|
|
full-stamp : $(ALLOBJ) $(LIBIBERTY)
|
|
|
|
|
$(CC) $(LDFLAGS) -o $(FI) $(ALLOBJ) $(LIBIBERTY)
|
2001-05-13 19:37:13 +00:00
|
|
|
|
$(STAMP) $@
|
2000-12-13 20:07:46 +00:00
|
|
|
|
|
2004-08-31 09:27:00 +00:00
|
|
|
|
test-stamp : $(TESTOBJ) $(LIBIBERTY)
|
|
|
|
|
$(CC) $(LDFLAGS) -o $(FI) $(TESTOBJ) $(LIBIBERTY)
|
2001-05-13 19:37:13 +00:00
|
|
|
|
$(STAMP) $@
|
2000-12-13 20:07:46 +00:00
|
|
|
|
|
2004-08-31 09:27:00 +00:00
|
|
|
|
$(AF): $(FIXOBJ) $(LIBIBERTY)
|
|
|
|
|
$(CC) $(LDFLAGS) -o $@ $(FIXOBJ) $(LIBIBERTY)
|
1998-10-16 07:00:18 +00:00
|
|
|
|
|
2000-12-13 20:07:46 +00:00
|
|
|
|
$(ALLOBJ) : $(HDR)
|
|
|
|
|
fixincl.o : fixincl.c $(srcdir)/fixincl.x
|
2000-05-11 13:41:12 +00:00
|
|
|
|
fixtests.o : fixtests.c
|
2000-12-13 20:07:46 +00:00
|
|
|
|
fixfixes.o : fixfixes.c $(srcdir)/fixincl.x
|
2000-05-11 13:41:12 +00:00
|
|
|
|
server.o : server.c
|
|
|
|
|
procopen.o : procopen.c
|
|
|
|
|
fixlib.o : fixlib.c
|
2000-04-25 23:03:49 +00:00
|
|
|
|
|
2001-09-02 22:05:56 +00:00
|
|
|
|
$(srcdir)/fixincl.x: @MAINT@ fixincl.tpl inclhack.def
|
2004-08-30 13:32:57 +00:00
|
|
|
|
cd $(srcdir) ; $(SHELL) ./genfixes
|
2000-05-11 13:41:12 +00:00
|
|
|
|
|
1998-10-16 07:00:18 +00:00
|
|
|
|
clean:
|
2004-08-30 13:32:57 +00:00
|
|
|
|
rm -f *.o *-stamp $(AF) $(FI) *~
|
2000-12-04 18:16:04 +00:00
|
|
|
|
|
|
|
|
|
maintainer-clean : clean
|
|
|
|
|
rm -f $(srcdir)/fixincl.x
|
1998-10-16 07:00:18 +00:00
|
|
|
|
|
2004-08-31 09:27:00 +00:00
|
|
|
|
Makefile: $(srcdir)/Makefile.in config.status
|
|
|
|
|
$(SHELL) ./config.status Makefile
|
|
|
|
|
|
|
|
|
|
config.h: stamp-h
|
|
|
|
|
stamp-h: $(srcdir)/config.h.in config.status
|
|
|
|
|
$(SHELL) ./config.status config.h
|
|
|
|
|
|
|
|
|
|
config.status: $(srcdir)/configure
|
|
|
|
|
$(SHELL) ./config.status --recheck
|
|
|
|
|
|
|
|
|
|
$(srcdir)/configure: @MAINT@ $(srcdir)/configure.ac
|
|
|
|
|
autoconf
|
|
|
|
|
|
|
|
|
|
$(srcdir)/config.h.in: @MAINT@ $(srcdir)/configure.ac
|
|
|
|
|
autoheader
|
|
|
|
|
|
|
|
|
|
$(srcdir)/aclocal.m4: @MAINT@ $(srcdir)/../gcc/aclocal.m4
|
|
|
|
|
cp $(srcdir)/../gcc/aclocal.m4 .
|
|
|
|
|
|
|
|
|
|
check : all
|
2000-05-11 14:03:04 +00:00
|
|
|
|
autogen -T $(srcdir)/check.tpl $(srcdir)/inclhack.def
|
2000-05-31 15:03:41 +00:00
|
|
|
|
$(SHELL) ./check.sh $(srcdir)/tests/base
|
|
|
|
|
@rm -f ./check.sh
|