On Sat, Jul 19, 2003 at 04:34:32PM +0200,
lmamane-scsh-list-2003-08-19@ad1810.com wrote:
> The scsh top-level Makefile (as in 0.6.4) is heavily incompatible with
> the following procedure:
> which is (at the principle level) what many packaging systems do.
> I include here a patch that cleanly separates building stage
> (hard-coding paths in various places) and install stage (only
> copying files around).
Handling of the man page was broken. Here's a better patch.
--- scsh-0.6.3/Makefile.in Sat Jul 19 11:00:22 2003
+++ scsh-0.6.4/Makefile.in Sat Jul 19 17:37:45 2003
@@ -165,7 +165,7 @@
# The following is the first rule and therefore the "make" command's
# default target.
-enough: $(VM) $(IMAGE) go $(LIBCIG) scsh $(LIBSCSH) $(LIBSCSHVM)
+enough: $(VM) $(IMAGE) go $(LIBCIG) scsh $(LIBSCSH) $(LIBSCSHVM) $(MANPAGE)
# --------------------
# External code to include in the VM
@@ -319,19 +319,19 @@
### Fake targets: all clean install man dist
-install: enough dirs inst-script inst-vm inst-misc inst-man inst-inc \
+install: enough dirs inst-vm inst-misc inst-man inst-inc \
install-scsh
inst-vm: $(VM)
$(INSTALL_PROGRAM) $(VM) $(LIB)
-inst-man:
+$(MANPAGE):
+ sed -e 's=LDOC=$(DOCDIR)=g' -e 's=LBIN=$(bindir)=g' -e
's=LLIB=$(LIB)=g' \
+ -e 's=LSCSH=$(RUNNABLE)=g' doc/scsh.man > $(MANPAGE)
+
+inst-man: $(MANPAGE)
if [ -d $(mandir) -a -w $(mandir) ]; then \
- sed 's=LBIN=$(bindir)=g' doc/scsh.man | \
- sed 's=LLIB=$(LIB)=g' | \
- sed 's=LSCSH=$(RUNNABLE)=g' >$(MANPAGE) && \
- $(INSTALL_DATA) $(MANPAGE) $(mandir) && \
- $(RM) $(MANPAGE); \
+ $(INSTALL_DATA) $(MANPAGE) $(mandir); \
else \
echo "$(mandir) not writable dir, not installing man page" \
>&2; \
@@ -398,16 +398,6 @@
do $(INSTALL_DATA) $$f $(DOCDIR)/scsh-paper/html/ ; \
done
-
-inst-script:
- script=$(bindir)/$(RUNNABLE) && \
- echo '#!/bin/sh' >$$script && \
- echo >>$$script && \
- echo 'lib=$(LIB)' >>$$script && \
- echo 'exec $$lib/$(VM) -o $$lib/$(VM) -i $$lib/$(IMAGE) "$$@"' \
- >>$$script && \
- chmod +x $$script
-
# Script to run scsh in this directory.
go:
echo '#!/bin/sh' >$@ && \
@@ -879,7 +871,11 @@
echo ",open $(opens)"; \
echo "(dump-scsh \"$@\")"; \
) \
- | ./$(VM) -o ./$(VM) -i $(IMAGE) -h 10000000
+ | ./$(VM) -o ./$(VM) -i $(IMAGE) -h 10000000 && \
+ ( echo ',translate =scheme48 $(LIB)'; \
+ echo '(dump-scsh "scsh/scsh.image")'; \
+ echo ',exit'; \
+ ) | ./$(VM) -i scsh/scsh.image
# ,flush files => 0k
# ,flush names => -= 17k
@@ -894,7 +890,11 @@
echo ",open $(opens)"; \
echo ",flush"; \
echo "(dump-scsh \"$@\")";) \
- | ./$(VM) -o ./$(VM) -i $(IMAGE) -h 10000000
+ | ./$(VM) -o ./$(VM) -i $(IMAGE) -h 10000000 && \
+ ( echo ',translate =scheme48 $(LIB)'; \
+ echo '(dump-scsh "scsh/stripped-scsh.image")'; \
+ echo ',exit'; \
+ ) | ./$(VM) -i scsh/stripped-scsh.image
install-scsh: scsh install-scsh-image install-stripped-scsh-image
$(RM) $(bindir)/$(RUNNABLE)
@@ -906,16 +906,10 @@
do $(INSTALL_DATA) $$f $(LIB)/scsh/; done
install-scsh-image: $(VM) scsh/scsh.image
- ( echo ',translate =scheme48 $(LIB)'; \
- echo '(dump-scsh "$(LIB)/scsh.image")'; \
- echo ',exit'; \
- ) | ./$(VM) -i scsh/scsh.image
+ $(INSTALL_DATA) scsh/scsh.image $(LIB)
install-stripped-scsh-image: $(VM) scsh/stripped-scsh.image
- ( echo ',translate =scheme48 $(LIB)'; \
- echo '(dump-scsh "$(LIB)/stripped-scsh.image")'; \
- echo ',exit'; \
- ) | ./$(VM) -i scsh/stripped-scsh.image
+ $(INSTALL_DATA) scsh/stripped-scsh.image $(LIB)
clean-scsh:
$(RM) scsh/*.o scsh/rx/*.o scsh/machine/*.o
--- scsh-0.6.3/doc/scsh.man Fri Dec 7 15:49:05 2001
+++ scsh-0.6.4/doc/scsh.man Sat Jul 19 17:38:07 2003
@@ -67,7 +67,7 @@
.SH FILES
.TP
-.B LLIB/doc/
+.B LDOC/
The detailed documentation for scsh. Contains much more information
than this broken manpage.
|