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.
9 # Copyright (c) 1999 Scriptics Corporation.
10 # Copyright (c) 2002-2005 ActiveState Corporation.
12 # See the file "license.terms" for information on usage and redistribution
13 # of this file, and for a DISCLAIMER OF ALL WARRANTIES.
15 # RCS: @(#) $Id: Makefile.in,v 1.66 2009/03/18 18:39:42 stwo Exp $
17 #========================================================================
18 # Add additional lines to handle any additional AC_SUBST cases that
19 # have been added in a customized configure script.
20 #========================================================================
22 #SAMPLE_NEW_VAR = @SAMPLE_NEW_VAR@
24 #========================================================================
25 # Nothing of the variables below this line should need to be changed.
26 # Please check the TARGETS section below to make sure the make targets
28 #========================================================================
30 #========================================================================
31 # The names of the source files is defined in the configure script.
32 # The object files are used for linking into the final library.
33 # This will be used when a dist target is added to the Makefile.
34 # It is not important to specify the directory, as long as it is the
35 # $(srcdir) or in the generic, win or unix subdirectory.
36 #========================================================================
38 PKG_SOURCES = @PKG_SOURCES@
39 TCLCURL_SCRIPTS = @TCLCURL_SCRIPTS@
40 PKG_OBJECTS = @PKG_OBJECTS@
42 PKG_STUB_SOURCES = @PKG_STUB_SOURCES@
43 PKG_STUB_OBJECTS = @PKG_STUB_OBJECTS@
45 #========================================================================
46 # PKG_TCL_SOURCES identifies Tcl runtime files that are associated with
47 # this package that need to be installed, if any.
48 #========================================================================
50 PKG_TCL_SOURCES = @PKG_TCL_SOURCES@
52 #========================================================================
53 # This is a list of public header files to be installed, if any.
54 #========================================================================
56 PKG_HEADERS = @PKG_HEADERS@
58 #========================================================================
59 # "PKG_LIB_FILE" refers to the library (dynamic or static as per
60 # configuration options) composed of the named objects.
61 #========================================================================
63 PKG_LIB_FILE = @PKG_LIB_FILE@
64 PKG_STUB_LIB_FILE = @PKG_STUB_LIB_FILE@
66 lib_BINARIES = $(PKG_LIB_FILE)
67 BINARIES = $(lib_BINARIES)
73 exec_prefix = @exec_prefix@
77 includedir = @includedir@
78 datarootdir = @datarootdir@
84 PKG_DIR = $(PACKAGE_NAME)$(PACKAGE_VERSION)
85 pkgdatadir = $(datadir)/$(PKG_DIR)
86 pkglibdir = $(libdir)/$(PKG_DIR)
87 pkgincludedir = $(includedir)/$(PKG_DIR)
92 INSTALL_PROGRAM = @INSTALL_PROGRAM@
93 INSTALL_LIBRARY = @INSTALL_PROGRAM@
94 INSTALL_DATA = @INSTALL_DATA@
95 INSTALL_SCRIPT = @INSTALL_SCRIPT@
97 PACKAGE_NAME = @PACKAGE_NAME@
98 PACKAGE_VERSION = @PACKAGE_VERSION@
100 CFLAGS_DEFAULT = @CFLAGS_DEFAULT@
101 CFLAGS_WARNING = @CFLAGS_WARNING@
103 LDFLAGS_DEFAULT = @LDFLAGS_DEFAULT@
104 MAKE_LIB = @MAKE_LIB@
105 MAKE_SHARED_LIB = @MAKE_SHARED_LIB@
106 MAKE_STATIC_LIB = @MAKE_STATIC_LIB@
107 MAKE_STUB_LIB = @MAKE_STUB_LIB@
110 RANLIB_STUB = @RANLIB_STUB@
111 SHLIB_CFLAGS = @SHLIB_CFLAGS@
112 SHLIB_LD = @SHLIB_LD@
113 SHLIB_LD_LIBS = @SHLIB_LD_LIBS@
114 STLIB_LD = @STLIB_LD@
115 #TCL_DEFS = @TCL_DEFS@
116 TCL_BIN_DIR = @TCL_BIN_DIR@
117 TCL_SRC_DIR = @TCL_SRC_DIR@
118 #TK_BIN_DIR = @TK_BIN_DIR@
119 #TK_SRC_DIR = @TK_SRC_DIR@
121 # Not used, but retained for reference of what libs Tcl required
122 #TCL_LIBS = @TCL_LIBS@
124 #========================================================================
125 # TCLLIBPATH seeds the auto_path in Tcl's init.tcl so we can test our
126 # package without installing. The other environment variables allow us
127 # to test against an uninstalled Tcl. Add special env vars that you
128 # require for testing here (like TCLX_LIBRARY).
129 #========================================================================
131 EXTRA_PATH = $(top_builddir):$(TCL_BIN_DIR)
132 #EXTRA_PATH = $(top_builddir):$(TCL_BIN_DIR):$(TK_BIN_DIR)
133 TCLLIBPATH = $(top_builddir)
134 TCLSH_ENV = TCL_LIBRARY=`@CYGPATH@ $(TCL_SRC_DIR)/library`
135 PKG_ENV = @LD_LIBRARY_PATH_VAR@="$(EXTRA_PATH):$(@LD_LIBRARY_PATH_VAR@)" \
136 PATH="$(EXTRA_PATH):$(PATH)" \
137 TCLLIBPATH="$(TCLLIBPATH)"
139 TCLSH_PROG = @TCLSH_PROG@
140 TCLSH = $(PKG_ENV) $(TCLSH_ENV) $(TCLSH_PROG)
142 #WISH_ENV = TK_LIBRARY=`@CYGPATH@ $(TK_SRC_DIR)/library`
143 #WISH_PROG = @WISH_PROG@
144 #WISH = $(PKG_ENV) $(TCLSH_ENV) $(WISH_ENV) $(WISH_PROG)
146 SHARED_BUILD = @SHARED_BUILD@
148 INCLUDES = @PKG_INCLUDES@ @TCL_INCLUDES@
149 #INCLUDES = @PKG_INCLUDES@ @TCL_INCLUDES@ @TK_INCLUDES@ @TK_XINCLUDES@
151 PKG_CFLAGS = @PKG_CFLAGS@
153 # TCL_DEFS is not strictly need here, but if you remove it, then you
154 # must make sure that configure.in checks for the necessary components
155 # that your library may use. TCL_DEFS can actually be a problem if
156 # you do not compile with a similar machine setup as the Tcl core was
158 #DEFS = $(TCL_DEFS) @DEFS@ $(PKG_CFLAGS)
159 DEFS = @DEFS@ $(PKG_CFLAGS)
161 # Move pkgIndex.tcl to 'BINARIES' var if it is generated in the Makefile
162 CONFIG_CLEAN_FILES = Makefile pkgIndex.tcl
163 CLEANFILES = @CLEANFILES@
165 CPPFLAGS = @CPPFLAGS@
166 LIBS = @PKG_LIBS@ @LIBS@
169 COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
171 #========================================================================
172 # Start of user-definable TARGETS section
173 #========================================================================
175 #========================================================================
176 # TEA TARGETS. Please note that the "libraries:" target refers to platform
177 # independent files, and the "binaries:" target inclues executable programs and
178 # platform-dependent libraries. Modify these targets so that they install
179 # the various pieces of your package. The make and install rules
180 # for the BINARIES that you specified above have already been done.
181 #========================================================================
183 all: binaries libraries doc
185 #========================================================================
186 # The binaries target builds executable programs, Windows .dll's, unix
187 # shared/static libraries, and any other platform-dependent files.
188 # The list of targets to build for "binaries:" is specified at the top
189 # of the Makefile, in the "BINARIES" variable.
190 #========================================================================
192 binaries: $(BINARIES)
196 scripts: $(TCLCURL_SCRIPTS)
198 #========================================================================
199 # Your doc target should differentiate from doc builds (by the developer)
200 # and doc installs (see install-doc), which just install the docs on the
201 # end user machine when building from source.
202 #========================================================================
208 install: all install-binaries install-scripts install-libraries install-doc
210 install-binaries: binaries install-lib-binaries install-bin-binaries
212 #========================================================================
213 # This rule installs platform-independent files, such as header files.
214 # The list=...; for p in $$list handles the empty list case x-platform.
215 #========================================================================
217 install-libraries: libraries
218 @mkdir -p $(DESTDIR)$(includedir)
219 @echo "Installing header files in $(DESTDIR)$(includedir)"
220 @list='$(PKG_HEADERS)'; for i in $$list; do \
221 echo "Installing $(srcdir)/$$i" ; \
222 $(INSTALL_DATA) $(srcdir)/$$i $(DESTDIR)$(includedir) ; \
225 #========================================================================
226 # Install documentation. Unix manpages should go in the $(mandir)
228 #========================================================================
231 @mkdir -p $(DESTDIR)$(mandir)/mann
232 @echo "Installing documentation in $(DESTDIR)$(mandir)"
233 @list='$(srcdir)/doc/*.n'; for i in $$list; do \
234 echo "Installing $$i"; \
235 rm -f $(DESTDIR)$(mandir)/mann/`basename $$i`; \
237 $(INSTALL_DATA) $$i.gz $(DESTDIR)$(mandir)/mann ; \
241 test: binaries libraries
242 $(TCLSH) `@CYGPATH@ $(srcdir)/tests/all.tcl` $(TESTFLAGS)
244 shell: binaries libraries
248 $(TCLSH_ENV) gdb $(TCLSH_PROG) $(SCRIPT)
252 #========================================================================
253 # $(PKG_LIB_FILE) should be listed as part of the BINARIES variable
254 # mentioned above. That will ensure that this target is built when you
255 # run "make binaries".
257 # The $(PKG_OBJECTS) objects are created and linked into the final
258 # library. In most cases these object files will correspond to the
259 # source files above.
260 #========================================================================
262 $(PKG_LIB_FILE): $(PKG_OBJECTS)
263 -rm -f $(PKG_LIB_FILE)
265 $(RANLIB) $(PKG_LIB_FILE)
267 $(PKG_STUB_LIB_FILE): $(PKG_STUB_OBJECTS)
268 -rm -f $(PKG_STUB_LIB_FILE)
270 $(RANLIB_STUB) $(PKG_STUB_LIB_FILE)
272 #========================================================================
273 # We need to enumerate the list of .c to .o lines here.
275 # In the following lines, $(srcdir) refers to the toplevel directory
276 # containing your extension. If your sources are in a subdirectory,
277 # you will have to modify the paths to reflect this:
279 # sample.$(OBJEXT): $(srcdir)/generic/sample.c
280 # $(COMPILE) -c `@CYGPATH@ $(srcdir)/generic/sample.c` -o $@
282 # Setting the VPATH variable to a list of paths will cause the makefile
283 # to look into these paths when resolving .c to .obj dependencies.
284 # As necessary, add $(srcdir):$(srcdir)/compat:....
285 #========================================================================
287 VPATH = $(srcdir):$(srcdir)/generic:$(srcdir)/unix:$(srcdir)/win
290 $(COMPILE) -c `@CYGPATH@ $<` -o $@
292 #========================================================================
293 # Distribution creation
294 # You may need to tweak this target to make it work correctly.
295 #========================================================================
297 #COMPRESS = tar cvf $(PKG_DIR).tar $(PKG_DIR); compress $(PKG_DIR).tar
298 COMPRESS = gtar zcvf $(PKG_DIR).tar.gz $(PKG_DIR)
299 DIST_ROOT = /tmp/dist
300 DIST_DIR = $(DIST_ROOT)/$(PKG_DIR)
303 rm -rf $(DIST_DIR) $(DIST_ROOT)/$(PKG_DIR).tar.*
307 cp -p $(srcdir)/ChangeLog $(srcdir)/README* $(srcdir)/license* \
308 $(srcdir)/aclocal.m4 $(srcdir)/configure $(srcdir)/*.in \
310 chmod 664 $(DIST_DIR)/Makefile.in $(DIST_DIR)/aclocal.m4
311 chmod 775 $(DIST_DIR)/configure $(DIST_DIR)/configure.in
313 for i in $(srcdir)/*.[ch]; do \
314 if [ -f $$i ]; then \
315 cp -p $$i $(DIST_DIR)/ ; \
319 mkdir $(DIST_DIR)/tclconfig
320 cp $(srcdir)/tclconfig/install-sh $(srcdir)/tclconfig/tcl.m4 \
321 $(DIST_DIR)/tclconfig/
322 chmod 664 $(DIST_DIR)/tclconfig/tcl.m4
323 chmod +x $(DIST_DIR)/tclconfig/install-sh
325 list='demos doc generic library mac tests unix win'; \
326 for p in $$list; do \
327 if test -d $(srcdir)/$$p ; then \
328 mkdir $(DIST_DIR)/$$p; \
329 cp -p $(srcdir)/$$p/*.* $(DIST_DIR)/$$p/; \
333 (cd $(DIST_ROOT); $(COMPRESS);)
335 #========================================================================
336 # End of user-definable section
337 #========================================================================
339 #========================================================================
340 # Don't modify the file to clean here. Instead, set the "CLEANFILES"
341 # variable in configure.in
342 #========================================================================
345 -test -z "$(BINARIES)" || rm -f $(BINARIES)
346 -rm -f *.$(OBJEXT) core *.core
347 -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
351 -rm -f $(CONFIG_CLEAN_FILES)
352 -rm -f config.cache config.log config.status
354 #========================================================================
355 # Install binary object libraries. On Windows this includes both .dll and
356 # .lib files. Because the .lib files are not explicitly listed anywhere,
357 # we need to deduce their existence from the .dll file of the same name.
358 # Library files go into the lib directory.
359 # In addition, this will generate the pkgIndex.tcl
360 # file in the install location (assuming it can find a usable tclsh shell)
362 # You should not have to modify this target.
363 #========================================================================
365 install-lib-binaries: binaries
366 @mkdir -p $(DESTDIR)$(pkglibdir)
367 @list='$(lib_BINARIES)'; for p in $$list; do \
368 if test -f $$p; then \
369 echo " $(INSTALL_LIBRARY) $$p $(DESTDIR)$(pkglibdir)/$$p"; \
370 $(INSTALL_LIBRARY) $$p $(DESTDIR)$(pkglibdir)/$$p; \
371 stub=`echo $$p|sed -e "s/.*\(stub\).*/\1/"`; \
372 if test "x$$stub" = "xstub"; then \
373 echo " $(RANLIB_STUB) $(DESTDIR)$(pkglibdir)/$$p"; \
374 $(RANLIB_STUB) $(DESTDIR)$(pkglibdir)/$$p; \
376 echo " $(RANLIB) $(DESTDIR)$(pkglibdir)/$$p"; \
377 $(RANLIB) $(DESTDIR)$(pkglibdir)/$$p; \
379 ext=`echo $$p|sed -e "s/.*\.//"`; \
380 if test "x$$ext" = "xdll"; then \
381 lib=`basename $$p|sed -e 's/.[^.]*$$//'`.lib; \
382 if test -f $$lib; then \
383 echo " $(INSTALL_DATA) $$lib $(DESTDIR)$(pkglibdir)/$$lib"; \
384 $(INSTALL_DATA) $$lib $(DESTDIR)$(pkglibdir)/$$lib; \
389 @list='$(PKG_TCL_SOURCES)'; for p in $$list; do \
390 if test -f $(srcdir)/$$p; then \
391 destp=`basename $$p`; \
392 echo " Install $$destp $(DESTDIR)$(pkglibdir)/$$destp"; \
393 $(INSTALL_DATA) $(srcdir)/$$p $(DESTDIR)$(pkglibdir)/$$destp; \
396 @if test "x$(SHARED_BUILD)" = "x1"; then \
397 echo " Install pkgIndex.tcl $(DESTDIR)$(pkglibdir)"; \
398 $(INSTALL_DATA) pkgIndex.tcl $(DESTDIR)$(pkglibdir); \
401 #========================================================================
402 # Install binary executables (e.g. .exe files and dependent .dll files)
403 # This is for files that must go in the bin directory (located next to
404 # wish and tclsh), like dependent .dll files on Windows.
406 # You should not have to modify this target, except to define bin_BINARIES
407 # above if necessary.
408 #========================================================================
410 install-bin-binaries: binaries
411 @mkdir -p $(DESTDIR)$(bindir)
412 @list='$(bin_BINARIES)'; for p in $$list; do \
413 if test -f $$p; then \
414 echo " $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/$$p"; \
415 $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/$$p; \
419 #========================================================================
420 # This rule installs the scripts that are part of TclCurl.
421 #========================================================================
423 install-scripts: scripts
424 @for i in generic/$(TCLCURL_SCRIPTS) ; do \
425 echo "Installing $$i" ; \
426 $(INSTALL_DATA) $$i $(DESTDIR)$(pkglibdir) ; \
429 .SUFFIXES: .c .$(OBJEXT)
431 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
433 && CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status
436 list='$(lib_BINARIES)'; for p in $$list; do \
437 rm -f $(DESTDIR)$(pkglibdir)/$$p; \
439 list='$(PKG_TCL_SOURCES)'; for p in $$list; do \
441 rm -f $(DESTDIR)$(pkglibdir)/$$p; \
443 list='$(bin_BINARIES)'; for p in $$list; do \
444 rm -f $(DESTDIR)$(bindir)/$$p; \
448 @if test "x$(DESTDIR)$(libdir)" != x/usr; then \
449 echo "Checking Tcl's autoPath variable" ; \
450 $(TCLSH_PROG) $(srcdir)/checkAutoPath.tcl $(DESTDIR)$(libdir); \
454 .PHONY: all binaries clean depend distclean doc install libraries test
456 # Tell versions [3.59,3.63) of GNU make to not export all variables.
457 # Otherwise a system limit (for SysV at least) may be exceeded.