Makefile.in 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476
  1. # Makefile.in --
  2. #
  3. # This file is a Makefile for Sample TEA Extension. If it has the name
  4. # "Makefile.in" then it is a template for a Makefile; to generate the
  5. # actual Makefile, run "./configure", which is a configuration script
  6. # generated by the "autoconf" program (constructs like "@foo@" will get
  7. # replaced in the actual Makefile.
  8. #
  9. # Copyright (c) 1999 Scriptics Corporation.
  10. # Copyright (c) 2002-2005 ActiveState Corporation.
  11. #
  12. # See the file "license.terms" for information on usage and redistribution
  13. # of this file, and for a DISCLAIMER OF ALL WARRANTIES.
  14. #========================================================================
  15. # Add additional lines to handle any additional AC_SUBST cases that
  16. # have been added in a customized configure script.
  17. #========================================================================
  18. #SAMPLE_NEW_VAR = @SAMPLE_NEW_VAR@
  19. #========================================================================
  20. # Nothing of the variables below this line should need to be changed.
  21. # Please check the TARGETS section below to make sure the make targets
  22. # are correct.
  23. #========================================================================
  24. #========================================================================
  25. # The names of the source files is defined in the configure script.
  26. # The object files are used for linking into the final library.
  27. # This will be used when a dist target is added to the Makefile.
  28. # It is not important to specify the directory, as long as it is the
  29. # $(srcdir) or in the generic, win or unix subdirectory.
  30. #========================================================================
  31. PKG_SOURCES = @PKG_SOURCES@
  32. PKG_OBJECTS = @PKG_OBJECTS@
  33. PKG_STUB_SOURCES = @PKG_STUB_SOURCES@
  34. PKG_STUB_OBJECTS = @PKG_STUB_OBJECTS@
  35. #========================================================================
  36. # PKG_TCL_SOURCES identifies Tcl runtime files that are associated with
  37. # this package that need to be installed, if any.
  38. #========================================================================
  39. PKG_TCL_SOURCES = @PKG_TCL_SOURCES@
  40. #========================================================================
  41. # This is a list of public header files to be installed, if any.
  42. #========================================================================
  43. PKG_HEADERS = @PKG_HEADERS@
  44. #========================================================================
  45. # "PKG_LIB_FILE" refers to the library (dynamic or static as per
  46. # configuration options) composed of the named objects.
  47. #========================================================================
  48. PKG_LIB_FILE = @PKG_LIB_FILE@
  49. PKG_LIB_FILE8 = @PKG_LIB_FILE8@
  50. PKG_LIB_FILE9 = @PKG_LIB_FILE9@
  51. PKG_STUB_LIB_FILE = @PKG_STUB_LIB_FILE@
  52. lib_BINARIES = $(PKG_LIB_FILE)
  53. BINARIES = $(lib_BINARIES)
  54. SHELL = @SHELL@
  55. srcdir = @srcdir@
  56. prefix = @prefix@
  57. exec_prefix = @exec_prefix@
  58. bindir = @bindir@
  59. libdir = @libdir@
  60. includedir = @includedir@
  61. datarootdir = @datarootdir@
  62. runstatedir = @runstatedir@
  63. datadir = @datadir@
  64. mandir = @mandir@
  65. DESTDIR =
  66. PKG_DIR = $(PACKAGE_NAME)$(PACKAGE_VERSION)
  67. pkgdatadir = $(datadir)/$(PKG_DIR)
  68. pkglibdir = $(libdir)/$(PKG_DIR)
  69. pkgincludedir = $(includedir)/$(PKG_DIR)
  70. top_builddir = @abs_top_builddir@
  71. INSTALL_OPTIONS =
  72. INSTALL = @INSTALL@ $(INSTALL_OPTIONS)
  73. INSTALL_DATA_DIR = @INSTALL_DATA_DIR@
  74. INSTALL_DATA = @INSTALL_DATA@
  75. INSTALL_PROGRAM = @INSTALL_PROGRAM@
  76. INSTALL_SCRIPT = @INSTALL_SCRIPT@
  77. INSTALL_LIBRARY = @INSTALL_LIBRARY@
  78. PACKAGE_NAME = @PACKAGE_NAME@
  79. PACKAGE_VERSION = @PACKAGE_VERSION@
  80. CC = @CC@
  81. CCLD = @CCLD@
  82. CFLAGS_DEFAULT = @CFLAGS_DEFAULT@
  83. CFLAGS_WARNING = @CFLAGS_WARNING@
  84. EXEEXT = @EXEEXT@
  85. LDFLAGS_DEFAULT = @LDFLAGS_DEFAULT@
  86. MAKE_LIB = @MAKE_LIB@
  87. MAKE_STUB_LIB = @MAKE_STUB_LIB@
  88. OBJEXT = @OBJEXT@
  89. RANLIB = @RANLIB@
  90. RANLIB_STUB = @RANLIB_STUB@
  91. SHLIB_CFLAGS = @SHLIB_CFLAGS@
  92. SHLIB_LD = @SHLIB_LD@
  93. SHLIB_LD_LIBS = @SHLIB_LD_LIBS@
  94. STLIB_LD = @STLIB_LD@
  95. #TCL_DEFS = @TCL_DEFS@
  96. TCL_BIN_DIR = @TCL_BIN_DIR@
  97. TCL_SRC_DIR = @TCL_SRC_DIR@
  98. #TK_BIN_DIR = @TK_BIN_DIR@
  99. #TK_SRC_DIR = @TK_SRC_DIR@
  100. # Not used, but retained for reference of what libs Tcl required
  101. #TCL_LIBS = @TCL_LIBS@
  102. #========================================================================
  103. # TCLLIBPATH seeds the auto_path in Tcl's init.tcl so we can test our
  104. # package without installing. The other environment variables allow us
  105. # to test against an uninstalled Tcl. Add special env vars that you
  106. # require for testing here (like TCLX_LIBRARY).
  107. #========================================================================
  108. EXTRA_PATH = $(top_builddir):$(TCL_BIN_DIR)
  109. #EXTRA_PATH = $(top_builddir):$(TCL_BIN_DIR):$(TK_BIN_DIR)
  110. TCLLIBPATH = $(top_builddir)
  111. TCLSH_ENV = TCL_LIBRARY=`@CYGPATH@ $(TCL_SRC_DIR)/library`
  112. PKG_ENV = @LD_LIBRARY_PATH_VAR@="$(EXTRA_PATH):$(@LD_LIBRARY_PATH_VAR@)" \
  113. PATH="$(EXTRA_PATH):$(PATH)" \
  114. TCLLIBPATH="$(TCLLIBPATH)"
  115. TCLSH_PROG = @TCLSH_PROG@
  116. TCLSH = $(TCLSH_ENV) $(PKG_ENV) $(TCLSH_PROG)
  117. #WISH_ENV = TK_LIBRARY=`@CYGPATH@ $(TK_SRC_DIR)/library`
  118. #WISH_PROG = @WISH_PROG@
  119. #WISH = $(TCLSH_ENV) $(WISH_ENV) $(PKG_ENV) $(WISH_PROG)
  120. SHARED_BUILD = @SHARED_BUILD@
  121. INCLUDES = @PKG_INCLUDES@ @TCL_INCLUDES@ -I.
  122. #INCLUDES = @PKG_INCLUDES@ @TCL_INCLUDES@ @TK_INCLUDES@ @TK_XINCLUDES@
  123. PKG_CFLAGS = @PKG_CFLAGS@
  124. # TCL_DEFS is not strictly need here, but if you remove it, then you
  125. # must make sure that configure.ac checks for the necessary components
  126. # that your library may use. TCL_DEFS can actually be a problem if
  127. # you do not compile with a similar machine setup as the Tcl core was
  128. # compiled with.
  129. #DEFS = $(TCL_DEFS) @DEFS@ $(PKG_CFLAGS)
  130. DEFS = @DEFS@ $(PKG_CFLAGS)
  131. # Move pkgIndex.tcl to 'BINARIES' var if it is generated in the Makefile
  132. CONFIG_CLEAN_FILES = Makefile pkgIndex.tcl
  133. CLEANFILES = @CLEANFILES@
  134. CPPFLAGS = @CPPFLAGS@
  135. LIBS = @PKG_LIBS@ @LIBS@
  136. AR = @AR@
  137. CFLAGS = @CFLAGS@
  138. LDFLAGS = @LDFLAGS@
  139. LDFLAGS_DEFAULT = @LDFLAGS_DEFAULT@
  140. COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) \
  141. $(CFLAGS_DEFAULT) $(CFLAGS_WARNING) $(SHLIB_CFLAGS) $(CFLAGS)
  142. GDB = gdb
  143. VALGRIND = valgrind
  144. VALGRINDARGS = --tool=memcheck --num-callers=8 --leak-resolution=high \
  145. --leak-check=yes --show-reachable=yes -v
  146. .SUFFIXES: .c .$(OBJEXT)
  147. #========================================================================
  148. # Start of user-definable TARGETS section
  149. #========================================================================
  150. #========================================================================
  151. # TEA TARGETS. Please note that the "libraries:" target refers to platform
  152. # independent files, and the "binaries:" target includes executable programs and
  153. # platform-dependent libraries. Modify these targets so that they install
  154. # the various pieces of your package. The make and install rules
  155. # for the BINARIES that you specified above have already been done.
  156. #========================================================================
  157. all: binaries libraries doc
  158. #========================================================================
  159. # The binaries target builds executable programs, Windows .dll's, unix
  160. # shared/static libraries, and any other platform-dependent files.
  161. # The list of targets to build for "binaries:" is specified at the top
  162. # of the Makefile, in the "BINARIES" variable.
  163. #========================================================================
  164. binaries: $(BINARIES)
  165. libraries:
  166. #========================================================================
  167. # Your doc target should differentiate from doc builds (by the developer)
  168. # and doc installs (see install-doc), which just install the docs on the
  169. # end user machine when building from source.
  170. #========================================================================
  171. doc:
  172. @echo "If you have documentation to create, place the commands to"
  173. @echo "build the docs in the 'doc:' target. For example:"
  174. @echo " xml2nroff sample.xml > sample.n"
  175. @echo " xml2html sample.xml > sample.html"
  176. #install: all install-binaries install-libraries install-doc
  177. install: all install-binaries install-libraries
  178. install-binaries: binaries install-lib-binaries install-bin-binaries
  179. #========================================================================
  180. # This rule installs platform-independent files, such as header files.
  181. # The list=...; for p in $$list handles the empty list case x-platform.
  182. #========================================================================
  183. install-libraries: libraries
  184. @$(INSTALL_DATA_DIR) "$(DESTDIR)$(includedir)"
  185. @echo "Installing header files in $(DESTDIR)$(includedir)"
  186. @list='$(PKG_HEADERS)'; for i in $$list; do \
  187. echo "Installing $(srcdir)/$$i" ; \
  188. $(INSTALL_DATA) $(srcdir)/$$i "$(DESTDIR)$(includedir)" ; \
  189. done;
  190. #========================================================================
  191. # Install documentation. Unix manpages should go in the $(mandir)
  192. # directory.
  193. #========================================================================
  194. install-doc: doc
  195. @$(INSTALL_DATA_DIR) "$(DESTDIR)$(mandir)/mann"
  196. @echo "Installing documentation in $(DESTDIR)$(mandir)"
  197. @list='$(srcdir)/doc/*.n'; for i in $$list; do \
  198. echo "Installing $$i"; \
  199. $(INSTALL_DATA) $$i "$(DESTDIR)$(mandir)/mann" ; \
  200. done
  201. test: binaries libraries
  202. $(TCLSH) `@CYGPATH@ $(srcdir)/tests/all.tcl` $(TESTFLAGS) \
  203. -load "package ifneeded $(PACKAGE_NAME) $(PACKAGE_VERSION) \
  204. [list load `@CYGPATH@ $(PKG_LIB_FILE)` [string totitle $(PACKAGE_NAME)]]"
  205. shell: binaries libraries
  206. @$(TCLSH) $(SCRIPT)
  207. gdb:
  208. $(TCLSH_ENV) $(PKG_ENV) $(GDB) $(TCLSH_PROG) $(SCRIPT)
  209. gdb-test: binaries libraries
  210. $(TCLSH_ENV) $(PKG_ENV) $(GDB) \
  211. --args $(TCLSH_PROG) `@CYGPATH@ $(srcdir)/tests/all.tcl` \
  212. $(TESTFLAGS) -singleproc 1 \
  213. -load "package ifneeded $(PACKAGE_NAME) $(PACKAGE_VERSION) \
  214. [list load `@CYGPATH@ $(PKG_LIB_FILE)` [string totitle $(PACKAGE_NAME)]]"
  215. valgrind: binaries libraries
  216. $(TCLSH_ENV) $(PKG_ENV) $(VALGRIND) $(VALGRINDARGS) $(TCLSH_PROG) \
  217. `@CYGPATH@ $(srcdir)/tests/all.tcl` $(TESTFLAGS)
  218. valgrindshell: binaries libraries
  219. $(TCLSH_ENV) $(PKG_ENV) $(VALGRIND) $(VALGRINDARGS) $(TCLSH_PROG) $(SCRIPT)
  220. depend:
  221. #========================================================================
  222. # $(PKG_LIB_FILE) should be listed as part of the BINARIES variable
  223. # mentioned above. That will ensure that this target is built when you
  224. # run "make binaries".
  225. #
  226. # The $(PKG_OBJECTS) objects are created and linked into the final
  227. # library. In most cases these object files will correspond to the
  228. # source files above.
  229. #========================================================================
  230. $(PKG_LIB_FILE): $(PKG_OBJECTS)
  231. -rm -f $(PKG_LIB_FILE)
  232. ${MAKE_LIB}
  233. $(RANLIB) $(PKG_LIB_FILE)
  234. $(PKG_STUB_LIB_FILE): $(PKG_STUB_OBJECTS)
  235. -rm -f $(PKG_STUB_LIB_FILE)
  236. ${MAKE_STUB_LIB}
  237. $(RANLIB_STUB) $(PKG_STUB_LIB_FILE)
  238. #========================================================================
  239. # We need to enumerate the list of .c to .o lines here.
  240. #
  241. # In the following lines, $(srcdir) refers to the toplevel directory
  242. # containing your extension. If your sources are in a subdirectory,
  243. # you will have to modify the paths to reflect this:
  244. #
  245. # sample.$(OBJEXT): $(srcdir)/generic/sample.c
  246. # $(COMPILE) -c `@CYGPATH@ $(srcdir)/generic/sample.c` -o $@
  247. #
  248. # Setting the VPATH variable to a list of paths will cause the makefile
  249. # to look into these paths when resolving .c to .obj dependencies.
  250. # As necessary, add $(srcdir):$(srcdir)/compat:....
  251. #========================================================================
  252. VPATH = $(srcdir):$(srcdir)/../backend
  253. .c.@OBJEXT@:
  254. $(COMPILE) -c `@CYGPATH@ $<` -o $@
  255. $(srcdir)/manifest.uuid:
  256. printf "git-" >$(srcdir)/manifest.uuid
  257. (cd $(srcdir); git rev-parse HEAD >>$(srcdir)/manifest.uuid || \
  258. (printf "svn-r" >$(srcdir)/manifest.uuid ; \
  259. svn info --show-item last-changed-revision >>$(srcdir)/manifest.uuid) || \
  260. printf "unknown" >$(srcdir)/manifest.uuid)
  261. sampleUuid.h: $(srcdir)/manifest.uuid
  262. echo "#define SAMPLE_VERSION_UUID \\" >$@
  263. cat $(srcdir)/manifest.uuid >>$@
  264. echo "" >>$@
  265. #========================================================================
  266. # Distribution creation
  267. # You may need to tweak this target to make it work correctly.
  268. #========================================================================
  269. #COMPRESS = tar cvf $(PKG_DIR).tar $(PKG_DIR); compress $(PKG_DIR).tar
  270. COMPRESS = tar zcvf $(PKG_DIR).tar.gz $(PKG_DIR)
  271. DIST_ROOT = /tmp/dist
  272. DIST_DIR = $(DIST_ROOT)/$(PKG_DIR)
  273. DIST_INSTALL_DATA = CPPROG='cp -p' $(INSTALL) -m 644
  274. DIST_INSTALL_SCRIPT = CPPROG='cp -p' $(INSTALL) -m 755
  275. dist-clean:
  276. rm -rf $(DIST_DIR) $(DIST_ROOT)/$(PKG_DIR).tar.*
  277. dist: dist-clean $(srcdir)/manifest.uuid
  278. $(INSTALL_DATA_DIR) $(DIST_DIR)
  279. # TEA files
  280. $(DIST_INSTALL_DATA) $(srcdir)/Makefile.in \
  281. $(srcdir)/aclocal.m4 $(srcdir)/configure.ac \
  282. $(DIST_DIR)/
  283. $(DIST_INSTALL_SCRIPT) $(srcdir)/configure $(DIST_DIR)/
  284. $(INSTALL_DATA_DIR) $(DIST_DIR)/tclconfig
  285. $(DIST_INSTALL_DATA) $(srcdir)/tclconfig/README.txt \
  286. $(srcdir)/manifest.uuid \
  287. $(srcdir)/tclconfig/tcl.m4 $(srcdir)/tclconfig/install-sh \
  288. $(DIST_DIR)/tclconfig/
  289. # Extension files
  290. $(DIST_INSTALL_DATA) \
  291. $(srcdir)/ChangeLog \
  292. $(srcdir)/README.sha \
  293. $(srcdir)/license.terms \
  294. $(srcdir)/README \
  295. $(srcdir)/pkgIndex.tcl.in \
  296. $(DIST_DIR)/
  297. list='demos doc generic library macosx tests unix win'; \
  298. for p in $$list; do \
  299. if test -d $(srcdir)/$$p ; then \
  300. $(INSTALL_DATA_DIR) $(DIST_DIR)/$$p; \
  301. $(DIST_INSTALL_DATA) $(srcdir)/$$p/* $(DIST_DIR)/$$p/; \
  302. fi; \
  303. done
  304. (cd $(DIST_ROOT); $(COMPRESS);)
  305. #========================================================================
  306. # End of user-definable section
  307. #========================================================================
  308. #========================================================================
  309. # Don't modify the file to clean here. Instead, set the "CLEANFILES"
  310. # variable in configure.ac
  311. #========================================================================
  312. clean:
  313. -test -z "$(BINARIES)" || rm -f $(BINARIES)
  314. -rm -f *.$(OBJEXT) core *.core
  315. -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
  316. distclean: clean
  317. -rm -f *.tab.c
  318. -rm -f $(CONFIG_CLEAN_FILES)
  319. -rm -f config.cache config.log config.status
  320. #========================================================================
  321. # Install binary object libraries. On Windows this includes both .dll and
  322. # .lib files. Because the .lib files are not explicitly listed anywhere,
  323. # we need to deduce their existence from the .dll file of the same name.
  324. # Library files go into the lib directory.
  325. # In addition, this will generate the pkgIndex.tcl
  326. # file in the install location (assuming it can find a usable tclsh shell)
  327. #
  328. # You should not have to modify this target.
  329. #========================================================================
  330. install-lib-binaries: binaries
  331. @$(INSTALL_DATA_DIR) "$(DESTDIR)$(pkglibdir)"
  332. @list='$(lib_BINARIES)'; for p in $$list; do \
  333. if test -f $$p; then \
  334. echo " $(INSTALL_LIBRARY) $$p $(DESTDIR)$(pkglibdir)/$$p"; \
  335. $(INSTALL_LIBRARY) $$p "$(DESTDIR)$(pkglibdir)/$$p"; \
  336. ext=`echo $$p|sed -e "s/.*\.//"`; \
  337. if test "x$$ext" = "xdll"; then \
  338. lib=`basename $$p|sed -e 's/.[^.]*$$//'`.lib; \
  339. if test -f $$lib; then \
  340. echo " $(INSTALL_DATA) $$lib $(DESTDIR)$(pkglibdir)/$$lib"; \
  341. $(INSTALL_DATA) $$lib "$(DESTDIR)$(pkglibdir)/$$lib"; \
  342. fi; \
  343. fi; \
  344. fi; \
  345. done
  346. @list='$(PKG_TCL_SOURCES)'; for p in $$list; do \
  347. if test -f $(srcdir)/$$p; then \
  348. destp=`basename $$p`; \
  349. echo " Install $$destp $(DESTDIR)$(pkglibdir)/$$destp"; \
  350. $(INSTALL_DATA) $(srcdir)/$$p "$(DESTDIR)$(pkglibdir)/$$destp"; \
  351. fi; \
  352. done
  353. @if test "x$(SHARED_BUILD)" = "x1"; then \
  354. echo " Install pkgIndex.tcl $(DESTDIR)$(pkglibdir)"; \
  355. $(INSTALL_DATA) pkgIndex.tcl "$(DESTDIR)$(pkglibdir)"; \
  356. fi
  357. #========================================================================
  358. # Install binary executables (e.g. .exe files and dependent .dll files)
  359. # This is for files that must go in the bin directory (located next to
  360. # wish and tclsh), like dependent .dll files on Windows.
  361. #
  362. # You should not have to modify this target, except to define bin_BINARIES
  363. # above if necessary.
  364. #========================================================================
  365. install-bin-binaries: binaries
  366. @$(INSTALL_DATA_DIR) "$(DESTDIR)$(bindir)"
  367. @list='$(bin_BINARIES)'; for p in $$list; do \
  368. if test -f $$p; then \
  369. echo " $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/$$p"; \
  370. $(INSTALL_PROGRAM) $$p "$(DESTDIR)$(bindir)/$$p"; \
  371. fi; \
  372. done
  373. Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
  374. cd $(top_builddir) \
  375. && CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status
  376. uninstall-binaries:
  377. list='$(lib_BINARIES)'; for p in $$list; do \
  378. rm -f "$(DESTDIR)$(pkglibdir)/$$p"; \
  379. done
  380. list='$(PKG_TCL_SOURCES)'; for p in $$list; do \
  381. p=`basename $$p`; \
  382. rm -f "$(DESTDIR)$(pkglibdir)/$$p"; \
  383. done
  384. list='$(bin_BINARIES)'; for p in $$list; do \
  385. rm -f "$(DESTDIR)$(bindir)/$$p"; \
  386. done
  387. .PHONY: all binaries clean depend distclean doc install libraries test
  388. .PHONY: gdb gdb-test valgrind valgrindshell
  389. # Tell versions [3.59,3.63) of GNU make to not export all variables.
  390. # Otherwise a system limit (for SysV at least) may be exceeded.
  391. .NOEXPORT: