Makefile.in 8.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280
  1. # @configure_input@
  2. # Makefile for libcpp. Run 'configure' to generate Makefile from Makefile.in
  3. # Copyright (C) 2004-2015 Free Software Foundation, Inc.
  4. #This file is part of libcpp.
  5. #libcpp is free software; you can redistribute it and/or modify
  6. #it under the terms of the GNU General Public License as published by
  7. #the Free Software Foundation; either version 3, or (at your option)
  8. #any later version.
  9. #libcpp is distributed in the hope that it will be useful,
  10. #but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. #MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. #GNU General Public License for more details.
  13. #You should have received a copy of the GNU General Public License
  14. #along with libcpp; see the file COPYING3. If not see
  15. #<http://www.gnu.org/licenses/>.
  16. @SET_MAKE@
  17. srcdir = @srcdir@
  18. top_builddir = .
  19. VPATH = @srcdir@
  20. INSTALL = @INSTALL@
  21. AR = ar
  22. ARFLAGS = cru
  23. ACLOCAL = @ACLOCAL@
  24. AUTOCONF = @AUTOCONF@
  25. AUTOHEADER = @AUTOHEADER@
  26. CATALOGS = $(patsubst %,po/%,@CATALOGS@)
  27. CC = @CC@
  28. CFLAGS = @CFLAGS@
  29. WARN_CFLAGS = @warn@ @c_warn@ @WARN_PEDANTIC@ @WERROR@
  30. CXX = @CXX@
  31. CXXFLAGS = @CXXFLAGS@
  32. WARN_CXXFLAGS = @warn@ @WARN_PEDANTIC@ @WERROR@
  33. CPP = @CPP@
  34. CPPFLAGS = @CPPFLAGS@
  35. EXEEXT = @EXEEXT@
  36. GMSGFMT = @GMSGFMT@
  37. INCINTL = @INCINTL@
  38. INSTALL_DATA = @INSTALL_DATA@
  39. INSTALL_PROGRAM = @INSTALL_PROGRAM@
  40. INSTALL_SCRIPT = @INSTALL_SCRIPT@
  41. LDFLAGS = @LDFLAGS@
  42. LIBICONV = @LIBICONV@
  43. LIBINTL = @LIBINTL@
  44. PACKAGE = @PACKAGE@
  45. RANLIB = @RANLIB@
  46. SHELL = @SHELL@
  47. USED_CATALOGS = @USED_CATALOGS@
  48. XGETTEXT = @XGETTEXT@
  49. CCDEPMODE = @CCDEPMODE@
  50. CXXDEPMODE = @CXXDEPMODE@
  51. DEPDIR = @DEPDIR@
  52. NOEXCEPTION_FLAGS = @noexception_flags@
  53. PICFLAG = @PICFLAG@
  54. datarootdir = @datarootdir@
  55. datadir = @datadir@
  56. exec_prefix = @prefix@
  57. libdir = @libdir@
  58. localedir = $(datadir)/locale
  59. prefix = @prefix@
  60. MSGMERGE = msgmerge
  61. mkinstalldirs = $(SHELL) $(srcdir)/../mkinstalldirs
  62. depcomp = $(SHELL) $(srcdir)/../depcomp
  63. INCLUDES = -I$(srcdir) -I. -I$(srcdir)/../include @INCINTL@ \
  64. -I$(srcdir)/include
  65. ALL_CFLAGS = $(CFLAGS) $(WARN_CFLAGS) $(INCLUDES) $(CPPFLAGS) $(PICFLAG)
  66. ALL_CXXFLAGS = $(CXXFLAGS) $(WARN_CXXFLAGS) $(NOEXCEPTION_FLAGS) $(INCLUDES) \
  67. $(CPPFLAGS) $(PICFLAG)
  68. # The name of the compiler to use.
  69. COMPILER = $(CXX)
  70. COMPILER_FLAGS = $(ALL_CXXFLAGS)
  71. DEPMODE = $(CXXDEPMODE)
  72. libcpp_a_OBJS = charset.o directives.o directives-only.o errors.o \
  73. expr.o files.o identifiers.o init.o lex.o line-map.o macro.o \
  74. mkdeps.o pch.o symtab.o traditional.o
  75. libcpp_a_SOURCES = charset.c directives.c directives-only.c errors.c \
  76. expr.c files.c identifiers.c init.c lex.c line-map.c macro.c \
  77. mkdeps.c pch.c symtab.c traditional.c
  78. all: libcpp.a $(USED_CATALOGS)
  79. .SUFFIXES:
  80. .SUFFIXES: .c .gmo .o .obj .po .pox
  81. libcpp.a: $(libcpp_a_OBJS)
  82. -rm -f libcpp.a
  83. $(AR) $(ARFLAGS) libcpp.a $(libcpp_a_OBJS)
  84. $(RANLIB) libcpp.a
  85. # Rules to rebuild the configuration
  86. Makefile: $(srcdir)/Makefile.in config.status
  87. $(SHELL) ./config.status Makefile
  88. config.status: $(srcdir)/configure
  89. $(SHELL) ./config.status --recheck
  90. $(srcdir)/configure: @MAINT@ $(srcdir)/aclocal.m4
  91. cd $(srcdir) && $(AUTOCONF)
  92. $(srcdir)/aclocal.m4: @MAINT@ $(srcdir)/../config/acx.m4 \
  93. $(srcdir)/../config/gettext-sister.m4 $(srcdir)/../config/iconv.m4 \
  94. $(srcdir)/../config/codeset.m4 $(srcdir)/../config/lib-ld.m4 \
  95. $(srcdir)/../config/lib-link.m4 $(srcdir)/../config/lib-prefix.m4 \
  96. $(srcdir)/../config/override.m4 $(srcdir)/../config/proginstall.m4 \
  97. $(srcdir)/configure.ac
  98. cd $(srcdir) && $(ACLOCAL) -I ../config
  99. config.h: stamp-h1
  100. test -f config.h || (rm -f stamp-h1 && $(MAKE) stamp-h1)
  101. stamp-h1: $(srcdir)/config.in config.status
  102. -rm -f stamp-h1
  103. $(SHELL) ./config.status config.h
  104. $(srcdir)/config.in: @MAINT@ $(srcdir)/configure.ac
  105. cd $(srcdir) && $(AUTOHEADER)
  106. -rm -f stamp-h1
  107. # It is not possible to get LOCALEDIR defined in config.h because
  108. # the value it needs to be defined to is only determined in the
  109. # Makefile. Hence we do this instead.
  110. localedir.h: localedir.hs; @true
  111. localedir.hs: Makefile
  112. echo "#define LOCALEDIR \"$(localedir)\"" > localedir.new
  113. $(srcdir)/../move-if-change localedir.new localedir.h
  114. echo timestamp > localedir.hs
  115. # Installation rules and other phony targets
  116. # These rule has to look for .gmo modules in both srcdir and
  117. # the cwd, and has to check that we actually have a catalog
  118. # for each language, in case they weren't built or included
  119. # with the distribution.
  120. installdirs:
  121. @$(mkinstalldirs) $(DESTDIR)$(datadir); \
  122. cats="$(CATALOGS)"; for cat in $$cats; do \
  123. lang=`basename $$cat | sed 's/\.gmo$$//'`; \
  124. if [ -f $$cat ] || [ -f $(srcdir)/$$cat ]; then \
  125. dir=$(localedir)/$$lang/LC_MESSAGES; \
  126. $(mkinstalldirs) $(DESTDIR)$$dir || exit 1; \
  127. fi; \
  128. done
  129. install-strip install: all installdirs
  130. cats="$(CATALOGS)"; for cat in $$cats; do \
  131. lang=`basename $$cat | sed 's/\.gmo$$//'`; \
  132. if [ -f $$cat ]; then :; \
  133. elif [ -f $(srcdir)/$$cat ]; then cat=$(srcdir)/$$cat; \
  134. else continue; \
  135. fi; \
  136. dir=$(localedir)/$$lang/LC_MESSAGES; \
  137. echo $(INSTALL_DATA) $$cat $(DESTDIR)$$dir/$(PACKAGE).mo; \
  138. $(INSTALL_DATA) $$cat $(DESTDIR)$$dir/$(PACKAGE).mo; \
  139. done
  140. mostlyclean:
  141. -rm -f *.o
  142. clean: mostlyclean
  143. -rm -rf libcpp.a $(srcdir)/autom4te.cache
  144. distclean: clean
  145. -rm -f config.h stamp-h1 config.status config.cache config.log \
  146. configure.lineno configure.status.lineno Makefile localedir.h \
  147. localedir.hs $(DEPDIR)/*.Po
  148. -rmdir $(DEPDIR)
  149. maintainer-clean: distclean
  150. @echo "This command is intended for maintainers to use"
  151. @echo "it deletes files that may require special tools to rebuild."
  152. -rm -f $(srcdir)/configure $(srcdir)/aclocal.m4
  153. check:
  154. installcheck:
  155. dvi:
  156. pdf:
  157. html:
  158. info:
  159. install-info:
  160. install-pdf:
  161. install-man:
  162. install-html:
  163. update-po: $(CATALOGS:.gmo=.pox)
  164. .PHONY: installdirs install install-strip mostlyclean clean distclean \
  165. maintainer-clean check installcheck dvi pdf html info install-info \
  166. install-man update-po install-html
  167. # Dependency rule.
  168. COMPILE.base = $(COMPILER) $(DEFS) $(INCLUDES) $(CPPFLAGS) $(COMPILER_FLAGS) -c
  169. ifeq ($(DEPMODE),depmode=gcc3)
  170. # Note that we put the dependencies into a .Tpo file, then move them
  171. # into place if the compile succeeds. We need this because gcc does
  172. # not atomically write the dependency output file.
  173. COMPILE = $(COMPILE.base) -o $@ -MT $@ -MMD -MP -MF $(DEPDIR)/$*.Tpo
  174. POSTCOMPILE = @mv $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
  175. else
  176. COMPILE = source='$<' object='$@' libtool=no DEPDIR=$(DEPDIR) $(DEPMODE) \
  177. $(depcomp) $(COMPILE.base)
  178. # depcomp handles atomicity for us, so we don't need a postcompile
  179. # step.
  180. POSTCOMPILE =
  181. endif
  182. # Implicit rules and I18N
  183. .c.o:
  184. $(COMPILE) $<
  185. $(POSTCOMPILE)
  186. # N.B. We do not attempt to copy these into $(srcdir).
  187. .po.gmo:
  188. $(mkinstalldirs) po
  189. $(GMSGFMT) --statistics -o $@ $<
  190. # The new .po has to be gone over by hand, so we deposit it into
  191. # build/po with a different extension.
  192. # If build/po/$(PACKAGE).pot exists, use it (it was just created),
  193. # else use the one in srcdir.
  194. .po.pox:
  195. $(mkinstalldirs) po
  196. $(MSGMERGE) $< `if test -f po/$(PACKAGE).pot; \
  197. then echo po/$(PACKAGE).pot; \
  198. else echo $(srcdir)/po/$(PACKAGE).pot; fi` -o $@
  199. # Rule for regenerating the message template.
  200. $(PACKAGE).pot: po/$(PACKAGE).pot
  201. po/$(PACKAGE).pot: $(libcpp_a_SOURCES)
  202. $(mkinstalldirs) $(srcdir)/po
  203. $(XGETTEXT) --default-domain=$(PACKAGE) \
  204. --keyword=_ --keyword=N_ \
  205. --keyword=cpp_error:3 \
  206. --keyword=cpp_warning:3 \
  207. --keyword=cpp_pedwarning:3 \
  208. --keyword=cpp_warning_syshdr:3 \
  209. --keyword=cpp_error_with_line:5 \
  210. --keyword=cpp_warning_with_line:5 \
  211. --keyword=cpp_pedwarning_with_line:5 \
  212. --keyword=cpp_warning_with_line_syshdr:5 \
  213. --keyword=cpp_errno:3 \
  214. --keyword=SYNTAX_ERROR --keyword=SYNTAX_ERROR2 \
  215. --copyright-holder="Free Software Foundation, Inc." \
  216. --msgid-bugs-address="http://gcc.gnu.org/bugs.html" \
  217. --language=c -o po/$(PACKAGE).pot.tmp $^
  218. sed 's:$(srcdir)/::g' <po/$(PACKAGE).pot.tmp >po/$(PACKAGE).pot
  219. rm po/$(PACKAGE).pot.tmp
  220. TAGS_SOURCES = $(libcpp_a_SOURCES) internal.h ucnid.h \
  221. include/line-map.h include/symtab.h include/cpp-id-data.h \
  222. include/cpplib.h include/mkdeps.h system.h
  223. TAGS: $(TAGS_SOURCES)
  224. cd $(srcdir) && etags $(TAGS_SOURCES)
  225. # Tell versions [3.59,3.63) of GNU make to not export all variables.
  226. # Otherwise a system limit (for SysV at least) may be exceeded.
  227. .NOEXPORT:
  228. # Dependencies
  229. -include $(patsubst %.o, $(DEPDIR)/%.Po, $(libcpp_a_OBJS))
  230. # Dependencies on generated headers have to be explicit.
  231. init.o: localedir.h