File: Makefile

package info (click to toggle)
bins 1.1.29-16
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd, wheezy
  • size: 5,836 kB
  • ctags: 2,351
  • sloc: perl: 5,161; xml: 2,536; sh: 314; makefile: 177
file content (198 lines) | stat: -rw-r--r-- 5,234 bytes parent folder | download | duplicates (4)
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
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198

# version of the package
VERSION=1.1.29
# name of the tarball
TARBALL = bins-$(VERSION).tar
# files to put in the tarball
DIST =  bins bins_edit bins-edit-gui bins-edit-gui.glade \
	install.sh binsrc tools/*_prefix tools/bins_cleanupgallery \
	tools/anti_bins tools/bins_txt2xml tools/bins_addtext \
	LICENSE README README.gui RELEASE.gui TODO ChangeLog CREDITS \
	doc/*.html doc/*.sgml doc/album.xml \
	doc/bins.1 doc/bins_edit.1 doc/bins-edit-gui.1 \
	doc/bins_man.html doc/bins_edit_man.html doc/bins-edit-gui_man.html \
	templates*/*.html templates*/*.js templates*/*.txt \
	templates*/static/*.* \
	bash_completion \
        intl/*.po \
	intl/generate_mo.sh \
	intl/fr.mo intl/pl.mo intl/de.mo intl/it.mo intl/ru.mo intl/es.mo \
	intl/zh_TW.mo intl/nl.mo intl/ja.mo intl/eo.mo intl/fi.mo intl/hu.mo \
	intl/ca.mo intl/gui-fr.mo 

# name of the dir in the tarball
DIR-DIST = bins-$(VERSION)

# files to publish on the website
PUBLISHWWW = $(wildcard doc/*.html)
#PUBLISH = $(TARBALL).gz $(TARBALL).bz2 ChangeLog doc/index_fr.html doc/index.html

# Files to put on donwload area
PUBLISHFILE = $(TARBALL).gz $(TARBALL).gz.sig $(TARBALL).bz2 $(TARBALL).bz2.sig ChangeLog

# where to publish webfiles for plain website
PUBLISH-DEST = $(HOME)/public_html/perso/BINS

# where to publish webfiles for plain gna
PUBLISHGNA-DEST = $(HOME)/src/gna/web/bins

# where to publish download files
PUBLISHFILE-DEST = $(HOME)/src/gna/bins-download


PROC=SGML_CATALOG_FILES=/etc/sgml/catalog xsltproc --catalogs
STYLEDIR=www/xsl

# End of configuration
########################################################################

# File to publish on plain web site (not gna)
PUBLISH = $(PUBLISHFILE) $(PUBLISHWWW)

PUBLISH-TMP = $(PUBLISH:doc/%=%)
PUBLISH-TARGET = $(PUBLISH-TMP:%=$(PUBLISH-DEST)/%)

PUBLISHGNA-TMP = $(PUBLISHWWW:doc/%=%)
PUBLISHGNA-TARGET = $(PUBLISHGNA:%=$(PUBLISHGNA-DEST)/%)

PUBLISHFILE-TARGET = $(PUBLISHFILE:%=$(PUBLISHFILE-DEST)/%)

.PHONY: all install tar publish filepublish wwwpublish upload test album demo famille clean cvs arch website

all:
	@echo "see README file to install bins"
	@echo "publish upload clean"

install: .install

.install: $(TARBALL).gz
	rm -Rf /tmp/bins*
	tar -C /tmp -xzvf $(TARBALL).gz
	sudo mount -o rw,remount /usr
	yes|sudo sh /tmp/$(DIR-DIST)/install.sh
	sudo mount -o ro,remount /usr || true
	touch .install

tar: $(TARBALL).gz

#sudo cp /tmp/$(DIR-DIST)/intl/fr.mo /usr/local/share/locale/fr/LC_MESSAGES/bins.mo

publish: filepublish wwwpublish gnapublish

filepublish: $(PUBLISHFILE-TARGET)

gnapublish: $(PUBLISHGNA-TARGET) www/xml/depends.tabular
	cd www/xml && make publishgna

wwwpublish: $(PUBLISH-TARGET) www/xml/depends.tabular
	cd www/xml && make publish

website: www/xml/depends.tabular
	cd www/xml && make all

www/xml/depends.tabular:
	touch www/xml/depends.tabular	

release: upload repo fileupload gnaupload

upload: publish 
	@if [ `hostname` != "ketama" ]; then\
		cp -afuv ~/public_html/perso/BINS/* ~/kashmir/public_html/perso/BINS ;\
		ssh kashmir 'PATH=$$PATH:~/bin update_www free' ;\
		ssh kashmir 'PATH=$$PATH:~/bin update_www libertysurf' ;\
	else\
		update_www tiscali ;\
	fi
#		update_www free ;\

gnaupload: gnapublish
	cd $(PUBLISHGNA-DEST) && cvs commit

fileupload: filepublish
	cd $(PUBLISHFILE-DEST) && rsync --delete -avr --rsh="ssh" . zubro@download.gna.org:/upload/bins || true

test: install
	time bins -p ~/share/pics/test ~/public_html/test

album: install
	time nice -14 bins -p ~/share/pics/album ~/public_html/album

demo:
	rsync --stats --progress -vac -e ssh ~/public_html/album/ kashmir:public_html/album/
#	time cp -afuv ~/public_html/album/.??* ~/public_html/album/* ~/kashmir/public_html/album
#	time rsync -avu ~/public_html/album/ ~/kashmir/public_html/album

dormans: .install
	time nice -14 bins -p ~/share/pics/Dormans ~/kashmir/public_html/photos/Dormans

famille: .install
	time nice -14 bins -p ~/share/pics/famille ~/kashmir/public_html/photos/famille

repo: cvs arch

cvs:
	rsync --stats --progress -vac -e ssh /home/jerome/share/cvs/ kashmir:/var/lib/cvs

arch:
	baz archive-mirror

backup_album:
	rsync --stats --progress -vac -e ssh /home/jerome/share/pics/album/ kashmir:share/pics/album

clean: 
	rm -f *~ *.old *.tar */*~ .install *.sign *.tar *.tar.bz2 *.tar.gz

#cp Makefile $(DIR-DIST)
#cp bins $(DIR-DIST)/bins.src
$(TARBALL): $(DIST) Makefile
	make website
	rm -Rf bins-$(VERSION) || true
	mkdir $(DIR-DIST)
	cp --parents $^ $(DIR-DIST)
	cp www/xml/*.html www/xml/*.xml $(DIR-DIST)/doc
	$(HOME)/bin/change 1.1.29 $(VERSION) $(DIR-DIST)/*
	tar \
	    --exclude=*~ \
	    --exclude=*.old \
	    --exclude=*.bak \
	    --exclude=\#* \
	    -cvf  $(TARBALL) bins-$(VERSION)
	rm -Rf $(DIR-DIST)


$(PUBLISH-DEST)/%.html : doc/%.html
	cp $< $@

$(PUBLISH-DEST)/%: %
	cp $< $@

$(PUBLISHGNA-DEST)/%.html : doc/%.html
	cp $< $@

$(PUBLISHGNA-DEST)/%: %
	cp $< $@

$(PUBLISHFILE-DEST)/%: %
	cp $< $@

%.sig: %
	gpg --yes --use-agent --detach-sign $< 

%_man.html: %.sgml
	docbook2html -o /tmp/$(notdir $@) $<
	mv /tmp/$(notdir $@)/index.html $@
	rmdir /tmp/$(notdir $@)

%.1: %.sgml
	docbook-to-man $< >$@

%.mo: %.po bins
	./intl/generate_mo.sh $<
#	msgfmt -o $@ $<

%.gz: %
	gzip -c --best $< >$@

%.bz2: %
	bzip2 -c $< >$@