Support for $(DESTDIR) by Andreas Voegele.
This commit is contained in:
parent
26fcfcd8b2
commit
07f56d8251
54
Makefile.in
54
Makefile.in
|
@ -309,14 +309,14 @@ install: enough dirs inst-script inst-vm inst-misc inst-man inst-inc \
|
|||
inst-doc install-scsh
|
||||
|
||||
inst-vm: $(VM)
|
||||
$(INSTALL_PROGRAM) $(VM) $(LIB)
|
||||
$(INSTALL_PROGRAM) $(VM) $(DESTDIR)$(LIB)
|
||||
|
||||
inst-man:
|
||||
if [ -d $(mandir) -a -w $(mandir) ]; then \
|
||||
if [ -d $(DESTDIR)$(mandir) -a -w $(DESTDIR)$(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) && \
|
||||
$(INSTALL_DATA) $(MANPAGE) $(DESTDIR)$(mandir) && \
|
||||
$(RM) $(MANPAGE); \
|
||||
else \
|
||||
echo "$(mandir) not writable dir, not installing man page" \
|
||||
|
@ -324,57 +324,57 @@ inst-man:
|
|||
fi
|
||||
|
||||
inst-inc:
|
||||
$(INSTALL_DATA) $(srcdir)/c/scheme48.h $(incdir)
|
||||
$(INSTALL_DATA) $(srcdir)/c/write-barrier.h $(incdir)
|
||||
$(INSTALL_DATA) $(srcdir)/c/scheme48.h $(DESTDIR)$(incdir)
|
||||
$(INSTALL_DATA) $(srcdir)/c/write-barrier.h $(DESTDIR)$(incdir)
|
||||
|
||||
inst-misc:
|
||||
for stub in env big opt misc link srfi; do \
|
||||
for f in scheme/$$stub/*.scm; do \
|
||||
$(INSTALL_DATA) $$f $(LIB)/$$stub || exit 1; \
|
||||
$(INSTALL_DATA) $$f $(DESTDIR)$(LIB)/$$stub || exit 1; \
|
||||
done; \
|
||||
done && \
|
||||
for f in scheme/rts/*num.scm scheme/rts/jar-defrecord.scm; do \
|
||||
$(INSTALL_DATA) $$f $(LIB)/rts || exit 1; \
|
||||
$(INSTALL_DATA) $$f $(DESTDIR)$(LIB)/rts || exit 1; \
|
||||
done
|
||||
|
||||
inst-doc:
|
||||
for f in $(srcdir)/doc/*.txt $(srcdir)/doc/*.ps; do \
|
||||
$(INSTALL_DATA) $$f $(LIB)/doc/; \
|
||||
$(INSTALL_DATA) $$f $(DESTDIR)$(LIB)/doc/; \
|
||||
done && \
|
||||
for f in $(srcdir)/doc/src/*.tex \
|
||||
$(srcdir)/doc/src/*.dvi \
|
||||
$(srcdir)/doc/src/*.ps; \
|
||||
do $(INSTALL_DATA) $$f $(LIB)/doc/s48-manual/; \
|
||||
do $(INSTALL_DATA) $$f $(DESTDIR)$(LIB)/doc/s48-manual/; \
|
||||
done && \
|
||||
for f in $(srcdir)/doc/src/manual/*.html; \
|
||||
do $(INSTALL_DATA) $$f $(LIB)/doc/s48-manual/html/; \
|
||||
do $(INSTALL_DATA) $$f $(DESTDIR)$(LIB)/doc/s48-manual/html/; \
|
||||
done && \
|
||||
for f in $(srcdir)/doc/scsh-manual/*.tex \
|
||||
$(srcdir)/doc/scsh-manual/*.sty \
|
||||
$(srcdir)/doc/scsh-manual/*.dvi \
|
||||
$(srcdir)/doc/scsh-manual/*.ps \
|
||||
$(srcdir)/doc/scsh-manual/*.pdf; \
|
||||
do $(INSTALL_DATA) $$f $(LIB)/doc/scsh-manual/; \
|
||||
do $(INSTALL_DATA) $$f $(DESTDIR)$(LIB)/doc/scsh-manual/; \
|
||||
done && \
|
||||
for f in $(srcdir)/doc/scsh-manual/html/*.html \
|
||||
$(srcdir)/doc/scsh-manual/html/*.gif \
|
||||
$(srcdir)/doc/scsh-manual/html/*.css; \
|
||||
do $(INSTALL_DATA) $$f $(htmldir)/; \
|
||||
do $(INSTALL_DATA) $$f $(DESTDIR)$(htmldir)/; \
|
||||
done && \
|
||||
for f in $(srcdir)/doc/scsh-paper/*.tex \
|
||||
$(srcdir)/doc/scsh-paper/*.sty \
|
||||
$(srcdir)/doc/scsh-paper/*.dvi \
|
||||
$(srcdir)/doc/scsh-paper/*.ps; \
|
||||
do $(INSTALL_DATA) $$f $(LIB)/doc/scsh-paper/; \
|
||||
do $(INSTALL_DATA) $$f $(DESTDIR)$(LIB)/doc/scsh-paper/; \
|
||||
done && \
|
||||
for f in $(srcdir)/doc/scsh-paper/html/*.html \
|
||||
$(srcdir)/doc/scsh-paper/html/*.css; \
|
||||
do $(INSTALL_DATA) $$f $(LIB)/doc/scsh-paper/html; \
|
||||
do $(INSTALL_DATA) $$f $(DESTDIR)$(LIB)/doc/scsh-paper/html; \
|
||||
done
|
||||
|
||||
|
||||
inst-script:
|
||||
script=$(bindir)/$(RUNNABLE) && \
|
||||
script=$(DESTDIR)$(bindir)/$(RUNNABLE) && \
|
||||
echo '#!/bin/sh' >$$script && \
|
||||
echo >>$$script && \
|
||||
echo 'lib=$(LIB)' >>$$script && \
|
||||
|
@ -393,16 +393,16 @@ go:
|
|||
|
||||
dirs:
|
||||
for dir in $(libdir) $(bindir) $(incdir) $(LIB) $(mandir) $(htmldir); do\
|
||||
{ mkdir -p $$dir && [ -w $$dir ]; } || { \
|
||||
echo "$$dir not a writable directory" >&2; \
|
||||
{ mkdir -p $(DESTDIR)$$dir && [ -w $(DESTDIR)$$dir ]; } || { \
|
||||
echo "$(DESTDIR)$$dir not a writable directory" >&2; \
|
||||
exit 1; \
|
||||
} \
|
||||
done && \
|
||||
for dir in \
|
||||
rts env big opt misc link srfi scsh doc/scsh-manual \
|
||||
doc/s48-manual/html doc/scsh-paper/html ; do \
|
||||
{ mkdir -p $(LIB)/$$dir && [ -w $(LIB)/$$dir ]; } || { \
|
||||
echo "$(LIB)/$$dir not a writable directory" >&2; \
|
||||
{ mkdir -p $(DESTDIR)$(LIB)/$$dir && [ -w $(DESTDIR)$(LIB)/$$dir ]; } || { \
|
||||
echo "$(DESTDIR)$(LIB)/$$dir not a writable directory" >&2; \
|
||||
exit 1; \
|
||||
}; \
|
||||
done
|
||||
|
@ -850,23 +850,23 @@ scsh/stripped-scsh.image: $(VM) $(SCHEME) $(IMAGE)
|
|||
| ./$(VM) -i $(IMAGE) -h 10000000
|
||||
|
||||
install-scsh: scsh install-scsh-image install-stripped-scsh-image
|
||||
$(RM) $(bindir)/$(RUNNABLE)
|
||||
$(INSTALL_PROGRAM) $(srcdir)/scsh/scsh $(bindir)/$(RUNNABLE)
|
||||
$(INSTALL_PROGRAM) $(srcdir)/$(LIBSCSHVM) $(libdir)/$(LIBSCSHVM)
|
||||
$(INSTALL_PROGRAM) $(srcdir)/$(LIBSCSH) $(libdir)/$(LIBSCSH)
|
||||
$(RANLIB) $(libdir)/$(LIBSCSH)
|
||||
$(RM) $(DESTDIR)$(bindir)/$(RUNNABLE)
|
||||
$(INSTALL_PROGRAM) $(srcdir)/scsh/scsh $(DESTDIR)$(bindir)/$(RUNNABLE)
|
||||
$(INSTALL_PROGRAM) $(srcdir)/$(LIBSCSHVM) $(DESTDIR)$(libdir)/$(LIBSCSHVM)
|
||||
$(INSTALL_PROGRAM) $(srcdir)/$(LIBSCSH) $(DESTDIR)$(libdir)/$(LIBSCSH)
|
||||
$(RANLIB) $(DESTDIR)$(libdir)/$(LIBSCSH)
|
||||
for f in $(srcdir)/scsh/*.scm $(srcdir)/scsh/*/*.scm; \
|
||||
do $(INSTALL_DATA) $$f $(LIB)/scsh/; done
|
||||
do $(INSTALL_DATA) $$f $(DESTDIR)$(LIB)/scsh/; done
|
||||
|
||||
install-scsh-image: $(VM) scsh/scsh.image
|
||||
( echo ',translate =scheme48 $(LIB)'; \
|
||||
echo '(dump-scsh "$(LIB)/scsh.image")'; \
|
||||
echo '(dump-scsh "$(DESTDIR)$(LIB)/scsh.image")'; \
|
||||
echo ',exit'; \
|
||||
) | ./$(VM) -i scsh/scsh.image
|
||||
|
||||
install-stripped-scsh-image: $(VM) scsh/stripped-scsh.image
|
||||
( echo ',translate =scheme48 $(LIB)'; \
|
||||
echo '(dump-scsh "$(LIB)/stripped-scsh.image")'; \
|
||||
echo '(dump-scsh "$(DESTDIR)$(LIB)/stripped-scsh.image")'; \
|
||||
echo ',exit'; \
|
||||
) | ./$(VM) -i scsh/stripped-scsh.image
|
||||
|
||||
|
|
Loading…
Reference in New Issue