Makefile.in 8.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286
  1. # @configure_input@
  2. # Makefile for libcpp. Run 'configure' to generate Makefile from Makefile.in
  3. # Copyright (C) 2004-2022 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. CET_HOST_FLAGS = @CET_HOST_FLAGS@
  55. datarootdir = @datarootdir@
  56. datadir = @datadir@
  57. exec_prefix = @prefix@
  58. libdir = @libdir@
  59. localedir = $(datadir)/locale
  60. prefix = @prefix@
  61. MSGMERGE = msgmerge
  62. mkinstalldirs = $(SHELL) $(srcdir)/../mkinstalldirs
  63. depcomp = $(SHELL) $(srcdir)/../depcomp
  64. INCLUDES = -I$(srcdir) -I. -I$(srcdir)/../include @INCINTL@ \
  65. -I$(srcdir)/include
  66. ALL_CFLAGS = $(CFLAGS) $(WARN_CFLAGS) $(INCLUDES) $(CPPFLAGS) $(PICFLAG) \
  67. $(CET_HOST_FLAGS)
  68. ALL_CXXFLAGS = $(CXXFLAGS) $(WARN_CXXFLAGS) $(NOEXCEPTION_FLAGS) $(INCLUDES) \
  69. $(CPPFLAGS) $(PICFLAG) $(CET_HOST_FLAGS)
  70. # The name of the compiler to use.
  71. COMPILER = $(CXX)
  72. COMPILER_FLAGS = $(ALL_CXXFLAGS)
  73. DEPMODE = $(CXXDEPMODE)
  74. libcpp_a_OBJS = charset.o directives.o errors.o \
  75. expr.o files.o identifiers.o init.o lex.o line-map.o macro.o \
  76. mkdeps.o pch.o symtab.o traditional.o
  77. libcpp_a_SOURCES = charset.cc directives.cc errors.cc \
  78. expr.cc files.cc identifiers.cc init.cc lex.cc line-map.cc macro.cc \
  79. mkdeps.cc pch.cc symtab.cc traditional.cc
  80. all: libcpp.a $(USED_CATALOGS)
  81. .SUFFIXES:
  82. .SUFFIXES: .cc .gmo .o .obj .po .pox
  83. libcpp.a: $(libcpp_a_OBJS)
  84. -rm -f libcpp.a
  85. $(AR) $(ARFLAGS) libcpp.a $(libcpp_a_OBJS)
  86. $(RANLIB) libcpp.a
  87. # Rules to rebuild the configuration
  88. Makefile: $(srcdir)/Makefile.in config.status
  89. $(SHELL) ./config.status Makefile
  90. config.status: $(srcdir)/configure
  91. $(SHELL) ./config.status --recheck
  92. $(srcdir)/configure: @MAINT@ $(srcdir)/aclocal.m4
  93. cd $(srcdir) && $(AUTOCONF)
  94. $(srcdir)/aclocal.m4: @MAINT@ $(srcdir)/../config/acx.m4 \
  95. $(srcdir)/../config/gettext-sister.m4 $(srcdir)/../config/iconv.m4 \
  96. $(srcdir)/../config/codeset.m4 $(srcdir)/../config/lib-ld.m4 \
  97. $(srcdir)/../config/lib-link.m4 $(srcdir)/../config/lib-prefix.m4 \
  98. $(srcdir)/../config/override.m4 $(srcdir)/../config/proginstall.m4 \
  99. $(srcdir)/configure.ac
  100. cd $(srcdir) && $(ACLOCAL) -I ../config
  101. config.h: stamp-h1
  102. test -f config.h || (rm -f stamp-h1 && $(MAKE) stamp-h1)
  103. stamp-h1: $(srcdir)/config.in config.status
  104. -rm -f stamp-h1
  105. $(SHELL) ./config.status config.h
  106. $(srcdir)/config.in: @MAINT@ $(srcdir)/configure.ac
  107. cd $(srcdir) && $(AUTOHEADER)
  108. -rm -f stamp-h1
  109. # It is not possible to get LOCALEDIR defined in config.h because
  110. # the value it needs to be defined to is only determined in the
  111. # Makefile. Hence we do this instead.
  112. localedir.h: localedir.hs; @true
  113. localedir.hs: Makefile
  114. echo "#define LOCALEDIR \"$(localedir)\"" > localedir.new
  115. $(srcdir)/../move-if-change localedir.new localedir.h
  116. echo timestamp > localedir.hs
  117. # Installation rules and other phony targets
  118. # These rule has to look for .gmo modules in both srcdir and
  119. # the cwd, and has to check that we actually have a catalog
  120. # for each language, in case they weren't built or included
  121. # with the distribution.
  122. installdirs:
  123. @$(mkinstalldirs) $(DESTDIR)$(datadir); \
  124. cats="$(CATALOGS)"; for cat in $$cats; do \
  125. lang=`basename $$cat | sed 's/\.gmo$$//'`; \
  126. if [ -f $$cat ] || [ -f $(srcdir)/$$cat ]; then \
  127. dir=$(localedir)/$$lang/LC_MESSAGES; \
  128. $(mkinstalldirs) $(DESTDIR)$$dir || exit 1; \
  129. fi; \
  130. done
  131. install-strip install: all installdirs
  132. cats="$(CATALOGS)"; for cat in $$cats; do \
  133. lang=`basename $$cat | sed 's/\.gmo$$//'`; \
  134. if [ -f $$cat ]; then :; \
  135. elif [ -f $(srcdir)/$$cat ]; then cat=$(srcdir)/$$cat; \
  136. else continue; \
  137. fi; \
  138. dir=$(localedir)/$$lang/LC_MESSAGES; \
  139. echo $(INSTALL_DATA) $$cat $(DESTDIR)$$dir/$(PACKAGE).mo; \
  140. $(INSTALL_DATA) $$cat $(DESTDIR)$$dir/$(PACKAGE).mo; \
  141. done
  142. mostlyclean:
  143. -rm -f *.o
  144. clean: mostlyclean
  145. -rm -rf libcpp.a $(srcdir)/autom4te.cache
  146. distclean: clean
  147. -rm -f config.h stamp-h1 config.status config.cache config.log \
  148. configure.lineno configure.status.lineno Makefile localedir.h \
  149. localedir.hs $(DEPDIR)/*.Po
  150. -rmdir $(DEPDIR)
  151. maintainer-clean: distclean
  152. @echo "This command is intended for maintainers to use"
  153. @echo "it deletes files that may require special tools to rebuild."
  154. -rm -f $(srcdir)/configure $(srcdir)/aclocal.m4
  155. check:
  156. installcheck:
  157. dvi:
  158. pdf:
  159. html:
  160. info:
  161. install-info:
  162. install-pdf:
  163. install-dvi:
  164. install-man:
  165. install-html:
  166. update-po: $(CATALOGS:.gmo=.pox)
  167. .PHONY: installdirs install install-strip mostlyclean clean distclean \
  168. maintainer-clean check installcheck dvi pdf html info install-info \
  169. install-man update-po install-html install-pdf install-dvi
  170. # Dependency rule.
  171. COMPILE.base = $(COMPILER) $(DEFS) $(INCLUDES) $(CPPFLAGS) $(COMPILER_FLAGS) -c
  172. ifeq ($(DEPMODE),depmode=gcc3)
  173. # Note that we put the dependencies into a .Tpo file, then move them
  174. # into place if the compile succeeds. We need this because gcc does
  175. # not atomically write the dependency output file.
  176. COMPILE = $(COMPILE.base) -o $@ -MT $@ -MMD -MP -MF $(DEPDIR)/$*.Tpo
  177. POSTCOMPILE = @mv $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
  178. else
  179. COMPILE = source='$<' object='$@' libtool=no DEPDIR=$(DEPDIR) $(DEPMODE) \
  180. $(depcomp) $(COMPILE.base)
  181. # depcomp handles atomicity for us, so we don't need a postcompile
  182. # step.
  183. POSTCOMPILE =
  184. endif
  185. # Implicit rules and I18N
  186. .cc.o:
  187. $(COMPILE) $<
  188. $(POSTCOMPILE)
  189. # N.B. We do not attempt to copy these into $(srcdir).
  190. .po.gmo:
  191. $(mkinstalldirs) po
  192. $(GMSGFMT) --statistics -o $@ $<
  193. # The new .po has to be gone over by hand, so we deposit it into
  194. # build/po with a different extension.
  195. # If build/po/$(PACKAGE).pot exists, use it (it was just created),
  196. # else use the one in srcdir.
  197. .po.pox:
  198. $(mkinstalldirs) po
  199. $(MSGMERGE) $< `if test -f po/$(PACKAGE).pot; \
  200. then echo po/$(PACKAGE).pot; \
  201. else echo $(srcdir)/po/$(PACKAGE).pot; fi` -o $@
  202. # Rule for regenerating the message template.
  203. $(PACKAGE).pot: po/$(PACKAGE).pot
  204. po/$(PACKAGE).pot: $(libcpp_a_SOURCES)
  205. $(mkinstalldirs) $(srcdir)/po
  206. $(XGETTEXT) --default-domain=$(PACKAGE) \
  207. --keyword=_ --keyword=N_ \
  208. --keyword=cpp_error:3 \
  209. --keyword=cpp_warning:3 \
  210. --keyword=cpp_pedwarning:3 \
  211. --keyword=cpp_warning_syshdr:3 \
  212. --keyword=cpp_warning_at:4 \
  213. --keyword=cpp_pedwarning_at:4 \
  214. --keyword=cpp_error_with_line:5 \
  215. --keyword=cpp_warning_with_line:5 \
  216. --keyword=cpp_pedwarning_with_line:5 \
  217. --keyword=cpp_warning_with_line_syshdr:5 \
  218. --keyword=cpp_error_at:4 \
  219. --keyword=cpp_errno:3 \
  220. --keyword=SYNTAX_ERROR --keyword=SYNTAX_ERROR2 \
  221. --copyright-holder="Free Software Foundation, Inc." \
  222. --msgid-bugs-address="https://gcc.gnu.org/bugs/" \
  223. --language=c -o po/$(PACKAGE).pot.tmp $^
  224. sed 's:$(srcdir)/::g' <po/$(PACKAGE).pot.tmp >po/$(PACKAGE).pot
  225. rm po/$(PACKAGE).pot.tmp
  226. ETAGS = @ETAGS@
  227. TAGS_SOURCES = $(libcpp_a_SOURCES) internal.h system.h ucnid.h \
  228. include/cpplib.h include/line-map.h include/mkdeps.h include/symtab.h
  229. TAGS: $(TAGS_SOURCES)
  230. cd $(srcdir) && $(ETAGS) $(TAGS_SOURCES)
  231. # Tell versions [3.59,3.63) of GNU make to not export all variables.
  232. # Otherwise a system limit (for SysV at least) may be exceeded.
  233. .NOEXPORT:
  234. # Dependencies
  235. -include $(patsubst %.o, $(DEPDIR)/%.Po, $(libcpp_a_OBJS))
  236. # Dependencies on generated headers have to be explicit.
  237. init.o: localedir.h