Makefile.am 22 KB

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