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.63 2007/02/09 19:06:47 hobbs 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 PKG_OBJECTS
= @PKG_OBJECTS@
41 PKG_STUB_SOURCES
= @PKG_STUB_SOURCES@
42 PKG_STUB_OBJECTS
= @PKG_STUB_OBJECTS@
44 #========================================================================
45 # PKG_TCL_SOURCES identifies Tcl runtime files that are associated with
46 # this package that need to be installed, if any.
47 #========================================================================
49 PKG_TCL_SOURCES
= @PKG_TCL_SOURCES@
51 #========================================================================
52 # This is a list of public header files to be installed, if any.
53 #========================================================================
55 PKG_HEADERS
= @PKG_HEADERS@
57 #========================================================================
58 # "PKG_LIB_FILE" refers to the library (dynamic or static as per
59 # configuration options) composed of the named objects.
60 #========================================================================
62 PKG_LIB_FILE
= @PKG_LIB_FILE@
63 PKG_STUB_LIB_FILE
= @PKG_STUB_LIB_FILE@
65 lib_BINARIES
= $(PKG_LIB_FILE
)
66 BINARIES
= $(lib_BINARIES
)
72 exec_prefix = @
exec_prefix@
76 includedir = @
includedir@
77 datarootdir
= @datarootdir@
83 PKG_DIR
= $(PACKAGE_NAME
)
84 pkgdatadir
= $(datadir)/$(PKG_DIR
)
85 pkglibdir
= $(libdir)/$(PKG_DIR
)
86 pkgincludedir
= $(includedir)/$(PKG_DIR
)
91 INSTALL_PROGRAM
= @INSTALL_PROGRAM@
92 INSTALL_DATA
= @INSTALL_DATA@
93 INSTALL_SCRIPT
= @INSTALL_SCRIPT@
95 PACKAGE_NAME
= @PACKAGE_NAME@
96 PACKAGE_VERSION
= @PACKAGE_VERSION@
98 CFLAGS_DEFAULT
= @CFLAGS_DEFAULT@
99 CFLAGS_WARNING
= @CFLAGS_WARNING@
101 LDFLAGS_DEFAULT
= @LDFLAGS_DEFAULT@
102 MAKE_LIB
= @MAKE_LIB@
103 MAKE_SHARED_LIB
= @MAKE_SHARED_LIB@
104 MAKE_STATIC_LIB
= @MAKE_STATIC_LIB@
105 MAKE_STUB_LIB
= @MAKE_STUB_LIB@
108 RANLIB_STUB
= @RANLIB_STUB@
109 SHLIB_CFLAGS
= @SHLIB_CFLAGS@
110 SHLIB_LD
= @SHLIB_LD@
111 SHLIB_LD_LIBS
= @SHLIB_LD_LIBS@
112 STLIB_LD
= @STLIB_LD@
113 #TCL_DEFS = @TCL_DEFS@
114 TCL_BIN_DIR
= @TCL_BIN_DIR@
115 TCL_SRC_DIR
= @TCL_SRC_DIR@
116 #TK_BIN_DIR = @TK_BIN_DIR@
117 #TK_SRC_DIR = @TK_SRC_DIR@
119 # Not used, but retained for reference of what libs Tcl required
120 #TCL_LIBS = @TCL_LIBS@
122 #========================================================================
123 # TCLLIBPATH seeds the auto_path in Tcl's init.tcl so we can test our
124 # package without installing. The other environment variables allow us
125 # to test against an uninstalled Tcl. Add special env vars that you
126 # require for testing here (like TCLX_LIBRARY).
127 #========================================================================
129 EXTRA_PATH
= $(top_builddir
):$(TCL_BIN_DIR
)
130 #EXTRA_PATH = $(top_builddir):$(TCL_BIN_DIR):$(TK_BIN_DIR)
131 TCLLIBPATH
= $(top_builddir
)
132 TCLSH_ENV
= TCL_LIBRARY
=`@CYGPATH@ $(TCL_SRC_DIR)/library` \
133 @LD_LIBRARY_PATH_VAR@
="$(EXTRA_PATH):$(@LD_LIBRARY_PATH_VAR@)" \
134 PATH
="$(EXTRA_PATH):$(PATH)" \
135 TCLLIBPATH
="$(TCLLIBPATH)"
136 # TK_LIBRARY=`@CYGPATH@ $(TK_SRC_DIR)/library`
138 TCLSH_PROG
= @TCLSH_PROG@
139 TCLSH
= $(TCLSH_ENV
) $(TCLSH_PROG
)
141 #WISH_PROG = @WISH_PROG@
142 #WISH = $(TCLSH_ENV) $(WISH_PROG)
145 SHARED_BUILD
= @SHARED_BUILD@
147 INCLUDES
= @PKG_INCLUDES@ @TCL_INCLUDES@
148 #INCLUDES = @PKG_INCLUDES@ @TCL_INCLUDES@ @TK_INCLUDES@ @TK_XINCLUDES@
150 PKG_CFLAGS
= @PKG_CFLAGS@
152 # TCL_DEFS is not strictly need here, but if you remove it, then you
153 # must make sure that configure.in checks for the necessary components
154 # that your library may use. TCL_DEFS can actually be a problem if
155 # you do not compile with a similar machine setup as the Tcl core was
157 #DEFS = $(TCL_DEFS) @DEFS@ $(PKG_CFLAGS)
158 DEFS
= @DEFS@
$(PKG_CFLAGS
)
160 # Move pkgIndex.tcl to 'BINARIES' var if it is generated in the Makefile
161 CONFIG_CLEAN_FILES
= Makefile pkgIndex.tcl
162 CLEANFILES
= @CLEANFILES@
164 CPPFLAGS
= @CPPFLAGS@
165 LIBS
= @PKG_LIBS@ @LIBS@
168 COMPILE
= $(CC
) $(DEFS
) $(INCLUDES
) $(AM_CPPFLAGS
) $(CPPFLAGS
) $(AM_CFLAGS
) $(CFLAGS
)
170 #========================================================================
171 # Start of user-definable TARGETS section
172 #========================================================================
173 scripts
: scripts-stamp
175 scripts-stamp
: scripts
/*.itcl
179 #========================================================================
180 # TEA TARGETS. Please note that the "libraries:" target refers to platform
181 # independent files, and the "binaries:" target inclues executable programs and
182 # platform-dependent libraries. Modify these targets so that they install
183 # the various pieces of your package. The make and install rules
184 # for the BINARIES that you specified above have already been done.
185 #========================================================================
187 all: binaries libraries doc
189 #========================================================================
190 # The binaries target builds executable programs, Windows .dll's, unix
191 # shared/static libraries, and any other platform-dependent files.
192 # The list of targets to build for "binaries:" is specified at the top
193 # of the Makefile, in the "BINARIES" variable.
194 #========================================================================
196 binaries
: $(BINARIES
)
200 #========================================================================
201 # Your doc target should differentiate from doc builds (by the developer)
202 # and doc installs (see install-doc), which just install the docs on the
203 # end user machine when building from source.
204 #========================================================================
207 @echo
"If you have documentation to create, place the commands to"
208 @echo
"build the docs in the 'doc:' target. For example:"
209 @echo
" xml2nroff sample.xml > sample.n"
210 @echo
" xml2html sample.xml > sample.html"
212 install: all install-binaries install-libraries install-doc
214 install-binaries
: binaries install-lib-binaries install-bin-binaries
216 #========================================================================
217 # This rule installs platform-independent files, such as header files.
218 # The list=...; for p in $$list handles the empty list case x-platform.
219 #========================================================================
221 install-libraries
: libraries
222 @mkdir
-p
$(DESTDIR
)$(pkgincludedir
)
223 @echo
"Installing header files in $(DESTDIR)$(pkgincludedir)"
224 @list
='$(PKG_HEADERS)'; for i in
$$list; do \
225 echo
"Installing $(srcdir)/$$i" ; \
226 $(INSTALL_DATA
) $(srcdir)/$$i $(DESTDIR
)$(pkgincludedir
) ; \
228 $(INSTALL_DATA
) $(srcdir)/scripts
/tclIndex
$(DESTDIR
)$(pkglibdir
)
230 #========================================================================
231 # Install documentation. Unix manpages should go in the $(mandir)
233 #========================================================================
236 @mkdir
-p
$(DESTDIR
)$(mandir)/mann
237 @echo
"Installing documentation in $(DESTDIR)$(mandir)"
238 @list
='$(srcdir)/doc/*.n'; for i in
$$list; do \
239 echo
"Installing $$i"; \
240 rm -f
$(DESTDIR
)$(mandir)/mann
/`basename $$i`; \
241 $(INSTALL_DATA
) $$i $(DESTDIR
)$(mandir)/mann
; \
244 test: binaries libraries
245 $(TCLSH
) `@CYGPATH@ $(srcdir)/tests/all.tcl` $(TESTFLAGS
)
247 shell: binaries libraries
251 $(TCLSH_ENV
) gdb
$(TCLSH_PROG
) $(SCRIPT
)
255 #========================================================================
256 # $(PKG_LIB_FILE) should be listed as part of the BINARIES variable
257 # mentioned above. That will ensure that this target is built when you
258 # run "make binaries".
260 # The $(PKG_OBJECTS) objects are created and linked into the final
261 # library. In most cases these object files will correspond to the
262 # source files above.
263 #========================================================================
265 $(PKG_LIB_FILE
): $(PKG_OBJECTS
)
266 -rm -f
$(PKG_LIB_FILE
)
268 $(RANLIB
) $(PKG_LIB_FILE
)
270 $(PKG_STUB_LIB_FILE
): $(PKG_STUB_OBJECTS
)
271 -rm -f
$(PKG_STUB_LIB_FILE
)
273 $(RANLIB_STUB
) $(PKG_STUB_LIB_FILE
)
275 #========================================================================
276 # We need to enumerate the list of .c to .o lines here.
278 # In the following lines, $(srcdir) refers to the toplevel directory
279 # containing your extension. If your sources are in a subdirectory,
280 # you will have to modify the paths to reflect this:
282 # sample.$(OBJEXT): $(srcdir)/generic/sample.c
283 # $(COMPILE) -c `@CYGPATH@ $(srcdir)/generic/sample.c` -o $@
285 # Setting the VPATH variable to a list of paths will cause the makefile
286 # to look into these paths when resolving .c to .obj dependencies.
287 # As necessary, add $(srcdir):$(srcdir)/compat:....
288 #========================================================================
290 VPATH
= $(srcdir):$(srcdir)/generic
:$(srcdir)/unix
:$(srcdir)/win
293 $(COMPILE
) -c
`@CYGPATH@ $<` -o
$@
295 #========================================================================
296 # Distribution creation
297 # You may need to tweak this target to make it work correctly.
298 #========================================================================
300 #COMPRESS = tar cvf $(PKG_DIR).tar $(PKG_DIR); compress $(PKG_DIR).tar
301 COMPRESS
= gtar zcvf
$(PKG_DIR
).
tar.gz
$(PKG_DIR
)
302 DIST_ROOT
= /tmp
/dist
303 DIST_DIR
= $(DIST_ROOT
)/$(PKG_DIR
)
306 rm -rf
$(DIST_DIR
) $(DIST_ROOT
)/$(PKG_DIR
).
tar.
*
310 cp
-p
$(srcdir)/ChangeLog
$(srcdir)/README
* $(srcdir)/license
* \
311 $(srcdir)/aclocal.m4
$(srcdir)/configure
$(srcdir)/*.in \
313 chmod
664 $(DIST_DIR
)/Makefile.in
$(DIST_DIR
)/aclocal.m4
314 chmod
775 $(DIST_DIR
)/configure
$(DIST_DIR
)/configure.in
316 for i in
$(srcdir)/*.
[ch
]; do \
317 if
[ -f
$$i ]; then \
318 cp
-p
$$i $(DIST_DIR
)/ ; \
322 mkdir
$(DIST_DIR
)/tclconfig
323 cp
$(srcdir)/tclconfig
/install-sh
$(srcdir)/tclconfig
/tcl.m4 \
324 $(DIST_DIR
)/tclconfig
/
325 chmod
664 $(DIST_DIR
)/tclconfig
/tcl.m4
326 chmod
+x
$(DIST_DIR
)/tclconfig
/install-sh
328 list
='demos doc generic library mac tests unix win'; \
329 for p in
$$list; do \
330 if
test -d
$(srcdir)/$$p ; then \
331 mkdir
$(DIST_DIR
)/$$p; \
332 cp
-p
$(srcdir)/$$p/*.
* $(DIST_DIR
)/$$p/; \
336 (cd
$(DIST_ROOT
); $(COMPRESS
);)
338 #========================================================================
339 # End of user-definable section
340 #========================================================================
342 #========================================================================
343 # Don't modify the file to clean here. Instead, set the "CLEANFILES"
344 # variable in configure.in
345 #========================================================================
348 -test -z
"$(BINARIES)" ||
rm -f
$(BINARIES
)
349 -rm -f
*.
$(OBJEXT
) core
*.core
350 -test -z
"$(CLEANFILES)" ||
rm -f
$(CLEANFILES
)
354 -rm -f
$(CONFIG_CLEAN_FILES
)
355 -rm -f config.cache config.log config.status
357 #========================================================================
358 # Install binary object libraries. On Windows this includes both .dll and
359 # .lib files. Because the .lib files are not explicitly listed anywhere,
360 # we need to deduce their existence from the .dll file of the same name.
361 # Library files go into the lib directory.
362 # In addition, this will generate the pkgIndex.tcl
363 # file in the install location (assuming it can find a usable tclsh shell)
365 # You should not have to modify this target.
366 #========================================================================
368 install-lib-binaries
: binaries
369 @mkdir
-p
$(DESTDIR
)$(pkglibdir
)
370 @list
='$(lib_BINARIES)'; for p in
$$list; do \
371 if
test -f
$$p; then \
372 echo
" $(INSTALL_PROGRAM) $$p $(DESTDIR)$(pkglibdir)/$$p"; \
373 $(INSTALL_PROGRAM
) $$p $(DESTDIR
)$(pkglibdir
)/$$p; \
374 stub
=`echo $$p|sed -e "s/.*\(stub\).*/\1/"`; \
375 if
test "x$$stub" = "xstub"; then \
376 echo
" $(RANLIB_STUB) $(DESTDIR)$(pkglibdir)/$$p"; \
377 $(RANLIB_STUB
) $(DESTDIR
)$(pkglibdir
)/$$p; \
379 echo
" $(RANLIB) $(DESTDIR)$(pkglibdir)/$$p"; \
380 $(RANLIB
) $(DESTDIR
)$(pkglibdir
)/$$p; \
382 ext
=`echo $$p|sed -e "s/.*\.//"`; \
383 if
test "x$$ext" = "xdll"; then \
384 lib
=`basename $$p|sed -e 's/.[^.]*$$//'`.lib
; \
385 if
test -f
$$lib; then \
386 echo
" $(INSTALL_DATA) $$lib $(DESTDIR)$(pkglibdir)/$$lib"; \
387 $(INSTALL_DATA
) $$lib $(DESTDIR
)$(pkglibdir
)/$$lib; \
392 @list
='$(PKG_TCL_SOURCES)'; for p in
$$list; do \
393 if
test -f
$(srcdir)/$$p; then \
394 destp
=`basename $$p`; \
395 echo
" Install $$destp $(DESTDIR)$(pkglibdir)/$$destp"; \
396 $(INSTALL_DATA
) $(srcdir)/$$p $(DESTDIR
)$(pkglibdir
)/$$destp; \
399 @if
test "x$(SHARED_BUILD)" = "x1"; then \
400 echo
" Install pkgIndex.tcl $(DESTDIR)$(pkglibdir)"; \
401 $(INSTALL_DATA
) pkgIndex.tcl
$(DESTDIR
)$(pkglibdir
); \
404 #========================================================================
405 # Install binary executables (e.g. .exe files and dependent .dll files)
406 # This is for files that must go in the bin directory (located next to
407 # wish and tclsh), like dependent .dll files on Windows.
409 # You should not have to modify this target, except to define bin_BINARIES
410 # above if necessary.
411 #========================================================================
413 install-bin-binaries
: binaries
414 @mkdir
-p
$(DESTDIR
)$(bindir)
415 @list
='$(bin_BINARIES)'; for p in
$$list; do \
416 if
test -f
$$p; then \
417 echo
" $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/$$p"; \
418 $(INSTALL_PROGRAM
) $$p $(DESTDIR
)$(bindir)/$$p; \
422 .SUFFIXES
: .c .
$(OBJEXT
)
424 Makefile
: $(srcdir)/Makefile.in
$(top_builddir
)/config.status
426 && CONFIG_FILES
=$@ CONFIG_HEADERS
= $(SHELL
) .
/config.status
429 list
='$(lib_BINARIES)'; for p in
$$list; do \
430 rm -f
$(DESTDIR
)$(pkglibdir
)/$$p; \
432 list
='$(PKG_TCL_SOURCES)'; for p in
$$list; do \
434 rm -f
$(DESTDIR
)$(pkglibdir
)/$$p; \
436 list
='$(bin_BINARIES)'; for p in
$$list; do \
437 rm -f
$(DESTDIR
)$(bindir)/$$p; \
442 teapot-pkg generate
--type zip
--output teapot .
444 refresh-teapot
: teapot
445 teacup remove @PACKAGE_NAME@
446 teacup
install teapot
/*
448 .PHONY
: all binaries
clean depend
distclean doc
install libraries
test
450 # Tell versions [3.59,3.63) of GNU make to not export all variables.
451 # Otherwise a system limit (for SysV at least) may be exceeded.