File: Makefile

package info (click to toggle)
pcd2html 0.5.1-3.1
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 368 kB
  • ctags: 56
  • sloc: perl: 1,405; makefile: 120; sh: 69
file content (87 lines) | stat: -rw-r--r-- 2,782 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
# Makefile to install pcd2html
PACKAGE=pcd2html
VERSION=0.5.1

FILES_TO_SAVE=Makefile \
	      README.pcd2html \
	      COPYING \
	      INSTALL \
	      News \
	      Bugs \
	      Makefile.pcd2html \
	      empty.xpm \
	      home.xpm home.png \
	      pcd2html_create_makefile \
	      pcd2html_create_html \
	      pcd2html_create_index \
	      pcd2html_create_jpg \
	      pcd2html_uti.pm \
	      pcd2html.conf \
	      pcd2html \
	      pcd.css \
	      pcd2html.1 \
	      pcd2html.html \
	      img \
	      examples \
	      ChangeLog

prefix = /usr/local

bindir = ${prefix}/bin
datadir = ${prefix}/share/pcd2html
mandir = ${prefix}/man/man1
sysconfdir = ${prefix}/etc
perllibdir = ${prefix}/share/perl5

preparedir=prepare

INSTALL = /usr/bin/install -p
INSTALL_DATA = ${INSTALL} -m 644
GZIP = --best

all: prepare

dist:
	rm -rf $(PACKAGE)-$(VERSION)
	mkdir $(PACKAGE)-$(VERSION)
	cp -a $(FILES_TO_SAVE) $(PACKAGE)-$(VERSION)
	GZIP=-9 tar -czf $(PACKAGE)-$(VERSION).tar.gz $(PACKAGE)-$(VERSION)
	rm -rf $(PACKAGE)-$(VERSION)

prepare:
	mkdir -p $(preparedir)
	@sed "s?\$${datadir}?${datadir}?g" pcd2html > $(preparedir)/pcd2html
	@touch -r pcd2html $(preparedir)/pcd2html
	@sed "s?\$${sysconfdir}?${sysconfdir}?g" pcd2html_create_makefile | sed "s?\$${datadir}?${datadir}?g" > $(preparedir)/pcd2html_create_makefile
	@touch -r pcd2html_create_makefile $(preparedir)/pcd2html_create_makefile
	@sed "s?\$${datadir}?${datadir}?g" pcd2html_create_index > $(preparedir)/pcd2html_create_index
	@touch -r pcd2html_create_index $(preparedir)/pcd2html_create_index
	@sed "s?\$${datadir}?${datadir}?g" pcd2html_create_html > $(preparedir)/pcd2html_create_html
	@touch -r pcd2html_create_html $(preparedir)/pcd2html_create_html
	@sed "s?\$${datadir}?${datadir}?g" pcd2html_create_jpg > $(preparedir)/pcd2html_create_jpg
	@touch -r pcd2html_create_jpg $(preparedir)/pcd2html_create_jpg

install: prepare
	@${INSTALL} -d ${bindir}
	@${INSTALL} $(preparedir)/pcd2html ${bindir}/pcd2html
	@${INSTALL} -d ${datadir}
	@$(INSTALL) $(preparedir)/pcd2html_create_makefile ${datadir}
	@$(INSTALL) $(preparedir)/pcd2html_create_index ${datadir}
	@$(INSTALL) $(preparedir)/pcd2html_create_html ${datadir}
	@$(INSTALL) $(preparedir)/pcd2html_create_jpg ${datadir}
	@$(INSTALL_DATA) empty.xpm ${datadir}
	@$(INSTALL_DATA) img/*.png ${datadir}
	@$(INSTALL_DATA) home.png ${datadir}
	@${INSTALL} -d ${perllibdir}
	${INSTALL_DATA} pcd2html_uti.pm ${perllibdir}
	@${INSTALL_DATA} Makefile.pcd2html ${datadir}/Makefile
	@${INSTALL_DATA} pcd.css ${datadir}
	@${INSTALL} -d ${sysconfdir}
	@${INSTALL_DATA} pcd2html.conf ${sysconfdir}
	@${INSTALL} -d ${mandir}
	@${INSTALL_DATA} pcd2html.1 ${mandir}
	@echo pcd2html successfully installed in ${datadir}

clean:
	@rm -rf *~ core
	@rm -rf $(preparedir)