2004-08-31 11:27:00 +02:00
|
|
|
|
# Makefile for fixincludes.
|
2000-12-05 15:54:02 +01:00
|
|
|
|
#
|
2004-10-15 09:58:38 +02:00
|
|
|
|
# Copyright (C) 1998, 1999, 2000, 2001, 2003, 2004
|
|
|
|
|
# Free Software Foundation, Inc.
|
1998-10-16 09:00:18 +02:00
|
|
|
|
|
2004-08-31 11:27:00 +02:00
|
|
|
|
#This file is part of fixincludes.
|
1998-10-16 09:00:18 +02:00
|
|
|
|
|
2004-08-31 11:27:00 +02:00
|
|
|
|
#fixincludes is free software; you can redistribute it and/or modify
|
1998-10-16 09:00:18 +02: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 11:27:00 +02:00
|
|
|
|
#fixincludes is distributed in the hope that it will be useful,
|
1998-10-16 09:00:18 +02: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 11:27:00 +02:00
|
|
|
|
#along with fixincludes; see the file COPYING. If not, write to
|
2005-08-15 02:50:43 +02:00
|
|
|
|
#the Free Software Foundation, 51 Franklin Street, Fifth Floor,
|
|
|
|
|
#Boston, MA 02110-1301, USA.
|
1998-10-16 09:00:18 +02:00
|
|
|
|
|
2002-06-25 03:58:10 +02:00
|
|
|
|
SHELL=@SHELL@
|
2001-03-16 20:38:32 +01:00
|
|
|
|
|
2001-05-13 21:37:13 +02: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 11:27:00 +02:00
|
|
|
|
CC = @CC@
|
|
|
|
|
CFLAGS = @CFLAGS@
|
2005-07-16 16:17:51 +02:00
|
|
|
|
WARN_CFLAGS = @WARN_CFLAGS@ @WARN_PEDANTIC@ @WERROR@
|
2004-08-31 11:27:00 +02:00
|
|
|
|
LDFLAGS = @LDFLAGS@
|
|
|
|
|
INCLUDES = -I. -I$(srcdir) -I../include -I$(srcdir)/../include
|
|
|
|
|
FIXINC_CFLAGS = -DHAVE_CONFIG_H $(INCLUDES)
|
1998-10-16 09:00:18 +02:00
|
|
|
|
|
|
|
|
|
# Directory where sources are, from where we are.
|
|
|
|
|
srcdir = @srcdir@
|
2000-12-05 15:54:02 +01:00
|
|
|
|
VPATH = $(srcdir)
|
1998-10-16 09:00:18 +02:00
|
|
|
|
|
2004-11-05 05:49:19 +01:00
|
|
|
|
# Directory in which to put the directories used by the compiler.
|
|
|
|
|
libdir = @libdir@
|
|
|
|
|
# Directory in which GCC puts its executables.
|
|
|
|
|
libexecdir = @libexecdir@
|
|
|
|
|
|
1998-10-16 09:00:18 +02:00
|
|
|
|
# End of variables for you to override.
|
|
|
|
|
|
2004-11-05 05:49:19 +01:00
|
|
|
|
# The target that we're configured for.
|
|
|
|
|
target = @target@
|
|
|
|
|
target_noncanonical:=@target_noncanonical@
|
|
|
|
|
|
|
|
|
|
# The version of GCC in this tree
|
2005-03-21 18:50:19 +01:00
|
|
|
|
gcc_version := $(shell cat $(srcdir)/../gcc/BASE-VER)
|
2004-11-05 05:49:19 +01:00
|
|
|
|
|
|
|
|
|
# Directory in which the compiler finds libraries etc.
|
2005-03-21 18:50:19 +01:00
|
|
|
|
libsubdir = $(libdir)/gcc/$(target_noncanonical)/$(gcc_version)
|
2004-11-05 05:49:19 +01:00
|
|
|
|
# Directory in which the compiler finds executables
|
|
|
|
|
libexecsubdir = $(libexecdir)/gcc/$(target_noncanonical)/$(gcc_version)
|
|
|
|
|
# Where our executable files go
|
|
|
|
|
itoolsdir = $(libexecsubdir)/install-tools
|
|
|
|
|
# Where our data files go
|
|
|
|
|
itoolsdatadir = $(libsubdir)/install-tools
|
|
|
|
|
|
|
|
|
|
# Locate mkinstalldirs.
|
|
|
|
|
mkinstalldirs=$(SHELL) $(srcdir)/../mkinstalldirs
|
|
|
|
|
|
2000-05-11 15:41:12 +02:00
|
|
|
|
default : all
|
1998-10-16 09:00:18 +02:00
|
|
|
|
|
|
|
|
|
# Now figure out from those variables how to compile and link.
|
|
|
|
|
|
|
|
|
|
.c.o:
|
2005-07-16 16:17:51 +02:00
|
|
|
|
$(CC) -c $(CFLAGS) $(WARN_CFLAGS) $(CPPFLAGS) $(FIXINC_CFLAGS) $<
|
1998-10-16 09:00:18 +02: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 11:27:00 +02:00
|
|
|
|
LIBIBERTY=../libiberty/libiberty.a
|
2000-12-13 21:07:46 +01:00
|
|
|
|
|
|
|
|
|
ALLOBJ = fixincl.o fixtests.o fixfixes.o server.o procopen.o \
|
2004-10-15 09:58:38 +02:00
|
|
|
|
fixlib.o fixopts.o
|
1999-10-12 16:44:18 +02:00
|
|
|
|
|
2004-10-15 09:58:38 +02:00
|
|
|
|
TESTOBJ = fixincl.o fixlib.o fixtests.o fixopts.o
|
|
|
|
|
FIXOBJ = fixfixes.o fixlib.o fixopts.o
|
1998-10-16 09:00:18 +02:00
|
|
|
|
|
2004-08-30 15:32:57 +02:00
|
|
|
|
HDR = server.h fixlib.h
|
2004-08-31 11:27:00 +02:00
|
|
|
|
FI = fixincl@EXEEXT@
|
|
|
|
|
AF = applyfix@EXEEXT@
|
1998-10-16 09:00:18 +02:00
|
|
|
|
|
2004-11-05 05:49:19 +01:00
|
|
|
|
all : @TARGET@ fixinc.sh mkheaders
|
2000-11-30 17:30:05 +01:00
|
|
|
|
gen : $(srcdir)/fixincl.x
|
1998-10-16 09:00:18 +02:00
|
|
|
|
|
2004-08-31 11:27:00 +02:00
|
|
|
|
|
2000-12-13 21:07:46 +01:00
|
|
|
|
oneprocess : full-stamp
|
|
|
|
|
twoprocess : test-stamp $(AF)
|
|
|
|
|
|
2004-08-31 11:27:00 +02:00
|
|
|
|
full-stamp : $(ALLOBJ) $(LIBIBERTY)
|
2005-02-23 23:30:01 +01:00
|
|
|
|
$(CC) $(CFLAGS) $(LDFLAGS) -o $(FI) $(ALLOBJ) $(LIBIBERTY)
|
2001-05-13 21:37:13 +02:00
|
|
|
|
$(STAMP) $@
|
2000-12-13 21:07:46 +01:00
|
|
|
|
|
2004-08-31 11:27:00 +02:00
|
|
|
|
test-stamp : $(TESTOBJ) $(LIBIBERTY)
|
2005-02-23 23:30:01 +01:00
|
|
|
|
$(CC) $(CFLAGS) $(LDFLAGS) -o $(FI) $(TESTOBJ) $(LIBIBERTY)
|
2001-05-13 21:37:13 +02:00
|
|
|
|
$(STAMP) $@
|
2000-12-13 21:07:46 +01:00
|
|
|
|
|
2004-08-31 11:27:00 +02:00
|
|
|
|
$(AF): $(FIXOBJ) $(LIBIBERTY)
|
2005-02-23 23:30:01 +01:00
|
|
|
|
$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(FIXOBJ) $(LIBIBERTY)
|
1998-10-16 09:00:18 +02:00
|
|
|
|
|
2000-12-13 21:07:46 +01:00
|
|
|
|
$(ALLOBJ) : $(HDR)
|
|
|
|
|
fixincl.o : fixincl.c $(srcdir)/fixincl.x
|
2000-05-11 15:41:12 +02:00
|
|
|
|
fixtests.o : fixtests.c
|
2000-12-13 21:07:46 +01:00
|
|
|
|
fixfixes.o : fixfixes.c $(srcdir)/fixincl.x
|
2000-05-11 15:41:12 +02:00
|
|
|
|
server.o : server.c
|
|
|
|
|
procopen.o : procopen.c
|
|
|
|
|
fixlib.o : fixlib.c
|
2000-04-26 01:03:49 +02:00
|
|
|
|
|
2004-11-05 05:49:19 +01:00
|
|
|
|
fixinc.sh : fixinc.in mkfixinc.sh Makefile
|
|
|
|
|
srcdir="$(srcdir)" $(SHELL) $(srcdir)/mkfixinc.sh $(target)
|
|
|
|
|
|
2001-09-03 00:05:56 +02:00
|
|
|
|
$(srcdir)/fixincl.x: @MAINT@ fixincl.tpl inclhack.def
|
2004-08-30 15:32:57 +02:00
|
|
|
|
cd $(srcdir) ; $(SHELL) ./genfixes
|
2000-05-11 15:41:12 +02:00
|
|
|
|
|
2004-11-05 21:42:15 +01:00
|
|
|
|
mostlyclean :
|
|
|
|
|
rm -f *.o *-stamp $(AF) $(FI) *~ fixinc.sh
|
2000-12-04 19:16:04 +01:00
|
|
|
|
|
2004-11-05 17:35:51 +01:00
|
|
|
|
clean: mostlyclean
|
2005-03-21 18:50:19 +01:00
|
|
|
|
rm -f mkheaders mkheaders.almost
|
2004-11-05 17:35:51 +01:00
|
|
|
|
|
|
|
|
|
distclean: clean
|
|
|
|
|
rm -f Makefile config.h config.log config.status stamp-h
|
|
|
|
|
|
|
|
|
|
maintainer-clean: distclean
|
2000-12-04 19:16:04 +01:00
|
|
|
|
rm -f $(srcdir)/fixincl.x
|
1998-10-16 09:00:18 +02:00
|
|
|
|
|
2004-11-05 21:42:15 +01:00
|
|
|
|
distclean : clean
|
|
|
|
|
|
2004-08-31 11:27:00 +02:00
|
|
|
|
Makefile: $(srcdir)/Makefile.in config.status
|
|
|
|
|
$(SHELL) ./config.status Makefile
|
|
|
|
|
|
2005-03-21 18:50:19 +01:00
|
|
|
|
mkheaders.almost: $(srcdir)/mkheaders.in config.status
|
|
|
|
|
CONFIG_FILES=mkheaders.almost:mkheaders.in \
|
|
|
|
|
CONFIG_HEADERS= ./config.status
|
|
|
|
|
|
|
|
|
|
mkheaders: mkheaders.almost $(srcdir)/../gcc/BASE-VER
|
|
|
|
|
sed -e 's/@gcc_version@/$(gcc_version)/' < $< > $@T
|
|
|
|
|
mv -f $@T $@
|
2004-11-05 05:49:19 +01:00
|
|
|
|
|
2004-08-31 11:27:00 +02:00
|
|
|
|
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
|
2006-07-10 21:44:48 +02:00
|
|
|
|
cd $(srcdir) && autoconf
|
2004-08-31 11:27:00 +02:00
|
|
|
|
|
|
|
|
|
$(srcdir)/config.h.in: @MAINT@ $(srcdir)/configure.ac
|
2006-07-10 21:44:48 +02:00
|
|
|
|
cd $(srcdir) && autoheader
|
2004-08-31 11:27:00 +02:00
|
|
|
|
|
|
|
|
|
$(srcdir)/aclocal.m4: @MAINT@ $(srcdir)/../gcc/aclocal.m4
|
|
|
|
|
cp $(srcdir)/../gcc/aclocal.m4 .
|
|
|
|
|
|
|
|
|
|
check : all
|
2000-05-11 16:03:04 +02:00
|
|
|
|
autogen -T $(srcdir)/check.tpl $(srcdir)/inclhack.def
|
2000-05-31 17:03:41 +02:00
|
|
|
|
$(SHELL) ./check.sh $(srcdir)/tests/base
|
|
|
|
|
@rm -f ./check.sh
|
2004-11-05 05:49:19 +01:00
|
|
|
|
|
|
|
|
|
install : all
|
|
|
|
|
-rm -rf $(DESTDIR)$(itoolsdir)
|
|
|
|
|
$(mkinstalldirs) $(DESTDIR)$(itoolsdir)
|
|
|
|
|
$(mkinstalldirs) $(DESTDIR)$(itoolsdatadir)/include
|
|
|
|
|
$(INSTALL_DATA) $(srcdir)/README-fixinc \
|
|
|
|
|
$(DESTDIR)$(itoolsdatadir)/include/README
|
|
|
|
|
$(INSTALL_SCRIPT) fixinc.sh $(DESTDIR)$(itoolsdir)/fixinc.sh
|
2004-12-13 16:42:10 +01:00
|
|
|
|
$(INSTALL_PROGRAM) fixincl@EXEEXT@ \
|
|
|
|
|
$(DESTDIR)$(itoolsdir)/fixincl@EXEEXT@
|
2004-11-05 05:49:19 +01:00
|
|
|
|
$(INSTALL_SCRIPT) mkheaders $(DESTDIR)$(itoolsdir)/mkheaders
|
2004-11-05 21:42:15 +01:00
|
|
|
|
|
2007-03-12 19:58:12 +01:00
|
|
|
|
.PHONY: dvi pdf info html install-pdf install-info install-html
|
2006-05-24 06:31:06 +02:00
|
|
|
|
|
2004-11-05 21:42:15 +01:00
|
|
|
|
dvi :
|
2006-10-11 01:48:09 +02:00
|
|
|
|
pdf :
|
2004-11-05 21:42:15 +01:00
|
|
|
|
info :
|
2004-11-13 08:33:27 +01:00
|
|
|
|
html :
|
2007-03-02 00:54:44 +01:00
|
|
|
|
install-pdf :
|
2007-03-12 19:58:12 +01:00
|
|
|
|
install-info :
|
2006-05-24 06:31:06 +02:00
|
|
|
|
install-html :
|
2004-11-05 21:42:15 +01:00
|
|
|
|
installcheck :
|