Makefile.am 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243
  1. ## Process this file with Automake to create Makefile.in
  2. ##
  3. ## Copyright (C) 1998, 1999, 2000, 2002 Free Software Foundation, Inc.
  4. ##
  5. ## This file is part of GUILE.
  6. ##
  7. ## GUILE is free software; you can redistribute it and/or modify
  8. ## it under the terms of the GNU General Public License as
  9. ## published by the Free Software Foundation; either version 2, or
  10. ## (at your option) any later version.
  11. ##
  12. ## GUILE is distributed in the hope that it will be useful, but
  13. ## WITHOUT ANY WARRANTY; without even the implied warranty of
  14. ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  15. ## GNU General Public License for more details.
  16. ##
  17. ## You should have received a copy of the GNU General Public
  18. ## License along with GUILE; see the file COPYING. If not, write
  19. ## to the Free Software Foundation, Inc., 59 Temple Place, Suite
  20. ## 330, Boston, MA 02111-1307 USA
  21. AUTOMAKE_OPTIONS = gnu
  22. ## Prevent automake from adding extra -I options
  23. DEFS = @DEFS@
  24. ## Check for headers in $(srcdir)/.., so that #include
  25. ## <libguile/MUMBLE.h> will find MUMBLE.h in this dir when we're
  26. ## building.
  27. INCLUDES = -I.. -I$(srcdir)/.. ${INCLTDL}
  28. ETAGS_ARGS = --regex='/SCM_\(GLOBAL_\)?\(G?PROC\|G?PROC1\|SYMBOL\|VCELL\|CONST_LONG\).*\"\([^\"]\)*\"/\3/' \
  29. --regex='/[ \t]*SCM_[G]?DEFINE1?[ \t]*(\([^,]*\),[^,]*/\1/'
  30. lib_LTLIBRARIES = libguile.la
  31. bin_PROGRAMS = guile
  32. guile_SOURCES = guile.c
  33. guile_LDADD = libguile.la ${THREAD_LIBS_LOCAL}
  34. guile_LDFLAGS = @DLPREOPEN@
  35. libguile_la_SOURCES = \
  36. alist.c arbiters.c async.c backtrace.c boolean.c chars.c \
  37. continuations.c debug.c dynl.c dynwind.c eq.c error.c eval.c \
  38. evalext.c feature.c fluids.c fports.c gc.c gdbint.c gh_data.c \
  39. gh_eval.c gh_funcs.c gh_init.c gh_io.c gh_list.c gh_predicates.c \
  40. gsubr.c guardians.c hash.c hashtab.c hooks.c init.c ioext.c \
  41. iselect.c keywords.c lang.c list.c load.c macros.c mallocs.c \
  42. modules.c numbers.c objects.c objprop.c options.c pairs.c ports.c \
  43. print.c procprop.c procs.c random.c read.c root.c scmsigs.c \
  44. script.c simpos.c smob.c sort.c srcprop.c stackchk.c stacks.c \
  45. stime.c strings.c strop.c strorder.c strports.c struct.c symbols.c \
  46. tag.c throw.c variable.c vectors.c version.c vports.c weaks.c
  47. DOT_X_FILES = \
  48. alist.x arbiters.x \
  49. async.x backtrace.x boolean.x chars.x continuations.x debug.x \
  50. dynl.x dynwind.x eq.x error.x eval.x evalext.x feature.x \
  51. fluids.x fports.x gc.x gsubr.x guardians.x hash.x hashtab.x \
  52. hooks.x init.x ioext.x iselect.x keywords.x lang.x list.x load.x \
  53. macros.x mallocs.x modules.x net_db.x numbers.x objects.x \
  54. objprop.x options.x pairs.x ports.x posix.x print.x procprop.x \
  55. procs.x random.x read.x root.x scmsigs.x \
  56. script.x simpos.x smob.x socket.x sort.x srcprop.x stackchk.x \
  57. stacks.x stime.x strings.x strop.x strorder.x strports.x struct.x \
  58. symbols.x tag.x throw.x variable.x vectors.x \
  59. version.x vports.x weaks.x
  60. EXTRA_DOT_X_FILES = debug-malloc.x filesys.x net_db.x posix.x ramap.x \
  61. regex-posix.x socket.x threads.x unif.x
  62. DOT_DOC_FILES = \
  63. alist.doc arbiters.doc async.doc backtrace.doc boolean.doc \
  64. chars.doc continuations.doc debug.doc dynl.doc dynwind.doc eq.doc \
  65. error.doc eval.doc evalext.doc feature.doc fluids.doc fports.doc \
  66. gc.doc gsubr.doc guardians.doc hash.doc hashtab.doc hooks.doc init.doc \
  67. ioext.doc iselect.doc keywords.doc lang.doc list.doc load.doc \
  68. macros.doc mallocs.doc modules.doc net_db.doc numbers.doc objects.doc \
  69. objprop.doc options.doc pairs.doc ports.doc posix.doc print.doc \
  70. procprop.doc procs.doc random.doc read.doc root.doc scmsigs.doc \
  71. script.doc simpos.doc smob.doc socket.doc sort.doc srcprop.doc \
  72. stackchk.doc stacks.doc stime.doc strings.doc strop.doc strorder.doc \
  73. strports.doc struct.doc symbols.doc tag.doc throw.doc variable.doc \
  74. vectors.doc version.doc vports.doc weaks.doc
  75. EXTRA_DOT_DOC_FILES = @EXTRA_DOT_DOC_FILES@
  76. BUILT_SOURCES = cpp_err_symbols.c cpp_sig_symbols.c libpath.h scmconfig.h \
  77. $(DOT_X_FILES) $(EXTRA_DOT_X_FILES) $(DOT_DOC_FILES)
  78. EXTRA_libguile_la_SOURCES = _scm.h \
  79. alloca.c inet_aton.c memmove.c putenv.c strerror.c \
  80. threads.c regex-posix.c \
  81. filesys.c posix.c net_db.c socket.c \
  82. ramap.c unif.c debug-malloc.c
  83. ## delete guile-snarf.awk from the installation bindir, in case it's
  84. ## lingering there due to an earlier guile version not having been
  85. ## wiped out.
  86. install-exec-hook:
  87. rm -f $(DESTDIR)$(bindir)/guile-snarf.awk
  88. ## This is kind of nasty... there are ".c" files that we don't want to
  89. ## compile, since they are #included in threads.c. So instead we list
  90. ## them here. Perhaps we can deal with them normally once the merge
  91. ## seems to be working.
  92. noinst_HEADERS = coop-threads.c coop-threads.h coop.c
  93. libguile_la_DEPENDENCIES = @LIBLOBJS@
  94. libguile_la_LIBADD = @LIBLOBJS@ $(LIBLTDL)
  95. libguile_la_LDFLAGS = -version-info @LIBGUILE_INTERFACE@ -export-dynamic
  96. # These are headers visible as <guile/mumble.h>
  97. pkginclude_HEADERS = gh.h
  98. # These are headers visible as <libguile/mumble.h>.
  99. modincludedir = $(includedir)/libguile
  100. modinclude_HEADERS = \
  101. __scm.h alist.h arbiters.h async.h backtrace.h boolean.h chars.h \
  102. continuations.h debug.h dynl.h dynwind.h eq.h error.h eval.h \
  103. evalext.h feature.h filesys.h fports.h gc.h gdb_interface.h \
  104. gdbint.h gsubr.h guardians.h hash.h hashtab.h hooks.h init.h \
  105. ioext.h keywords.h lang.h list.h load.h macros.h mallocs.h \
  106. modules.h net_db.h numbers.h objects.h objprop.h options.h pairs.h \
  107. ports.h posix.h regex-posix.h print.h procprop.h procs.h random.h \
  108. ramap.h read.h root.h scmsigs.h validate.h script.h simpos.h \
  109. smob.h socket.h sort.h srcprop.h stackchk.h stacks.h stime.h \
  110. strings.h strop.h strorder.h strports.h struct.h symbols.h tag.h \
  111. tags.h throw.h unif.h variable.h vectors.h version.h vports.h \
  112. weaks.h snarf.h threads.h coop-defs.h fluids.h iselect.h \
  113. debug-malloc.h
  114. ## This file is generated at configure time. That is why it is DATA
  115. ## and not a header -- headers are included in the distribution.
  116. modinclude_DATA = scmconfig.h
  117. bin_SCRIPTS = guile-snarf
  118. # We can re-enable install for some of these if/when they are documented
  119. # and people feel like maintaining them. For now, this is not the case.
  120. noinst_SCRIPTS = guile-doc-snarf guile-func-name-check
  121. EXTRA_DIST = ChangeLog-gh ChangeLog-scm ChangeLog-threads cpp_signal.c \
  122. cpp_errno.c cpp_err_symbols.in cpp_sig_symbols.in cpp_cnvt.awk
  123. ## FIXME: Consider using timestamp file, to avoid unnecessary rebuilds.
  124. libpath.h: $(srcdir)/Makefile.in $(top_builddir)/config.status
  125. @echo "Generating libpath.h..."
  126. @rm -f libpath.tmp
  127. @echo '/* generated by Makefile */' > libpath.tmp
  128. @echo '#define SCM_PKGDATA_DIR "$(pkgdatadir)"' >> libpath.tmp
  129. @echo '#define SCM_LIBRARY_DIR "$(pkgdatadir)/$(VERSION)"'>>libpath.tmp
  130. @echo '#define SCM_SITE_DIR "$(pkgdatadir)/site"' >> libpath.tmp
  131. @echo '#define SCM_BUILD_INFO { \' >> libpath.tmp
  132. @echo ' { "srcdir", "'"`cd @srcdir@; pwd`"'" }, \' >> libpath.tmp
  133. @echo ' { "top_srcdir", "@top_srcdir_absolute@" }, \' >> libpath.tmp
  134. @echo ' { "prefix", "@prefix@" }, \' >> libpath.tmp
  135. @echo ' { "exec_prefix", "@exec_prefix@" }, \' >> libpath.tmp
  136. @echo ' { "bindir", "@bindir@" }, \' >> libpath.tmp
  137. @echo ' { "sbindir", "@sbindir@" }, \' >> libpath.tmp
  138. @echo ' { "libexecdir", "@libexecdir@" }, \' >> libpath.tmp
  139. @echo ' { "datadir", "@datadir@" }, \' >> libpath.tmp
  140. @echo ' { "sysconfdir", "@sysconfdir@" }, \' >> libpath.tmp
  141. @echo ' { "sharedstatedir", "@sharedstatedir@" }, \' >> libpath.tmp
  142. @echo ' { "localstatedir", "@localstatedir@" }, \' >> libpath.tmp
  143. @echo ' { "libdir", "@libdir@" }, \' >> libpath.tmp
  144. @echo ' { "infodir", "@infodir@" }, \' >> libpath.tmp
  145. @echo ' { "mandir", "@mandir@" }, \' >> libpath.tmp
  146. @echo ' { "includedir", "@includedir@" }, \' >> libpath.tmp
  147. @echo ' { "pkgdatadir", "$(datadir)/@PACKAGE@" }, \' >> libpath.tmp
  148. @echo ' { "pkglibdir", "$(libdir)/@PACKAGE@" }, \' >> libpath.tmp
  149. @echo ' { "pkgincludedir", "$(includedir)/@PACKAGE@" }, \' \
  150. >> libpath.tmp
  151. @echo ' { "guileversion", "@GUILE_VERSION@" }, \' >> libpath.tmp
  152. @echo ' { "libguileinterface", "@LIBGUILE_INTERFACE@" }, \' \
  153. >> libpath.tmp
  154. @echo ' { "LIBS", "@GUILE_LIBS@" }, \' >> libpath.tmp
  155. @echo ' { "buildstamp", "'"`date`"'" }, \' >> libpath.tmp
  156. @echo '}' >> libpath.tmp
  157. @mv libpath.tmp libpath.h
  158. snarfcppopts = $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS)
  159. SUFFIXES = .x .doc
  160. .c.x:
  161. ./guile-snarf -o $@ $< $(snarfcppopts)
  162. .c.doc:
  163. ./guile-doc-snarf -o $@ $< $(snarfcppopts)
  164. guile-procedures.txt: $(DOT_DOC_FILES) $(EXTRA_DOT_DOC_FILES)
  165. cat *.doc > $@
  166. pkgdata_DATA = guile-procedures.txt
  167. ## Add -MG to make the .x magic work with auto-dep code.
  168. MKDEP = gcc -M -MG $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS)
  169. cpp_err_symbols.c: cpp_err_symbols.in
  170. $(AWK) -f $(srcdir)/cpp_cnvt.awk < $(srcdir)/cpp_err_symbols.in > \
  171. cpp_err_symbols.tmp
  172. mv cpp_err_symbols.tmp cpp_err_symbols.c
  173. cpp_sig_symbols.c: cpp_sig_symbols.in
  174. $(AWK) -f $(srcdir)/cpp_cnvt.awk < $(srcdir)/cpp_sig_symbols.in > \
  175. cpp_sig_symbols.tmp
  176. mv cpp_sig_symbols.tmp cpp_sig_symbols.c
  177. ## Create a new version of the cpp_sig_symbols.in file, including all SIGXXX
  178. ## macros defined on this platform.
  179. check_signals:
  180. gcc -undef -dM -E $(srcdir)/cpp_signal.c | egrep ' SIG[A-Z]+' \
  181. | cut -f2 -d' ' | sort > cpp_sig_symbols_here
  182. diff -u $(srcdir)/cpp_sig_symbols.in cpp_sig_symbols_here \
  183. | egrep '^\+S' \
  184. | cut -c2- > cpp_sig_symbols_diff
  185. if test -s cpp_sig_symbols_diff ; then \
  186. cat $(srcdir)/cpp_sig_symbols.in cpp_sig_symbols_diff \
  187. | sort > cpp_sig_symbols_new ;\
  188. echo "cpp_sig_symbols_new has the following additions:" ;\
  189. cat cpp_sig_symbols_diff ;\
  190. else echo "No new symbols found."; \
  191. fi
  192. ## Likewise for cpp_err_symbols.in.
  193. check_errnos:
  194. gcc -undef -dM -E $(srcdir)/cpp_errno.c | egrep ' E.+' \
  195. | cut -f2 -d' ' | sort > cpp_err_symbols_here
  196. diff -u $(srcdir)/cpp_err_symbols.in cpp_err_symbols_here \
  197. | egrep '^\+E' \
  198. | cut -c2- > cpp_err_symbols_diff
  199. if test -s cpp_err_symbols_diff ; then \
  200. cat $(srcdir)/cpp_err_symbols.in cpp_err_symbols_diff \
  201. | sort > cpp_err_symbols_new ;\
  202. echo "cpp_err_symbols_new has the following additions:" ;\
  203. cat cpp_err_symbols_diff ;\
  204. else echo "No new symbols found."; \
  205. fi
  206. MOSTLYCLEANFILES = \
  207. cpp_err_symbols_here cpp_err_symbols_diff cpp_err_symbols_new \
  208. cpp_sig_symbols_here cpp_sig_symbols_diff cpp_sig_symbols_new
  209. CLEANFILES = libpath.h *.x *.doc