Makefile.am 23 KB

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