File: Makefile.am

package info (click to toggle)
libapache2-mod-rivet 3.2.2-1
  • links: PTS
  • area: main
  • in suites: bookworm
  • size: 6,296 kB
  • sloc: xml: 8,554; tcl: 7,568; ansic: 7,094; sh: 5,017; makefile: 195; sql: 91; lisp: 78
file content (95 lines) | stat: -rw-r--r-- 4,508 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
#
# top-level Makefile.am for Apache Rivet: gets turned into a Makefile.in by automake
#
# $Id$
#
# 2007/12/25: Added target uninistall-local that removes the tcl stuff (mxmanghi)
# 2010/06/22: target instal-data-local searches for pkgIndex.tcl files and deletes them
#             before invoking pkg_mkIndex.
# 2013/01/20: removing libtool created .la files

ACLOCAL_AMFLAGS = -I m4
EXTRA_DIST = LICENSE contrib doc rivet win/nmakehlp.c src/testing.c src/TclWebcgi.c
SUBDIRS = src
RIVETLIB_DESTDIR = $(DESTDIR)@RIVET_TCL_TARGET@
RIVET_PACKAGES = $(RIVETLIB_DESTDIR)/packages
AM_DISTCHECK_CONFIGURE_FLAGS = --with-tcl=${TCL_BIN_DIR} --with-rivet-target-dir=${RIVETLIB_DESTDIR} --with-apxs=${APXS_PREFIX}/bin/apxs

# I expect this symbol sooner or later to be handled by configure for arch dependent builds
# Current value is the rivetlib directory
RIVET_LIBS_ARCH = 

libtool: $(LIBTOOL_DEPS)
	$(SHELL) ./config.status --recheck

install-data-local: install-binaries install-packages

install-binaries:
	echo 'running target install-binaries ($(RIVETLIB_DESTDIR))'
	$(mkinstalldirs) $(RIVETLIB_DESTDIR)
	$(mkinstalldirs) $(RIVETLIB_DESTDIR)/rivet-tcl
	$(install_sh) -C -m 644 $(builddir)/rivet/init.tcl $(RIVETLIB_DESTDIR)
	$(install_sh) -C -m 644 $(builddir)/rivet/default_request_handler.tcl $(RIVETLIB_DESTDIR)
	$(install_sh) -C -m 644 $(shell /bin/ls $(srcdir)/rivet/rivet-tcl/*.tcl) $(RIVETLIB_DESTDIR)/rivet-tcl
	$(install_sh) -C -m 644 $(srcdir)/rivet/rivet-tcl/tclIndex $(RIVETLIB_DESTDIR)/rivet-tcl

#cp -rv $(srcdir)/rivet/packages $(RIVETLIB_DESTDIR)/
#-(  cd $(RIVETLIB_DESTDIR); rm -f *.la; \
#    echo 'eval pkg_mkIndex -verbose [pwd] init.tcl [glob [file join packages * *.tcl] [file join $(RIVET_LIBS_ARCH) *[info sharedlibextension]]]' | @TCLSH_PROG@ ; )

uninstall-local:
	echo 'running target uninstall-local ($(RIVETLIB_DESTDIR))'
	rm -f  $(RIVETLIB_DESTDIR)/init.tcl
	rm -fr $(RIVETLIB_DESTDIR)/rivet-tcl
	rm -f  $(RIVETLIB_DESTDIR)/librivetlib.so
	rm -f  $(RIVETLIB_DESTDIR)/librivetparser.so
	rm -fr $(RIVETLIB_DESTDIR)/packages
	rm -f  $(RIVETLIB_DESTDIR)/pkgIndex.tcl
	@if [ -e $(RIVETLIB_DESTDIR)/mpm/ ] && [ -d $(RIVETLIB_DESTDIR)/mpm/ ]; then \
		rm -fr $(RIVETLIB_DESTDIR)/mpm ; \
	else \
		echo "Directory $(RIVETLIB_DESTDIR)/mpm not existing"; \
	fi
	@if [ -e $(RIVETLIB_DESTDIR) ] && [ -d $(RIVETLIB_DESTDIR) ]; then \
		rmdir $(RIVETLIB_DESTDIR); \
	else \
		echo "Directory $(RIVETLIB_DESTDIR) not existing"; \
	fi

install-packages:
	echo 'running target install-packages ($(RIVETLIB_DESTDIR))'
	$(mkinstalldirs) $(RIVET_PACKAGES)/asciiglyphs
	$(install_sh) -C -m 644 $(shell /bin/ls $(srcdir)/rivet/packages/asciiglyphs/*.tcl) $(RIVET_PACKAGES)/asciiglyphs/
	$(mkinstalldirs) $(RIVET_PACKAGES)/calendar
	$(install_sh) -C -m 644 $(shell /bin/ls $(srcdir)/rivet/packages/calendar/*.tcl) $(RIVET_PACKAGES)/calendar/
	$(mkinstalldirs) $(RIVET_PACKAGES)/dio
	$(install_sh) -C -m 644 $(shell /bin/ls $(srcdir)/rivet/packages/dio/*.tcl) $(RIVET_PACKAGES)/dio/
	$(mkinstalldirs) $(RIVET_PACKAGES)/entities
	$(install_sh) -C -m 644 $(shell /bin/ls $(srcdir)/rivet/packages/entities/*.tcl) $(RIVET_PACKAGES)/entities/
	$(mkinstalldirs) $(RIVET_PACKAGES)/form
	$(install_sh) -C -m 644 $(shell /bin/ls $(srcdir)/rivet/packages/form/*.tcl) $(RIVET_PACKAGES)/form/
	$(mkinstalldirs) $(RIVET_PACKAGES)/formbroker
	$(install_sh) -C -m 644 $(shell /bin/ls $(srcdir)/rivet/packages/formbroker/*.tcl) $(RIVET_PACKAGES)/formbroker/
	$(mkinstalldirs) $(RIVET_PACKAGES)/session
	$(install_sh) -C -m 644 $(shell /bin/ls $(srcdir)/rivet/packages/session/*.tcl) $(RIVET_PACKAGES)/session/
	$(mkinstalldirs) $(RIVET_PACKAGES)/tclrivet
	$(install_sh) -C -m 644 $(shell /bin/ls $(srcdir)/rivet/packages/tclrivet/*.tcl) $(RIVET_PACKAGES)/tclrivet/
	-(  cd  $(RIVETLIB_DESTDIR); rm -f *.la; \
	    echo 'eval file delete [glob [file join packages * pkgIndex.tcl]] pkgIndex.tcl' | @TCLSH_PROG@ ; \
	    echo 'eval pkg_mkIndex -verbose [pwd] init.tcl [glob [file join packages * *.tcl] [file join $(RIVET_LIBS_ARCH) *[info sharedlibextension]]]' | @TCLSH_PROG@ ; )

uninstall-packages:
	echo 'running target uninstall-packages ($(RIVETLIB_DESTDIR))'
	rm -f	$(RIVETLIB_DESTDIR)/pkgIndex.tcl
	rm -fr  $(RIVETLIB_DESTDIR)/packages
	rm -fr  $(RIVETLIB_DESTDIR)/rivet-tcl
	rm -f	$(RIVETLIB_DESTDIR)/*so
	@if [ -z '$(wildcard $(RIVETLIB_DESTDIR)/*)' ]; then \
		echo 'removing directory $(RIVETLIB_DESTDIR)'
		@rmdir $(RIVETLIB_DESTDIR); \
	fi

# 
distclean-local:
	rm -fr rivet_config.h
	rm -fr _configs.sed