File: local.mk

package info (click to toggle)
psgml 1.4.0-12
  • links: PTS
  • area: main
  • in suites: bookworm, bullseye
  • size: 1,216 kB
  • sloc: lisp: 10,044; sh: 423; makefile: 50
file content (124 lines) | stat: -rw-r--r-- 4,466 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
############################ -*- Mode: Makefile -*- ###########################
## local.mk --- 
## Author           : Manoj Srivastava ( srivasta@glaurung.green-gryphon.com ) 
## Created On       : Sat Nov 15 10:42:10 2003
## Created On Node  : glaurung.green-gryphon.com
## Last Modified By : Neil Roeth
## Last Modified On : Thursday May 21, 2009
## Status           : Unknown, Use with caution!
## HISTORY          : 
## Description      : 
## 
###############################################################################

CONFIG-indep:: stamp-conf
BUILD/psgml:: build/psgml
INST/psgml:: install/psgml
BIN/psgml:: binary/psgml

testdir:
	$(checkdir)

stamp-conf:
	$(REASON)
	-test ! -d debian/cdtd && $(MAKE) -f debian/rules explode
	./configure --verbose --prefix=$(PREFIX) --infodir=/usr/share/info \
             --sysconfdir=/etc $(confflags) 
	touch $@

STAMPS_TO_CLEAN += stamp-conf

implode:
	$(REASON)
	$(checkdir)
	-test -d debian/cdtd && (cd debian && \
           tar zfc debian.tar.gz cdtd && \
             uuencode debian.tar.gz debian.tar.gz > debian.uue \
               && rm -f debian.tar.gz )
explode:
	$(REASON)
	$(checkdir)
	-test ! -d debian/cdtd && (cd debian && uudecode debian.uue \
           && tar zfx debian.tar.gz && rm -f debian.tar.gz )

CLEAN/psgml::
	$(MAKE) clean || true
	-rm -rf $(TMPTOP)

build/psgml: stamp-build-gnus

stamp-build-gnus:
	$(checkdir)
	$(REASON)
	bash -n debian/postinst
	bash -n debian/prerm
	bash -n debian/postrm
	bash -n debian/emacsen.remove
	bash -n debian/emacsen.install
	bash -n debian/emacsen.compat
	mkdir debian/html
	(cd debian/html; \
	 makeinfo --html --split=chapter -v -o . ../../psgml.texi)
	touch stamp-build-gnus

STAMPS_TO_CLEAN += stamp-build-gnus

install/psgml: testroot
	$(REASON)
	$(checkdir)
	rm -rf $(TMPTOP)  $(TMPTOP).deb
	$(make_directory)  $(INFODIR)
	$(make_directory)  $(LISPDIR)
# 	$(make_directory)  $(STARTDIRS)
	$(make_directory)  $(DOCDIR)
	$(make_directory)  $(DOCBASE)
	$(make_directory)  $(COMPILEDIR)/install
	$(make_directory)  $(COMPILEDIR)/remove
	$(make_directory)  $(COMPILEDIR)/compat
	$(make_directory)  $(LIBDIR)
	$(install_file)    *.el                  $(LISPDIR)
	$(install_file)    Makefile.in           $(LISPDIR)
	cp -p Makefile Makefile-el
	$(install_file)    Makefile-el           $(LISPDIR)
	$(install_file)    configure             $(LISPDIR)
	chmod 0755         $(LISPDIR)/configure
	$(install_file)    debian/$(STARTFILE)   $(LISPDIR)
	$(install_program) install-sh            $(LISPDIR)
	$(install_file)    debian/psgml-html.el  $(LISPDIR)/
	$(install_file)    psgml.info            $(INFODIR)/
	$(install_file)    psgml-api.info        $(INFODIR)/
	$(install_file)    iso88591.map          $(LIBDIR)
	(cd debian; tar cf - cdtd) | (cd $(LIBDIR); tar xf -)
	$(install_file)    README.psgml          $(DOCDIR)/README.psgml
	$(install_file)    psgml.ps              $(DOCDIR)/psgml.ps
	$(install_file)    ChangeLog             $(DOCDIR)/changelog
	$(install_file)    debian/changelog      $(DOCDIR)/changelog.Debian
	$(install_file)    debian/example-customization.el $(DOCDIR)/
	$(install_file)    debian/README.debian  $(DOCDIR)
	$(install_file)    debian/Example        $(DOCDIR)/
	gzip -9nfqr        $(INFODIR)/
	gzip -9nfqr        $(DOCDIR)/
# Make sure the copyright file is not compressed
	$(install_file)    debian/copyright      $(DOCDIR)/copyright
	$(install_file)    debian/html/*.html    $(DOCDIR)/
	$(install_file)    debian/docentry       $(DOCBASE)/$(package)
	sed                -e 's/=P/$(package)/g' -e 's/=V/$(DEB_VERSION)/g' \
                              debian/emacsen.install > $(COMPILEDIR)/install/$(package)
	sed                -e 's/=P/$(package)/g' -e 's/=V/$(DEB_VERSION)/g' \
                              debian/emacsen.remove  > $(COMPILEDIR)/remove/$(package)
	$(install_file)    debian/emacsen.compat $(COMPILEDIR)/compat/$(package)
	chmod 0755        $(COMPILEDIR)/install/$(package) \
                           $(COMPILEDIR)/remove/$(package)

binary/psgml: testroot
	$(REASON)
	$(checkdir)
	$(make_directory)  $(TMPTOP)/DEBIAN
	$(install_program) debian/postinst       $(TMPTOP)/DEBIAN/postinst
	$(install_program) debian/prerm          $(TMPTOP)/DEBIAN/prerm
	$(install_program) debian/postrm         $(TMPTOP)/DEBIAN/postrm
	dpkg-gencontrol     -p$(package) -isp      -P$(TMPTOP)
	$(create_md5sum)   $(TMPTOP)
	chown -R root:root $(TMPTOP)
	chmod -R u+w,go=rX $(TMPTOP)
	dpkg --build       $(TMPTOP) ..