1 --- a/Makefile 2010-12-08 08:08:09.000000000 +0000
2 +++ b/Makefile 2011-10-27 07:58:41.000000000 +0000
4 # Placed in the Public Domain.
6 # Change at least this line:
10 # Uncomment these to include the Unix extensions
11 EXTRA_SCM+= -l ext/unix.scm
13 # Where to install the stuff
15 LIBDIR= $(PREFIX)/share/s9fes
16 -MANDIR= $(PREFIX)/man/man1
17 +MANDIR= $(PREFIX)/share/man/man1
19 # Which OS are we using (unix or plan9)?
22 # old version of install(1) may need -c
24 install-s9: s9 s9.scm s9.image s9.1.gz
25 - install -d -m 0755 $(BINDIR)
26 - install -d -m 0755 $(LIBDIR)
27 - install -d -m 0755 $(LIBDIR)/help
28 - install -d -m 0755 $(MANDIR)
29 - install $C -m 0755 s9 $(BINDIR)
31 - install $C -m 0644 s9.scm $(LIBDIR)
32 - install $C -m 0644 s9.image $(LIBDIR)
33 - install $C -m 0644 lib/* $(LIBDIR)
34 - install $C -m 0644 ext/*.scm $(LIBDIR)
35 - install $C -m 0644 contrib/* $(LIBDIR)
36 - install $C -m 0644 s9.1.gz $(MANDIR)
37 - install $C -m 0644 help/* $(LIBDIR)/help
38 - install $C -m 0755 util/make-help-links $(LIBDIR)/help
39 - (cd $(LIBDIR)/help && ./make-help-links && rm make-help-links)
40 + install -d -m 0755 $(DESTDIR)$(BINDIR)
41 + install -d -m 0755 $(DESTDIR)$(LIBDIR)
42 + install -d -m 0755 $(DESTDIR)$(LIBDIR)/help
43 + install -d -m 0755 $(DESTDIR)$(MANDIR)
44 + install $C -m 0755 s9 $(DESTDIR)$(BINDIR)
45 + strip $(DESTDIR)$(BINDIR)/s9
46 + install $C -m 0644 s9.scm $(DESTDIR)$(LIBDIR)
47 + install $C -m 0644 s9.image $(DESTDIR)$(LIBDIR)
48 + install $C -m 0644 lib/* $(DESTDIR)$(LIBDIR)
49 + install $C -m 0644 ext/*.scm $(DESTDIR)$(LIBDIR)
50 + install $C -m 0644 contrib/* $(DESTDIR)$(LIBDIR)
51 + install $C -m 0644 s9.1.gz $(DESTDIR)$(MANDIR)
52 + install $C -m 0644 help/* $(DESTDIR)$(LIBDIR)/help
53 + install $C -m 0755 util/make-help-links $(DESTDIR)$(LIBDIR)/help
54 + (cd $(DESTDIR)$(LIBDIR)/help && ./make-help-links && rm make-help-links)
56 install-util: install-arse
57 sed -e "s|^#! /usr/local|#! $(PREFIX)|" \
58 - <prog/s9help.scm >$(BINDIR)/s9help
59 + <prog/s9help.scm >$(DESTDIR)$(BINDIR)/s9help
60 sed -e "s|^#! /usr/local|#! $(PREFIX)|" \
61 - <prog/s9resolve.scm >$(BINDIR)/s9resolve
62 + <prog/s9resolve.scm >$(DESTDIR)$(BINDIR)/s9resolve
63 sed -e "s|^#! /usr/local|#! $(PREFIX)|" \
64 - <prog/scm2html1.scm >$(BINDIR)/scm2html
65 + <prog/scm2html1.scm >$(DESTDIR)$(BINDIR)/scm2html
66 sed -e "s|^#! /usr/local|#! $(PREFIX)|" \
67 - <prog/scmpp.scm >$(BINDIR)/scmpp
68 - -chmod +x $(BINDIR)/s9help \
69 - $(BINDIR)/s9resolve \
70 - $(BINDIR)/scm2html \
72 + <prog/scmpp.scm >$(DESTDIR)$(BINDIR)/scmpp
73 + -chmod +x $(DESTDIR)$(BINDIR)/s9help \
74 + $(DESTDIR)$(BINDIR)/s9resolve \
75 + $(DESTDIR)$(BINDIR)/scm2html \
76 + $(DESTDIR)$(BINDIR)/scmpp
78 arse-core.image: contrib/arse.scm ext/unix.scm ext/curses.scm
81 -l contrib/arse.scm -d arse-core.image
83 install-arse: arse-core.image
84 - cp arse-core.image $(LIBDIR)
85 - cp contrib/arse.help $(LIBDIR)
86 + cp arse-core.image $(DESTDIR)$(LIBDIR)
87 + cp contrib/arse.help $(DESTDIR)$(LIBDIR)
88 sed -e "s|^#! /usr/local|#! $(PREFIX)|" \
89 -e "s|^#! \(.*\)/s9|#! \1/arse-core|" \
91 - <prog/arse1.scm >$(BINDIR)/arse
92 - ln -fs $(BINDIR)/s9 $(BINDIR)/arse-core
93 - -chmod +x $(BINDIR)/arse
94 + <prog/arse1.scm >$(DESTDIR)$(BINDIR)/arse
95 + ln -fs s9 $(DESTDIR)$(BINDIR)/arse-core
96 + -chmod +x $(DESTDIR)$(BINDIR)/arse
99 sed -e "s|^#! /usr/local|#! $(PREFIX)|" \
100 - <prog/advgen.scm >$(BINDIR)/advgen
101 + <prog/advgen.scm >$(DESTDIR)$(BINDIR)/advgen
102 sed -e "s|^#! /usr/local|#! $(PREFIX)|" \
103 - <prog/c2html1.scm >$(BINDIR)/c2html
104 + <prog/c2html1.scm >$(DESTDIR)$(BINDIR)/c2html
105 sed -e "s|^#! /usr/local|#! $(PREFIX)|" \
106 - <prog/cols.scm >$(BINDIR)/cols
107 + <prog/cols.scm >$(DESTDIR)$(BINDIR)/cols
108 sed -e "s|^#! /usr/local|#! $(PREFIX)|" \
109 - <prog/dupes.scm >$(BINDIR)/dupes
110 + <prog/dupes.scm >$(DESTDIR)$(BINDIR)/dupes
111 sed -e "s|^#! /usr/local|#! $(PREFIX)|" \
112 - <prog/edoc.scm >$(BINDIR)/edoc
113 + <prog/edoc.scm >$(DESTDIR)$(BINDIR)/edoc
114 sed -e "s|^#! /usr/local|#! $(PREFIX)|" \
115 - <prog/htmlify.scm >$(BINDIR)/htmlify
116 + <prog/htmlify.scm >$(DESTDIR)$(BINDIR)/htmlify
117 sed -e "s|^#! /usr/local|#! $(PREFIX)|" \
118 - <prog/s9hts.scm >$(BINDIR)/s9hts
119 + <prog/s9hts.scm >$(DESTDIR)$(BINDIR)/s9hts
120 sed -e "s|^#! /usr/local|#! $(PREFIX)|" \
121 - <prog/soccat.scm >$(BINDIR)/soccat
122 - -chmod +x $(BINDIR)/advgen \
127 - $(BINDIR)/htmlify \
130 + <prog/soccat.scm >$(DESTDIR)$(BINDIR)/soccat
131 + -chmod +x $(DESTDIR)$(BINDIR)/advgen \
132 + $(DESTDIR)$(BINDIR)/c2html \
133 + $(DESTDIR)$(BINDIR)/cols \
134 + $(DESTDIR)$(BINDIR)/dupes \
135 + $(DESTDIR)$(BINDIR)/edoc \
136 + $(DESTDIR)$(BINDIR)/htmlify \
137 + $(DESTDIR)$(BINDIR)/s9hts \
138 + $(DESTDIR)$(BINDIR)/soccat
141 - rm -f $(LIBDIR)/help/* && rmdir $(LIBDIR)/help
142 - rm -f $(LIBDIR)/* && rmdir $(LIBDIR)
146 + rm -f $(DESTDIR)$(LIBDIR)/help/* && rmdir $(DESTDIR)$(LIBDIR)/help
147 + rm -f $(DESTDIR)$(LIBDIR)/* && rmdir $(DESTDIR)$(LIBDIR)
148 + rm -f $(DESTDIR)$(BINDIR)/s9
149 + -rmdir $(DESTDIR)$(BINDIR)
150 + -rmdir $(DESTDIR)$(MANDIR)
153 - rm -f $(BINDIR)/arse \
155 - $(BINDIR)/s9resolve \
156 - $(BINDIR)/scm2html \
158 + rm -f $(DESTDIR)$(BINDIR)/arse \
159 + $(DESTDIR)$(BINDIR)/s9help \
160 + $(DESTDIR)$(BINDIR)/s9resolve \
161 + $(DESTDIR)$(BINDIR)/scm2html \
162 + $(DESTDIR)$(BINDIR)/scmpp
165 - rm -f $(BINDIR)/advgen \
167 - $(BINDIR)/htmlify \
169 + rm -f $(DESTDIR)$(BINDIR)/advgen \
170 + $(DESTDIR)$(BINDIR)/dupes \
171 + $(DESTDIR)$(BINDIR)/htmlify \
172 + $(DESTDIR)$(BINDIR)/soccat
175 @find . -name \*.scm -exec grep -l " " {} \;