1##
2# Makefile for tkimg
3##
4# Daniel A. Steffen <das@users.sourceforge.net>
5##
6
7# Project info
8Project               = tkimg
9ProjectName           = TkImg
10
11# Fetch info
12Release               = 1.4
13ImportDate            = 2010-08-31
14SvnUrl                = https://$(Project).svn.sourceforge.net/svnroot/$(Project)/trunk
15
16#TEApotVersion         = 0.0.0.2008.12.02.10.57.38
17#TEApotProject         = Img
18
19Extra_Configure_Flags = $(TEA_Configure_Flags)
20Extra_Environment     = $(TEA_Environment) CONFIG_SITE=
21Extra_Install_Flags   = PKG_HEADERS= INSTALL_ROOT=$(DSTROOT)
22
23GnuAfterInstall       = fix-config strip install-doc fix-perms
24GnuNoBuild            = YES
25
26# include TEA Tcl extension build support
27include ../TEA.make
28
29TclExtStubConfig      = *Config.sh 
30TclExtDir             = Img
31
32build::
33	@echo "Building $(Project)..."
34	$(_v) $(Environment) $(MAKE) -C $(BuildDirectory)
35
36install-doc:
37	$(_v) $(INSTALL_DIRECTORY) "$(DSTROOT)/$(TclExtManDir)"
38	$(_v) umask $(Install_Mask); for f in "$(Sources)"/doc/*.man; do \
39	    n=$$(basename "$$f" .man) && echo "Generating $$n docs" && \
40	    $(MPEXPAND) nroff $$f "$(DSTROOT)/$(TclExtManDir)/$$n.n"; \
41	done
42
43# 13302200: #include_next doesn't work right if the C source is in the same
44# directory as the header.  So we symlink the source into a src subdirectory,
45# and fix VPATH to find the source there (we still need the source in the
46# original directory for configure to find it).  When 13302200 is fixed, we
47# can remove the symlinking and VPATH change.
48extract::
49	$(_v) $(RMDIR) $(SRCROOT)/$(Project)/compat/zlib
50	$(_v) $(RM) $(SRCROOT)/$(Project)/compat/libjpeg/ansi2knr.c
51	$(_v) $(RMDIR) $(SRCROOT)/$(Project)/compat/libpng/contrib/gregbook
52	$(_v) $(MKDIR) $(SRCROOT)/$(Project)/zlib/src
53	@set -x && \
54	cd $(SRCROOT)/$(Project)/zlib && \
55	for i in *.c; do \
56	    $(LN) -s ../$$i src/$$i || exit 1; \
57	done
58