Makefile.in 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204
  1. # Makefile for fixincludes.
  2. #
  3. # Copyright (C) 1998, 1999, 2000, 2001, 2003, 2004, 2009, 2010, 2012
  4. # Free Software Foundation, Inc.
  5. #This file is part of fixincludes.
  6. #fixincludes is free software; you can redistribute it and/or modify
  7. #it under the terms of the GNU General Public License as published by
  8. #the Free Software Foundation; either version 3, or (at your option)
  9. #any later version.
  10. #fixincludes is distributed in the hope that it will be useful,
  11. #but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. #MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. #GNU General Public License for more details.
  14. #You should have received a copy of the GNU General Public License
  15. #along with fixincludes; see the file COPYING3. If not see
  16. #<http://www.gnu.org/licenses/>.
  17. SHELL=@SHELL@
  18. # Some versions of `touch' (such as the version on Solaris 2.8)
  19. # do not correctly set the timestamp due to buggy versions of `utime'
  20. # in the kernel. So, we use `echo' instead.
  21. STAMP = echo timestamp >
  22. CC = @CC@
  23. CFLAGS = @CFLAGS@
  24. WARN_CFLAGS = @WARN_CFLAGS@ @WARN_PEDANTIC@ @WERROR@
  25. LDFLAGS = @LDFLAGS@
  26. INCLUDES = -I. -I$(srcdir) -I../include -I$(srcdir)/../include
  27. FIXINC_CFLAGS = -DHAVE_CONFIG_H $(INCLUDES)
  28. # Directory where sources are, from where we are.
  29. srcdir = @srcdir@
  30. VPATH = $(srcdir)
  31. # Directory in which to put the directories used by the compiler.
  32. libdir = @libdir@
  33. # Directory in which GCC puts its executables.
  34. libexecdir = @libexecdir@
  35. # End of variables for you to override.
  36. # The target that we're configured for.
  37. target = @target@
  38. target_noncanonical:=@target_noncanonical@
  39. # The version of GCC in this tree
  40. gcc_version := $(shell cat $(srcdir)/../gcc/BASE-VER)
  41. # Directory in which the compiler finds libraries etc.
  42. libsubdir = $(libdir)/gcc/$(target_noncanonical)/$(gcc_version)
  43. # Directory in which the compiler finds executables
  44. libexecsubdir = $(libexecdir)/gcc/$(target_noncanonical)/$(gcc_version)
  45. # Where our executable files go
  46. itoolsdir = $(libexecsubdir)/install-tools
  47. # Where our data files go
  48. itoolsdatadir = $(libsubdir)/install-tools
  49. # Locate mkinstalldirs.
  50. mkinstalldirs=$(SHELL) $(srcdir)/../mkinstalldirs
  51. AUTOCONF = autoconf
  52. AUTOHEADER = autoheader
  53. ACLOCAL = aclocal
  54. ACLOCAL_AMFLAGS = -I .. -I ../config
  55. default : all
  56. # Now figure out from those variables how to compile and link.
  57. .c.o:
  58. $(CC) -c $(CFLAGS) $(WARN_CFLAGS) $(CPPFLAGS) $(FIXINC_CFLAGS) $<
  59. # The only suffixes we want for implicit rules are .c and .o.
  60. .SUFFIXES:
  61. .SUFFIXES: .c .o
  62. #
  63. ## # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
  64. ##
  65. ## Makefile for constructing the "best" include fixer we can
  66. ##
  67. ## # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
  68. LIBIBERTY=../libiberty/libiberty.a
  69. ALLOBJ = fixincl.o fixtests.o fixfixes.o server.o procopen.o \
  70. fixlib.o fixopts.o
  71. TESTOBJ = fixincl.o fixlib.o fixtests.o fixopts.o
  72. FIXOBJ = fixfixes.o fixlib.o fixopts.o
  73. HDR = server.h fixlib.h
  74. FI = fixincl@EXEEXT@
  75. AF = applyfix@EXEEXT@
  76. all : @TARGET@ fixinc.sh mkheaders
  77. gen : $(srcdir)/fixincl.x
  78. oneprocess : full-stamp
  79. twoprocess : test-stamp $(AF)
  80. full-stamp : $(ALLOBJ) $(LIBIBERTY)
  81. $(CC) $(CFLAGS) $(LDFLAGS) -o $(FI) $(ALLOBJ) $(LIBIBERTY)
  82. $(STAMP) $@
  83. test-stamp : $(TESTOBJ) $(LIBIBERTY)
  84. $(CC) $(CFLAGS) $(LDFLAGS) -o $(FI) $(TESTOBJ) $(LIBIBERTY)
  85. $(STAMP) $@
  86. $(AF): $(FIXOBJ) $(LIBIBERTY)
  87. $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(FIXOBJ) $(LIBIBERTY)
  88. $(ALLOBJ) : $(HDR)
  89. fixincl.o : fixincl.c $(srcdir)/fixincl.x
  90. fixtests.o : fixtests.c
  91. fixfixes.o : fixfixes.c $(srcdir)/fixincl.x
  92. server.o : server.c
  93. procopen.o : procopen.c
  94. fixlib.o : fixlib.c
  95. fixinc.sh : fixinc.in mkfixinc.sh Makefile
  96. srcdir="$(srcdir)" $(SHELL) $(srcdir)/mkfixinc.sh $(target)
  97. $(srcdir)/fixincl.x: @MAINT@ fixincl.tpl inclhack.def
  98. cd $(srcdir) ; $(SHELL) ./genfixes
  99. mostlyclean :
  100. rm -f *.o *-stamp $(AF) $(FI) *~ fixinc.sh
  101. clean: mostlyclean
  102. rm -f mkheaders mkheaders.almost
  103. distclean: clean
  104. rm -f Makefile config.h config.log config.status stamp-h
  105. maintainer-clean: distclean
  106. rm -f $(srcdir)/fixincl.x
  107. distclean : clean
  108. Makefile: $(srcdir)/Makefile.in config.status
  109. $(SHELL) ./config.status Makefile
  110. mkheaders.almost: $(srcdir)/mkheaders.in config.status
  111. CONFIG_FILES=mkheaders.almost:mkheaders.in \
  112. CONFIG_HEADERS= ./config.status
  113. mkheaders: mkheaders.almost $(srcdir)/../gcc/BASE-VER
  114. sed -e 's/@gcc_version@/$(gcc_version)/' < $< > $@T
  115. mv -f $@T $@
  116. config.h: stamp-h
  117. stamp-h: $(srcdir)/config.h.in config.status
  118. $(SHELL) ./config.status config.h
  119. config.status: $(srcdir)/configure
  120. $(SHELL) ./config.status --recheck
  121. $(srcdir)/configure: @MAINT@ $(srcdir)/configure.ac $(srcdir)/aclocal.m4
  122. cd $(srcdir) && $(AUTOCONF)
  123. $(srcdir)/config.h.in: @MAINT@ $(srcdir)/configure.ac
  124. cd $(srcdir) && $(AUTOHEADER)
  125. $(srcdir)/aclocal.m4: @MAINT@ $(srcdir)/configure.ac
  126. cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
  127. check : all
  128. autogen -T $(srcdir)/check.tpl $(srcdir)/inclhack.def
  129. $(SHELL) ./check.sh $(srcdir)/tests/base
  130. @rm -f ./check.sh
  131. install : all
  132. -rm -rf $(DESTDIR)$(itoolsdir)
  133. $(mkinstalldirs) $(DESTDIR)$(itoolsdir)
  134. $(mkinstalldirs) $(DESTDIR)$(itoolsdatadir)/include
  135. $(INSTALL_DATA) $(srcdir)/README-fixinc \
  136. $(DESTDIR)$(itoolsdatadir)/include/README
  137. $(INSTALL_SCRIPT) fixinc.sh $(DESTDIR)$(itoolsdir)/fixinc.sh
  138. $(INSTALL_PROGRAM) $(FI) $(DESTDIR)$(itoolsdir)/$(FI)
  139. $(INSTALL_SCRIPT) mkheaders $(DESTDIR)$(itoolsdir)/mkheaders
  140. install-strip: install
  141. test -z '$(STRIP)' || $(STRIP) $(DESTDIR)$(itoolsdir)/$(FI)
  142. .PHONY: all check install install-strip
  143. .PHONY: dvi pdf info html install-pdf install-info install-html
  144. dvi :
  145. pdf :
  146. info :
  147. html :
  148. install-pdf :
  149. install-info :
  150. install-html :
  151. installcheck :