File: Makefile

package info (click to toggle)
shoop 0.1
  • links: PTS
  • area: main
  • in suites: woody
  • size: 328 kB
  • ctags: 41
  • sloc: sh: 1,138; makefile: 209; perl: 44
file content (130 lines) | stat: -rw-r--r-- 2,785 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
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
#!/usr/bin/make -f
#
# This makefile needs GNU make.
#
TOPDIR=$(CURDIR)
prefix=$(CURDIR)/debian/shoop

moddir=/usr/share/shoop/modules
bindir=/usr/share/shoop
docdir=/usr/share/doc/shoop
mandir=/usr/share/man
empdir=$(docdir)/examples

MODULES_MSG=modules
BINS_MSG=binary
DOCS_MSG=documents
EXAMPLES_MSG=examples
MAN_MSG=man pages

DIRS=$(bindir) $(moddir) $(docdir) $(docdir)/examples

SUBDIRS=modules docs

BINS=\
	shoop.sh\

DOCS=\
	COPYING\
	TODO\
	
EXAMPLES=\
	example.sh\

PKG=shoop
PKG_VER=0.1
TOPDIR=.

tinstall = $(CURDIR)/tmp-install

all:
	echo This makefile is only here to run benchmarks or examples,
	echo or install shoop, or do regression tests.
	echo \	make benchmark
	echo \	make example
	echo \	make install
	echo \	make test

test:
	$(MAKE) installmodules installbins prefix=$(tinstall)
	cd $(tinstall); SHOOPPATH=$(tinstall)$(moddir)\
			SHOOPMOD=$(tinstall)$(moddir)\
			SHOOPSH=$(tinstall)$(bindir)/shoop.sh\
			CURDIR=$(CURDIR)\
			$(SHELL) $(CURDIR)/t/regress\
			$(CURDIR)/t/inheritance.sh\

www-test1:
	$(MAKE) installbins installmodules prefix=$(tinstall)
	cd $(tinstall); SHOOPPATH=$(tinstall)$(moddir)\
			SHOOPMOD=$(tinstall)$(moddir)\
			SHOOPSH=$(tinstall)$(bindir)/shoop.sh\
			CURDIR=$(CURDIR)\
			$(CURDIR)/t/benchmark\
			$(CURDIR)/t/kbu.bm\
			""

www-test2:
	$(MAKE) installbins installmodules prefix=$(tinstall)
	cd $(tinstall); SHOOPPATH=$(tinstall)$(moddir)\
			SHOOPMOD=$(tinstall)$(moddir)\
			SHOOPSH=$(tinstall)$(bindir)/shoop.sh\
			CURDIR=$(CURDIR)\
			$(CURDIR)/t/benchmark\
			$(CURDIR)/t/kbhomes.bm\
			""

example:
	sh ./example.sh

benchmark:
	$(MAKE) installbins installmodules prefix=$(tinstall)
	cd $(tinstall); SHOOPPATH=$(tinstall)$(moddir)\
			SHOOPMOD=$(tinstall)$(moddir)\
			SHOOPSH=$(tinstall)$(bindir)/shoop.sh\
			CURDIR=$(CURDIR)\
			$(CURDIR)/t/benchmark\
			$(CURDIR)/t/benchmark.bm\
			"$(bscr)"

clean_dirs=$(tinstall)
clean_files=*~ .\#* ChangeLog docs/modules.pod

#
# Author only targets are below
#

cvs-build:
	rm -rf cvs-build
	$(MAKE) ChangeLog
	tar c --exclude CVS --exclude cvs-build . |\
		(mkdir -p cvs-build/$(PKG)-$(PKG_VER);cd cvs-build/$(PKG)-$(PKG_VER);tar x)

docs/modules.pod: utils/shelldoc $(MODULES)
	rm -f modules_tmp
	$(MAKE) modules_tmp
	utils/shelldoc "SHOOP Modules" $$(cat modules_tmp) > $@
	rm -f modules_tmp

docs/modules.txt: docs/modules.pod

dyndocs: www/modules.html docs/modules.txt
modules_title=SHOOP Modules

%.txt: %.pod
	pod2text < $< > $@
%.html: %.pod
	pod2html --title "$($(*F)_title)"< $< > $@

www/modules.html: docs/modules.html
	cp -a $< $@

clean_files+=www/modules.html docs/modules.txt docs/modules.html docs/modules.pod 
clean_files+=pod2html-dircache pod2html-itemcache

ChangeLog:
	utils/mkChangeLog $@

include $(TOPDIR)/Makefile.rules

.PHONY: docs/modules.pod