Makefile.am 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858
  1. ## Process this file with Automake to create Makefile.in
  2. ##
  3. ## Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2006, 2007,
  4. ## 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2016, 2017, 2018 Free Software Foundation, Inc.
  5. ##
  6. ## This file is part of GUILE.
  7. ##
  8. ## GUILE is free software; you can redistribute it and/or modify it
  9. ## under the terms of the GNU Lesser General Public License as
  10. ## published by the Free Software Foundation; either version 3, or
  11. ## (at your option) any later version.
  12. ##
  13. ## GUILE is distributed in the hope that it will be useful, but
  14. ## WITHOUT ANY WARRANTY; without even the implied warranty of
  15. ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  16. ## GNU Lesser General Public License for more details.
  17. ##
  18. ## You should have received a copy of the GNU Lesser General Public
  19. ## License along with GUILE; see the file COPYING.LESSER. If not,
  20. ## write to the Free Software Foundation, Inc., 51 Franklin Street,
  21. ## Fifth Floor, Boston, MA 02110-1301 USA
  22. include $(top_srcdir)/am/snarf
  23. AUTOMAKE_OPTIONS = gnu
  24. ## Prevent automake from adding extra -I options
  25. DEFS = @DEFS@
  26. # Override Automake's `DEFAULT_INCLUDES'. By default, it contains
  27. # "-I$(srcdir)", which causes problems on Tru64 where our "random.h"
  28. # is picked up by <stdlib.h> instead of the libc's <random.h>.
  29. DEFAULT_INCLUDES =
  30. ## Check for headers in $(srcdir)/.., so that #include
  31. ## <libguile/MUMBLE.h> will find MUMBLE.h in this dir when we're
  32. ## building. Also look for Gnulib headers in `lib'.
  33. AM_CPPFLAGS = -DBUILDING_LIBGUILE=1 -I$(top_srcdir) -I$(top_builddir) \
  34. -I$(top_srcdir)/lib -I$(top_builddir)/lib $(LIBFFI_CFLAGS)
  35. AM_CFLAGS = $(GCC_CFLAGS) $(CFLAG_VISIBILITY)
  36. ## The Gnulib Libtool archive.
  37. gnulib_library = $(top_builddir)/lib/libgnu.la
  38. ETAGS_ARGS = --regex='/SCM_\(GLOBAL_\)?\(G?PROC\|G?PROC1\|SYMBOL\|VCELL\|CONST_LONG\).*\"\([^\"]\)*\"/\3/' \
  39. --regex='/[ \t]*SCM_[G]?DEFINE1?[ \t]*(\([^,]*\),[^,]*/\1/'
  40. lib_LTLIBRARIES = libguile-@GUILE_EFFECTIVE_VERSION@.la
  41. bin_PROGRAMS = guile
  42. noinst_PROGRAMS = guile_filter_doc_snarfage gen-scmconfig
  43. gen_scmconfig_SOURCES = gen-scmconfig.c
  44. ## Override default rule; this should be compiled for BUILD host. Note
  45. ## that we don't add $(AM_CPPFLAGS) here, as we need to run this
  46. ## program, but $(top_srcdir)/lib has a gnulib configured for the
  47. ## target. Instead we manually add $(top_builddir), in order to pick up
  48. ## the generated config.h and gen-scmconfig.h. Nothing else from Guile
  49. ## is included by this code generator.
  50. gen-scmconfig.$(OBJEXT): gen-scmconfig.c
  51. $(AM_V_GEN) \
  52. if [ "$(cross_compiling)" = "yes" ]; then \
  53. $(CC_FOR_BUILD) $(DEFS) $(DEFAULT_INCLUDES) -I$(top_builddir) \
  54. -c -o $@ $<; \
  55. else \
  56. $(COMPILE) -c -o $@ $<; \
  57. fi
  58. ## Override default rule; this should run on BUILD host.
  59. gen-scmconfig$(EXEEXT): $(gen_scmconfig_OBJECTS) $(gen_scmconfig_DEPENDENCIES)
  60. $(AM_V_GEN) \
  61. rm -f gen-scmconfig$(EXEEXT); \
  62. if [ "$(cross_compiling)" = "yes" ]; then \
  63. $(CCLD_FOR_BUILD) -o $@ $(gen_scmconfig_OBJECTS); \
  64. else \
  65. $(LINK) $(gen_scmconfig_OBJECTS) $(LDADD) $(LIBS); \
  66. fi
  67. scmconfig.h: ${top_builddir}/config.h gen-scmconfig$(EXEEXT)
  68. $(AM_V_GEN)(rm -f scmconfig.h.tmp; \
  69. cat $(srcdir)/scmconfig.h.top > scmconfig.h.tmp; \
  70. ./gen-scmconfig$(EXEEXT) >> scmconfig.h.tmp; \
  71. chmod 444 scmconfig.h.tmp; \
  72. rm -f scmconfig.h; \
  73. mv scmconfig.h.tmp scmconfig.h)
  74. guile_filter_doc_snarfage_SOURCES = c-tokenize.c
  75. ## Override default rule; this should be compiled for BUILD host.
  76. ## For some reason, OBJEXT does not include the dot
  77. c-tokenize.$(OBJEXT): c-tokenize.c
  78. $(AM_V_GEN) \
  79. if [ "$(cross_compiling)" = "yes" ]; then \
  80. $(CC_FOR_BUILD) -DCROSS_COMPILING=1 -I$(top_builddir) \
  81. -c -o "$@" "$<"; \
  82. else \
  83. $(COMPILE) -c -o "$@" "$<"; \
  84. fi
  85. ## Override default rule; this should run on BUILD host.
  86. guile_filter_doc_snarfage$(EXEEXT): $(guile_filter_doc_snarfage_OBJECTS) $(guile_filter_doc_snarfage_DEPENDENCIES)
  87. $(AM_V_GEN) \
  88. rm -f guile_filter_doc_snarfage$(EXEEXT); \
  89. if [ "$(cross_compiling)" = "yes" ]; then \
  90. $(CCLD_FOR_BUILD) -o $@ $(guile_filter_doc_snarfage_OBJECTS); \
  91. else \
  92. $(LINK) $(guile_filter_doc_snarfage_OBJECTS) $(LDADD) $(gnulib_library) $(LIBS); \
  93. fi
  94. guile_SOURCES = guile.c
  95. guile_CFLAGS = $(GUILE_CFLAGS) $(AM_CFLAGS)
  96. guile_LDADD = libguile-@GUILE_EFFECTIVE_VERSION@.la
  97. guile_LDFLAGS = $(GUILE_CFLAGS)
  98. libguile_@GUILE_EFFECTIVE_VERSION@_la_CFLAGS = $(GUILE_CFLAGS) $(AM_CFLAGS)
  99. libguile_@GUILE_EFFECTIVE_VERSION@_la_SOURCES = \
  100. alist.c \
  101. array-handle.c \
  102. array-map.c \
  103. arrays.c \
  104. async.c \
  105. atomic.c \
  106. backtrace.c \
  107. boolean.c \
  108. bitvectors.c \
  109. bytevectors.c \
  110. chars.c \
  111. control.c \
  112. continuations.c \
  113. debug.c \
  114. deprecated.c \
  115. deprecation.c \
  116. dynstack.c \
  117. dynwind.c \
  118. eq.c \
  119. error.c \
  120. eval.c \
  121. evalext.c \
  122. expand.c \
  123. extensions.c \
  124. fdes-finalizers.c \
  125. feature.c \
  126. filesys.c \
  127. finalizers.c \
  128. fluids.c \
  129. foreign.c \
  130. foreign-object.c \
  131. fports.c \
  132. frames.c \
  133. gc-malloc.c \
  134. gc.c \
  135. gettext.c \
  136. generalized-arrays.c \
  137. generalized-vectors.c \
  138. goops.c \
  139. gsubr.c \
  140. guardians.c \
  141. hash.c \
  142. hashtab.c \
  143. hooks.c \
  144. i18n.c \
  145. init.c \
  146. inline.c \
  147. instructions.c \
  148. ioext.c \
  149. keywords.c \
  150. list.c \
  151. load.c \
  152. loader.c \
  153. macros.c \
  154. mallocs.c \
  155. memoize.c \
  156. modules.c \
  157. null-threads.c \
  158. numbers.c \
  159. objprop.c \
  160. options.c \
  161. pairs.c \
  162. poll.c \
  163. ports.c \
  164. print.c \
  165. procprop.c \
  166. procs.c \
  167. programs.c \
  168. promises.c \
  169. r6rs-ports.c \
  170. random.c \
  171. rdelim.c \
  172. read.c \
  173. rw.c \
  174. scmsigs.c \
  175. script.c \
  176. simpos.c \
  177. smob.c \
  178. sort.c \
  179. srcprop.c \
  180. srfi-1.c \
  181. srfi-4.c \
  182. srfi-13.c \
  183. srfi-14.c \
  184. srfi-60.c \
  185. stackchk.c \
  186. stacks.c \
  187. stime.c \
  188. strings.c \
  189. strorder.c \
  190. strports.c \
  191. struct.c \
  192. symbols.c \
  193. syntax.c \
  194. threads.c \
  195. throw.c \
  196. trees.c \
  197. unicode.c \
  198. uniform.c \
  199. values.c \
  200. variable.c \
  201. vectors.c \
  202. version.c \
  203. vm.c \
  204. vports.c \
  205. weak-set.c \
  206. weak-table.c \
  207. weak-vector.c
  208. DOT_X_FILES = \
  209. alist.x \
  210. array-handle.x \
  211. array-map.x \
  212. arrays.x \
  213. async.x \
  214. atomic.x \
  215. backtrace.x \
  216. boolean.x \
  217. bitvectors.x \
  218. bytevectors.x \
  219. chars.x \
  220. control.x \
  221. continuations.x \
  222. debug.x \
  223. deprecated.x \
  224. deprecation.x \
  225. dynl.x \
  226. dynwind.x \
  227. eq.x \
  228. error.x \
  229. eval.x \
  230. evalext.x \
  231. expand.x \
  232. extensions.x \
  233. fdes-finalizers.x \
  234. feature.x \
  235. filesys.x \
  236. fluids.x \
  237. foreign.x \
  238. fports.x \
  239. frames.x \
  240. gc-malloc.x \
  241. gc.x \
  242. gettext.x \
  243. generalized-arrays.x \
  244. generalized-vectors.x \
  245. goops.x \
  246. gsubr.x \
  247. guardians.x \
  248. hash.x \
  249. hashtab.x \
  250. hooks.x \
  251. i18n.x \
  252. init.x \
  253. instructions.x \
  254. ioext.x \
  255. keywords.x \
  256. list.x \
  257. load.x \
  258. loader.x \
  259. macros.x \
  260. mallocs.x \
  261. memoize.x \
  262. modules.x \
  263. numbers.x \
  264. objprop.x \
  265. options.x \
  266. pairs.x \
  267. ports.x \
  268. print.x \
  269. procprop.x \
  270. procs.x \
  271. programs.x \
  272. promises.x \
  273. r6rs-ports.x \
  274. random.x \
  275. rdelim.x \
  276. read.x \
  277. rw.x \
  278. scmsigs.x \
  279. script.x \
  280. simpos.x \
  281. smob.x \
  282. sort.x \
  283. srcprop.x \
  284. srfi-1.x \
  285. srfi-4.x \
  286. srfi-13.x \
  287. srfi-14.x \
  288. srfi-60.x \
  289. stackchk.x \
  290. stacks.x \
  291. stime.x \
  292. strings.x \
  293. strorder.x \
  294. strports.x \
  295. struct.x \
  296. symbols.x \
  297. syntax.x \
  298. threads.x \
  299. throw.x \
  300. trees.x \
  301. unicode.x \
  302. uniform.x \
  303. values.x \
  304. variable.x \
  305. vectors.x \
  306. version.x \
  307. vm.x \
  308. vports.x \
  309. weak-set.x \
  310. weak-table.x \
  311. weak-vector.x
  312. EXTRA_DOT_X_FILES = @EXTRA_DOT_X_FILES@
  313. DOT_DOC_FILES = \
  314. alist.doc \
  315. array-handle.doc \
  316. array-map.doc \
  317. arrays.doc \
  318. async.doc \
  319. atomic.doc \
  320. backtrace.doc \
  321. boolean.doc \
  322. bitvectors.doc \
  323. bytevectors.doc \
  324. chars.doc \
  325. control.doc \
  326. continuations.doc \
  327. debug.doc \
  328. deprecated.doc \
  329. deprecation.doc \
  330. dynl.doc \
  331. dynwind.doc \
  332. eq.doc \
  333. error.doc \
  334. eval.doc \
  335. evalext.doc \
  336. expand.doc \
  337. extensions.doc \
  338. fdes-finalizers.doc \
  339. feature.doc \
  340. filesys.doc \
  341. fluids.doc \
  342. foreign.doc \
  343. fports.doc \
  344. gc-malloc.doc \
  345. gc.doc \
  346. gettext.doc \
  347. generalized-arrays.doc \
  348. generalized-vectors.doc \
  349. goops.doc \
  350. gsubr.doc \
  351. guardians.doc \
  352. hash.doc \
  353. hashtab.doc \
  354. hooks.doc \
  355. i18n.doc \
  356. init.doc \
  357. ioext.doc \
  358. keywords.doc \
  359. list.doc \
  360. load.doc \
  361. macros.doc \
  362. mallocs.doc \
  363. memoize.doc \
  364. modules.doc \
  365. numbers.doc \
  366. objprop.doc \
  367. options.doc \
  368. pairs.doc \
  369. ports.doc \
  370. print.doc \
  371. procprop.doc \
  372. procs.doc \
  373. promises.doc \
  374. r6rs-ports.doc \
  375. random.doc \
  376. rdelim.doc \
  377. read.doc \
  378. rw.doc \
  379. scmsigs.doc \
  380. script.doc \
  381. simpos.doc \
  382. smob.doc \
  383. sort.doc \
  384. srcprop.doc \
  385. srfi-1.doc \
  386. srfi-4.doc \
  387. srfi-13.doc \
  388. srfi-14.doc \
  389. srfi-60.doc \
  390. stackchk.doc \
  391. stacks.doc \
  392. stime.doc \
  393. strings.doc \
  394. strorder.doc \
  395. strports.doc \
  396. struct.doc \
  397. symbols.doc \
  398. syntax.doc \
  399. threads.doc \
  400. throw.doc \
  401. trees.doc \
  402. unicode.doc \
  403. uniform.doc \
  404. values.doc \
  405. variable.doc \
  406. vectors.doc \
  407. version.doc \
  408. vports.doc \
  409. weak-set.doc \
  410. weak-table.doc \
  411. weak-vector.doc
  412. EXTRA_DOT_DOC_FILES = @EXTRA_DOT_DOC_FILES@
  413. vm-operations.h: vm-engine.c
  414. @echo '/* This file was generated automatically from $<; do not' > $@
  415. @echo ' edit. See the source file for copyright information. */' >> $@
  416. @echo '' >> $@
  417. @echo "#define FOR_EACH_VM_OPERATION(M) \\" >> $@
  418. $(AM_V_GEN)$(GREP) '^ *VM_DEFINE_OP' $< \
  419. | sed -e 's,VM_DEFINE_OP (\(.*\)).*, M (\1) \\,' >> $@
  420. @echo '' >> $@
  421. BUILT_INCLUDES = vm-operations.h scmconfig.h
  422. BUILT_SOURCES = cpp-E.c cpp-SIG.c libpath.h $(BUILT_INCLUDES) \
  423. $(DOT_X_FILES) $(EXTRA_DOT_X_FILES)
  424. # Force the generation of `guile-procedures.texi' because the top-level
  425. # Makefile expects it to be built.
  426. all-local: guile-procedures.texi
  427. EXTRA_libguile_@GUILE_EFFECTIVE_VERSION@_la_SOURCES = _scm.h \
  428. memmove.c strerror.c \
  429. dynl.c regex-posix.c \
  430. posix.c net_db.c socket.c \
  431. debug-malloc.c \
  432. posix-w32.c \
  433. locale-categories.h
  434. ## delete guile-snarf.awk from the installation bindir, in case it's
  435. ## lingering there due to an earlier guile version not having been
  436. ## wiped out.
  437. install-exec-hook:
  438. rm -f $(DESTDIR)$(bindir)/guile-snarf.awk
  439. ## Instantiate a template.
  440. INSTANTIATE = \
  441. $(SED) -i -e 's,[@]pkgdatadir[@],$(pkgdatadir),g' \
  442. -e 's,[@]pkglibdir[@],$(pkglibdir),g' \
  443. -e 's,[@]GUILE_EFFECTIVE_VERSION[@],$(GUILE_EFFECTIVE_VERSION),g'
  444. install-data-hook: libguile-2.2-gdb.scm
  445. @$(MKDIR_P) $(DESTDIR)$(libdir)
  446. ## We want to install libguile-2.2-gdb.scm as SOMETHING-gdb.scm.
  447. ## SOMETHING is the full name of the final library. We want to ignore
  448. ## symlinks, the .la file, and any previous -gdb.py file. This is
  449. ## inherently fragile, but there does not seem to be a better option,
  450. ## because libtool hides the real names from us. (Trick courtesy of
  451. ## GNU libstdc++.)
  452. @here=`pwd`; cd $(DESTDIR)$(libdir); \
  453. for file in libguile-@GUILE_EFFECTIVE_VERSION@*; do \
  454. case $$file in \
  455. *-gdb.scm) ;; \
  456. *.la) ;; \
  457. *) if test -h $$file; then \
  458. continue; \
  459. fi; \
  460. libname=$$file;; \
  461. esac; \
  462. done; \
  463. cd $$here; \
  464. echo " $(INSTALL_DATA) $< \
  465. $(DESTDIR)$(libdir)/$$libname-gdb.scm"; \
  466. $(INSTALL_DATA) "$<" \
  467. "$(DESTDIR)$(libdir)/$$libname-gdb.scm"; \
  468. $(INSTANTIATE) "$(DESTDIR)$(libdir)/$$libname-gdb.scm"
  469. # Remove the GDB support file and the Info 'dir' file that
  470. # 'install-info' 5.x installs.
  471. uninstall-hook:
  472. -rm "$(DESTDIR)$(libdir)/libguile-@GUILE_EFFECTIVE_VERSION@"*-gdb.scm
  473. -rm -f "$(DESTDIR)$(infodir)/dir"
  474. ## This is kind of nasty... there are ".c" files that we don't want to
  475. ## compile, since they are #included. So instead we list them here.
  476. ## Perhaps we can deal with them normally once the merge seems to be
  477. ## working.
  478. noinst_HEADERS = conv-integer.i.c conv-uinteger.i.c \
  479. elf.h \
  480. srfi-14.i.c \
  481. quicksort.i.c \
  482. atomics-internal.h \
  483. cache-internal.h \
  484. posix-w32.h \
  485. private-options.h \
  486. ports-internal.h \
  487. syntax.h \
  488. weak-list.h
  489. # vm instructions
  490. noinst_HEADERS += vm-engine.c
  491. libguile_@GUILE_EFFECTIVE_VERSION@_la_DEPENDENCIES = @LIBLOBJS@
  492. libguile_@GUILE_EFFECTIVE_VERSION@_la_LIBADD = \
  493. @LIBLOBJS@ $(gnulib_library) $(LTLIBGMP) $(LTLIBLTDL)
  494. # Libtool version info.
  495. version_info = @LIBGUILE_INTERFACE_CURRENT@:@LIBGUILE_INTERFACE_REVISION@:@LIBGUILE_INTERFACE_AGE@
  496. libguile_@GUILE_EFFECTIVE_VERSION@_la_LDFLAGS = \
  497. $(BDW_GC_LIBS) $(LIBFFI_LIBS) \
  498. $(CEIL_LIBM) \
  499. $(FLOOR_LIBM) \
  500. $(FREXP_LIBM) \
  501. $(GETADDRINFO_LIB) \
  502. $(HOSTENT_LIB) \
  503. $(INET_NTOP_LIB) \
  504. $(INET_PTON_LIB) \
  505. $(ISNAND_LIBM) \
  506. $(ISNANF_LIBM) \
  507. $(ISNANL_LIBM) \
  508. $(LDEXP_LIBM) \
  509. $(LIBSOCKET) \
  510. $(LIB_CLOCK_GETTIME) \
  511. $(LOG1P_LIBM) \
  512. $(LOG_LIBM) \
  513. $(LTLIBICONV) \
  514. $(LTLIBINTL) \
  515. $(LTLIBUNISTRING) \
  516. $(ROUND_LIBM) \
  517. $(SERVENT_LIB) \
  518. $(TRUNC_LIBM) \
  519. -version-info $(version_info) \
  520. -export-dynamic -no-undefined \
  521. $(GNU_LD_FLAGS)
  522. if HAVE_LD_VERSION_SCRIPT
  523. libguile_@GUILE_EFFECTIVE_VERSION@_la_LDFLAGS += -Wl,--version-script="$(srcdir)/libguile.map"
  524. endif HAVE_LD_VERSION_SCRIPT
  525. # These are headers visible as <guile/mumble.h>
  526. pkginclude_HEADERS =
  527. # These are headers visible as <libguile/mumble.h>.
  528. modincludedir = $(pkgincludedir)/$(GUILE_EFFECTIVE_VERSION)/libguile
  529. modinclude_HEADERS = \
  530. __scm.h \
  531. alist.h \
  532. array-handle.h \
  533. array-map.h \
  534. arrays.h \
  535. async.h \
  536. atomic.h \
  537. backtrace.h \
  538. bdw-gc.h \
  539. boolean.h \
  540. bitvectors.h \
  541. bytevectors.h \
  542. chars.h \
  543. control.h \
  544. continuations.h \
  545. debug-malloc.h \
  546. debug.h \
  547. deprecated.h \
  548. deprecation.h \
  549. dynl.h \
  550. dynstack.h \
  551. dynwind.h \
  552. eq.h \
  553. error.h \
  554. eval.h \
  555. evalext.h \
  556. expand.h \
  557. extensions.h \
  558. fdes-finalizers.h \
  559. feature.h \
  560. finalizers.h \
  561. filesys.h \
  562. fluids.h \
  563. foreign.h \
  564. foreign-object.h \
  565. fports.h \
  566. frames.h \
  567. gc.h \
  568. gc-inline.h \
  569. gettext.h \
  570. generalized-arrays.h \
  571. generalized-vectors.h \
  572. goops.h \
  573. gsubr.h \
  574. guardians.h \
  575. hash.h \
  576. hashtab.h \
  577. hooks.h \
  578. i18n.h \
  579. init.h \
  580. inline.h \
  581. instructions.h \
  582. ioext.h \
  583. iselect.h \
  584. keywords.h \
  585. list.h \
  586. load.h \
  587. loader.h \
  588. macros.h \
  589. mallocs.h \
  590. memoize.h \
  591. modules.h \
  592. net_db.h \
  593. null-threads.h \
  594. numbers.h \
  595. objprop.h \
  596. options.h \
  597. pairs.h \
  598. poll.h \
  599. ports.h \
  600. posix.h \
  601. print.h \
  602. procprop.h \
  603. procs.h \
  604. programs.h \
  605. promises.h \
  606. pthread-threads.h \
  607. r6rs-ports.h \
  608. random.h \
  609. rdelim.h \
  610. read.h \
  611. regex-posix.h \
  612. rw.h \
  613. scmsigs.h \
  614. script.h \
  615. simpos.h \
  616. smob.h \
  617. snarf.h \
  618. socket.h \
  619. sort.h \
  620. srcprop.h \
  621. srfi-1.h \
  622. srfi-4.h \
  623. srfi-13.h \
  624. srfi-14.h \
  625. srfi-60.h \
  626. stackchk.h \
  627. stacks.h \
  628. stime.h \
  629. strings.h \
  630. strorder.h \
  631. strports.h \
  632. struct.h \
  633. symbols.h \
  634. tags.h \
  635. threads.h \
  636. throw.h \
  637. trees.h \
  638. validate.h \
  639. unicode.h \
  640. uniform.h \
  641. values.h \
  642. variable.h \
  643. vectors.h \
  644. vm-builtins.h \
  645. vm-expand.h \
  646. vm.h \
  647. vports.h \
  648. weak-set.h \
  649. weak-table.h \
  650. weak-vector.h
  651. nodist_modinclude_HEADERS = version.h scmconfig.h
  652. bin_SCRIPTS = guile-snarf
  653. # We can re-enable install for some of these if/when they are documented
  654. # and people feel like maintaining them. For now, this is not the case.
  655. noinst_SCRIPTS = guile-snarf-docs
  656. EXTRA_DIST = ChangeLog-scm ChangeLog-threads \
  657. ChangeLog-1996-1999 ChangeLog-2000 ChangeLog-2008 \
  658. guile-func-name-check \
  659. cpp-E.syms cpp-E.c cpp-SIG.syms cpp-SIG.c \
  660. c-tokenize.lex \
  661. scmconfig.h.top libgettext.h unidata_to_charset.pl libguile.map \
  662. vm-operations.h libguile-2.2-gdb.scm
  663. # $(DOT_DOC_FILES) $(EXTRA_DOT_DOC_FILES) \
  664. # guile-procedures.txt guile.texi
  665. ## FIXME: Consider using timestamp file, to avoid unnecessary rebuilds.
  666. libpath.h: $(srcdir)/Makefile.in $(top_builddir)/config.status
  667. @rm -f libpath.tmp
  668. @echo '/* generated by Makefile */' > libpath.tmp
  669. @echo '#define SCM_PKGDATA_DIR "$(pkgdatadir)"' >> libpath.tmp
  670. @echo '#define SCM_LIBRARY_DIR "$(pkgdatadir)/$(GUILE_EFFECTIVE_VERSION)"'>>libpath.tmp
  671. @echo '#define SCM_SITE_DIR "$(sitedir)"' >> libpath.tmp
  672. @echo '#define SCM_GLOBAL_SITE_DIR "$(pkgdatadir)/site"' >> libpath.tmp
  673. @echo '#define SCM_LIB_DIR "$(libdir)"' >> libpath.tmp
  674. @echo '#define SCM_EXTENSIONS_DIR "$(pkglibdir)/$(GUILE_EFFECTIVE_VERSION)/extensions"' >> libpath.tmp
  675. @echo '#define SCM_CCACHE_DIR "$(pkglibdir)/$(GUILE_EFFECTIVE_VERSION)/ccache"' >> libpath.tmp
  676. @echo '#define SCM_SITE_CCACHE_DIR "$(pkglibdir)/$(GUILE_EFFECTIVE_VERSION)/site-ccache"' >> libpath.tmp
  677. @echo '#define SCM_EFFECTIVE_VERSION "$(GUILE_EFFECTIVE_VERSION)"' >> libpath.tmp
  678. @echo '#define SCM_BUILD_INFO { \' >> libpath.tmp
  679. @echo ' { "srcdir", "'"`cd @srcdir@; pwd`"'" }, \' >> libpath.tmp
  680. @echo ' { "top_srcdir", "@top_srcdir_absolute@" }, \' >> libpath.tmp
  681. @echo ' { "prefix", "@prefix@" }, \' >> libpath.tmp
  682. @echo ' { "exec_prefix", "@exec_prefix@" }, \' >> libpath.tmp
  683. @echo ' { "bindir", "@bindir@" }, \' >> libpath.tmp
  684. @echo ' { "sbindir", "@sbindir@" }, \' >> libpath.tmp
  685. @echo ' { "libexecdir", "@libexecdir@" }, \' >> libpath.tmp
  686. @echo ' { "datadir", "@datadir@" }, \' >> libpath.tmp
  687. @echo ' { "sysconfdir", "@sysconfdir@" }, \' >> libpath.tmp
  688. @echo ' { "sharedstatedir", "@sharedstatedir@" }, \' >> libpath.tmp
  689. @echo ' { "localstatedir", "@localstatedir@" }, \' >> libpath.tmp
  690. @echo ' { "libdir", "@libdir@" }, \' >> libpath.tmp
  691. @echo ' { "ccachedir", SCM_CCACHE_DIR }, \' >> libpath.tmp
  692. @echo ' { "infodir", "@infodir@" }, \' >> libpath.tmp
  693. @echo ' { "mandir", "@mandir@" }, \' >> libpath.tmp
  694. @echo ' { "includedir", "@includedir@" }, \' >> libpath.tmp
  695. @echo ' { "pkgdatadir", "$(pkgdatadir)" }, \' >> libpath.tmp
  696. @echo ' { "pkglibdir", "$(pkglibdir)" }, \' >> libpath.tmp
  697. @echo ' { "pkgincludedir", "$(pkgincludedir)" }, \' \
  698. >> libpath.tmp
  699. @echo ' { "extensiondir", "$(pkglibdir)/$(GUILE_EFFECTIVE_VERSION)/extensions" }, \' >> libpath.tmp
  700. @echo ' { "guileversion", "@GUILE_VERSION@" }, \' >> libpath.tmp
  701. @echo ' { "libguileinterface", "@LIBGUILE_INTERFACE@" }, \' \
  702. >> libpath.tmp
  703. @echo ' { "LIBS", "@GUILE_LIBS@" }, \' >> libpath.tmp
  704. @echo ' { "CFLAGS", "@GUILE_CFLAGS@" }, \' >> libpath.tmp
  705. @BUILD_DATE="$${SOURCE_DATE_EPOCH:-`date '+%s'`}" ; \
  706. echo ' { "buildstamp", "'`date -u +'%Y-%m-%d %T' -d @$$BUILD_DATE`'" }, \' >> libpath.tmp
  707. @echo '}' >> libpath.tmp
  708. $(AM_V_GEN)mv libpath.tmp libpath.h
  709. snarfcppopts = $(DEFS) $(AM_CPPFLAGS) $(CPPFLAGS) $(CFLAGS)
  710. SUFFIXES = .x .doc
  711. .c.x:
  712. $(AM_V_SNARF)$(GUILE_SNARF) -o $@ $< $(snarfcppopts)
  713. .c.doc:
  714. $(AM_V_SNARF)./guile-snarf-docs -o $@ $< -- $(snarfcppopts)
  715. $(DOT_X_FILES) $(EXTRA_DOT_X_FILES): $(BUILT_INCLUDES) snarf.h guile-snarf.in version.h
  716. $(DOT_DOC_FILES) $(EXTRA_DOT_DOC_FILES): $(BUILT_INCLUDES) snarf.h guile-snarf-docs.in guile_filter_doc_snarfage$(EXEEXT)
  717. error.x: cpp-E.c
  718. posix.x: cpp-SIG.c
  719. load.x: libpath.h
  720. dynl.x: libpath.h
  721. alldotdocfiles = $(DOT_DOC_FILES) $(EXTRA_DOT_DOC_FILES)
  722. snarf2checkedtexi = GUILE_AUTO_COMPILE=0 $(top_builddir)/meta/build-env guild snarf-check-and-output-texi
  723. dotdoc2texi = cat $(alldotdocfiles) | $(snarf2checkedtexi)
  724. guile.texi: $(alldotdocfiles) guile$(EXEEXT)
  725. $(dotdoc2texi) --manual > $@ || { rm $@; false; }
  726. guile-procedures.texi: $(alldotdocfiles) guile$(EXEEXT)
  727. $(AM_V_GEN)$(dotdoc2texi) > $@ || { rm $@; false; }
  728. c-tokenize.c: c-tokenize.lex
  729. flex -t $(srcdir)/c-tokenize.lex > $@ || { rm $@; false; }
  730. ## Add -MG to make the .x magic work with auto-dep code.
  731. MKDEP = gcc -M -MG $(DEFS) $(AM_CPPFLAGS) $(CPPFLAGS) $(CFLAGS)
  732. # This page is for maintenance of the lists of CPP symbols that are eventually
  733. # included in error.c (‘errno’ values: E*) and posix.c (signal names: SIG*),
  734. # in the funcs scm_init_{error,posix}, respectively.
  735. #
  736. # The lists (files cpp-{E,SIG}.syms) are not included verbatim, but processed
  737. # (via pattern rule ‘.syms.c’ below) so that each CPP symbol is transformed to
  738. # fragment of #ifdef'd C code that defines a Scheme variable of the same name.
  739. # The resulting files, cpp-{E,SIG}.c, are the ones #include:d.
  740. #
  741. # To maintain the (source) lists of symbols, we use a GCC-specific feature
  742. # to list all symbols #define:d when expanding <{errno,signal}.h>, grep
  743. # the output for {E,SIG}*, massage the result into a usable form, and
  744. # construct a union of the current and new symbols. This is written to
  745. # files cpp-{E,SIG}.syms.NEW for review. If things look ok, you can then
  746. # "mv foo.NEW foo" and commit. Generating the foo.NEW files and showing
  747. # an informative message is the job of targets chknew-{E,SIG}.
  748. # For each line in foo.syms, transform:
  749. # SYMBOL
  750. # to:
  751. # #ifdef SYMBOL
  752. # scm_c_define ("SYMBOL", scm_from_int (SYMBOL));
  753. # #endif
  754. # writing output to foo.c. We use a while-read loop instead of a
  755. # one-line sed script because some seds (e.g., FreeBSD) don't read
  756. # '\n' as a newline (like GNU sed does). Sad, but true.
  757. .syms.c:
  758. $(AM_V_GEN) \
  759. cat $< | while read sym ; do \
  760. echo "#ifdef $$sym" ; \
  761. echo "scm_c_define (\"$$sym\", scm_from_int ($$sym));" ; \
  762. echo "#endif" ; \
  763. done > $@T
  764. @mv $@T $@
  765. # Write $(srcdir)/cpp-{E,SIG}.syms.NEW if there are any not-yet-seen
  766. # ("new" to us) E* or SIG* symbols in <errno.h> or <signal.h>, respectively.
  767. chknew-E chknew-SIG:
  768. @bit=`echo $@ | sed s/^chknew-//` ; \
  769. old="$(srcdir)/cpp-$$bit.syms" ; \
  770. echo "#include <$${bit}.h>" \
  771. | sed 's/E/errno/;s/SIG/signal/' \
  772. | gcc -dM -E - \
  773. | sed 's/^#define //;/^'$$bit'[0-9A-Z][0-9A-Z]* /!d;s/ .*//' \
  774. | sort | diff -u $$old - | sed '1,2d;/^+/!d;s/^.//' \
  775. > TMP ; \
  776. if [ -s TMP ] ; then new="$$old.NEW" ; \
  777. cat $$old TMP | sort > $$new ; \
  778. echo "$$new: `sed -n '$$=' TMP` new symbol(s)." ; \
  779. sed 's/^/ /' TMP ; \
  780. else echo "No new symbols found." ; \
  781. fi ; rm TMP
  782. MOSTLYCLEANFILES = \
  783. scmconfig.h scmconfig.h.tmp
  784. CLEANFILES = libpath.h *.x *.doc guile-procedures.txt guile-procedures.texi guile.texi
  785. MAINTAINERCLEANFILES = c-tokenize.c