File: Makefile

package info (click to toggle)
lwat 0.17-4
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 860 kB
  • ctags: 945
  • sloc: php: 3,151; sh: 212; makefile: 148
file content (134 lines) | stat: -rw-r--r-- 3,023 bytes parent folder | download | duplicates (2)
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
131
132
133
134
PACKAGE = lwat
LIBS= \
	admin.php \
	admin.js \
	index.php \
	fixup.php \
	setup.php \
	chguserpw.php \
	default.css \
	createlm.php \
	buildconf.php \
	import.php \
	functions.php

SCRIPTS= \
	createhomedir \
	mailnewuser

CONFS= \
	apache.conf 

SAMPLES= \
        admin.ini \
        admin-edu.ini \
        admin-slx.ini \
        config.php

DOCS= \
	README \
	TODO \
	ChangeLog

BIN= \
	lwat_adduser.php

INSTALL     = install -p -m 755
INSTALL_DATA= install -D -p -m 644
LANG=C

prefix     = /usr/local
sysconfdir = /etc/$(PACKAGE)
sharedir   = $(prefix)/share/$(PACKAGE)
webdir     = $(sharedir)/web
scriptsdir = $(sharedir)/scripts
templatedir= $(sharedir)/templates
localedir  = $(sharedir)/locales
docdir     = $(prefix)/share/doc/$(PACKAGE)
htmldocdir = $(prefix)/share/doc/$(PACKAGE)/html
sampledir  = $(prefix)/share/doc/$(PACKAGE)/examples
bindir	   = $(prefix)/bin

all:

po/*.po: po/lwat.pot
	cp $@ $@.bak ; \
	msgmerge $@.bak $^ > $@ 

locales/mo-stamp: po/*.po
	for po in $^ ; do \
	    locale=$$(basename $$po .po) ; \
	    echo $$locale ; \
	    mkdir -p locales/$$locale/LC_MESSAGES ; \
	    msgfmt --statistics -o locales/$$locale/LC_MESSAGES/$(PACKAGE).mo $$po ; \
	done
	touch locales/mo-stamp

mo-files: locales/mo-stamp

po/lwat.pot: lib/*.php templates/*.tpl
	tsmarty2c.php templates | \
	    xgettext --add-comments --default-domain=lwat \
	        - lib/*.php --output po/lwat.pot


install: all
	install -d $(DESTDIR)$(sharedir)
	install -d $(DESTDIR)$(sysconfdir)
	install -d $(DESTDIR)$(docdir)
	install -d $(DESTDIR)$(htmldocdir)
	install -d $(DESTDIR)$(sampledir)
	install -d $(DESTDIR)$(webdir)
	install -d $(DESTDIR)$(scriptsdir)
	install -d $(DESTDIR)$(templatedir)
	install -d $(DESTDIR)$(localedir)
	install -d $(DESTDIR)$(bindir)


	for locale in $$(find locales -type f -name $(PACKAGE).mo -printf "%P ") ; do \
	    install -d $(DESTDIR)$(localedir)/$$(dirname $$locale) ; \
	    $(INSTALL_DATA) locales/$$locale $(DESTDIR)$(localedir)/$$(dirname $$locale) ; \
	done

	for templates in $$(find templates -type f -name "*.tpl" -printf "%P ") ; do \
	    $(INSTALL_DATA) templates/$$templates $(DESTDIR)$(templatedir) ; \
	done

	for script in $(SCRIPTS); do \
		$(INSTALL) share/$$script $(DESTDIR)$(scriptsdir); \
	done

	for lib in $(LIBS); do \
		$(INSTALL_DATA) lib/$$lib $(DESTDIR)$(webdir) ; \
	done

	for conf in $(CONFS); do \
		$(INSTALL_DATA) etc/$$conf $(DESTDIR)$(sysconfdir) ; \
	done

	for doc in $(DOCS); do \
		$(INSTALL_DATA) $$doc $(DESTDIR)$(docdir) ; \
	done

	for htmldoc in $$(find doc -type f -name "*.html" -printf "%P ") ; do \
		$(INSTALL_DATA) doc/$$htmldoc $(DESTDIR)$(htmldocdir) ; \
	done

	for sample in $(SAMPLES); do \
		$(INSTALL_DATA) examples/$$sample $(DESTDIR)$(sampledir) ; \
	done

	for bin in $(BIN); do \
		$(INSTALL) bin/$$bin $(DESTDIR)$(bindir) ; \
	done


clean:
	# Remove CVS cruft
	find . -type f -name '.#*' -o -name "*.bak" -o -name "*~" | xargs -r rm -v
	# Removed completed translations
	rm -rf  locales

dist:
	debuild -us -uc