From: Chris Hanson Date: Fri, 8 Dec 2000 20:17:46 +0000 (+0000) Subject: Rewrite makefiles for new regime. X-Git-Tag: 20090517-FFI~3072 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=0c28ffc769d2b3563c5509252d66381d2e4c8b87;p=mit-scheme.git Rewrite makefiles for new regime. --- diff --git a/v7/doc/imail/html/Makefile b/v7/doc/imail/html/Makefile deleted file mode 100644 index 256975665..000000000 --- a/v7/doc/imail/html/Makefile +++ /dev/null @@ -1,26 +0,0 @@ - -# $Id: Makefile,v 1.5 2000/12/08 20:14:24 cph Exp $ -# -# Copyright (c) 2000 Massachusetts Institute of Technology -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of the GNU General Public License as -# published by the Free Software Foundation; either version 2 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - -all: imail.html - -imail.html: ../imail.texinfo ../gfdl.texinfo - rm -rf *.html - texi2html -split_chapter ../imail.texinfo - -.PHONY: all diff --git a/v7/doc/install-sh b/v7/doc/install-sh new file mode 100755 index 000000000..e9de23842 --- /dev/null +++ b/v7/doc/install-sh @@ -0,0 +1,251 @@ +#!/bin/sh +# +# install - install a program, script, or datafile +# This comes from X11R5 (mit/util/scripts/install.sh). +# +# Copyright 1991 by the Massachusetts Institute of Technology +# +# Permission to use, copy, modify, distribute, and sell this software and its +# documentation for any purpose is hereby granted without fee, provided that +# the above copyright notice appear in all copies and that both that +# copyright notice and this permission notice appear in supporting +# documentation, and that the name of M.I.T. not be used in advertising or +# publicity pertaining to distribution of the software without specific, +# written prior permission. M.I.T. makes no representations about the +# suitability of this software for any purpose. It is provided "as is" +# without express or implied warranty. +# +# Calling this script install-sh is preferred over install.sh, to prevent +# `make' implicit rules from creating a file called install from it +# when there is no Makefile. +# +# This script is compatible with the BSD install script, but was written +# from scratch. It can only install one file at a time, a restriction +# shared with many OS's install programs. + + +# set DOITPROG to echo to test this script + +# Don't use :- since 4.3BSD and earlier shells don't like it. +doit="${DOITPROG-}" + + +# put in absolute paths if you don't have them in your path; or use env. vars. + +mvprog="${MVPROG-mv}" +cpprog="${CPPROG-cp}" +chmodprog="${CHMODPROG-chmod}" +chownprog="${CHOWNPROG-chown}" +chgrpprog="${CHGRPPROG-chgrp}" +stripprog="${STRIPPROG-strip}" +rmprog="${RMPROG-rm}" +mkdirprog="${MKDIRPROG-mkdir}" + +transformbasename="" +transform_arg="" +instcmd="$mvprog" +chmodcmd="$chmodprog 0755" +chowncmd="" +chgrpcmd="" +stripcmd="" +rmcmd="$rmprog -f" +mvcmd="$mvprog" +src="" +dst="" +dir_arg="" + +while [ x"$1" != x ]; do + case $1 in + -c) instcmd="$cpprog" + shift + continue;; + + -d) dir_arg=true + shift + continue;; + + -m) chmodcmd="$chmodprog $2" + shift + shift + continue;; + + -o) chowncmd="$chownprog $2" + shift + shift + continue;; + + -g) chgrpcmd="$chgrpprog $2" + shift + shift + continue;; + + -s) stripcmd="$stripprog" + shift + continue;; + + -t=*) transformarg=`echo $1 | sed 's/-t=//'` + shift + continue;; + + -b=*) transformbasename=`echo $1 | sed 's/-b=//'` + shift + continue;; + + *) if [ x"$src" = x ] + then + src=$1 + else + # this colon is to work around a 386BSD /bin/sh bug + : + dst=$1 + fi + shift + continue;; + esac +done + +if [ x"$src" = x ] +then + echo "install: no input file specified" + exit 1 +else + true +fi + +if [ x"$dir_arg" != x ]; then + dst=$src + src="" + + if [ -d $dst ]; then + instcmd=: + chmodcmd="" + else + instcmd=mkdir + fi +else + +# Waiting for this to be detected by the "$instcmd $src $dsttmp" command +# might cause directories to be created, which would be especially bad +# if $src (and thus $dsttmp) contains '*'. + + if [ -f $src -o -d $src ] + then + true + else + echo "install: $src does not exist" + exit 1 + fi + + if [ x"$dst" = x ] + then + echo "install: no destination specified" + exit 1 + else + true + fi + +# If destination is a directory, append the input filename; if your system +# does not like double slashes in filenames, you may need to add some logic + + if [ -d $dst ] + then + dst="$dst"/`basename $src` + else + true + fi +fi + +## this sed command emulates the dirname command +dstdir=`echo $dst | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'` + +# Make sure that the destination directory exists. +# this part is taken from Noah Friedman's mkinstalldirs script + +# Skip lots of stat calls in the usual case. +if [ ! -d "$dstdir" ]; then +defaultIFS=' +' +IFS="${IFS-${defaultIFS}}" + +oIFS="${IFS}" +# Some sh's can't handle IFS=/ for some reason. +IFS='%' +set - `echo ${dstdir} | sed -e 's@/@%@g' -e 's@^%@/@'` +IFS="${oIFS}" + +pathcomp='' + +while [ $# -ne 0 ] ; do + pathcomp="${pathcomp}${1}" + shift + + if [ ! -d "${pathcomp}" ] ; + then + $mkdirprog "${pathcomp}" + else + true + fi + + pathcomp="${pathcomp}/" +done +fi + +if [ x"$dir_arg" != x ] +then + $doit $instcmd $dst && + + if [ x"$chowncmd" != x ]; then $doit $chowncmd $dst; else true ; fi && + if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dst; else true ; fi && + if [ x"$stripcmd" != x ]; then $doit $stripcmd $dst; else true ; fi && + if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dst; else true ; fi +else + +# If we're going to rename the final executable, determine the name now. + + if [ x"$transformarg" = x ] + then + dstfile=`basename $dst` + else + dstfile=`basename $dst $transformbasename | + sed $transformarg`$transformbasename + fi + +# don't allow the sed command to completely eliminate the filename + + if [ x"$dstfile" = x ] + then + dstfile=`basename $dst` + else + true + fi + +# Make a temp file name in the proper directory. + + dsttmp=$dstdir/#inst.$$# + +# Move or copy the file name to the temp name + + $doit $instcmd $src $dsttmp && + + trap "rm -f ${dsttmp}" 0 && + +# and set any options; do chmod last to preserve setuid bits + +# If any of these fail, we abort the whole thing. If we want to +# ignore errors from any of these, just make sure not to ignore +# errors from the above "$doit $instcmd $src $dsttmp" command. + + if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; else true;fi && + if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; else true;fi && + if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; else true;fi && + if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; else true;fi && + +# Now rename the file to the real destination. + + $doit $rmcmd -f $dstdir/$dstfile && + $doit $mvcmd $dsttmp $dstdir/$dstfile + +fi && + + +exit 0 diff --git a/v7/doc/ref-manual/Makefile b/v7/doc/ref-manual/Makefile index 695d14e37..9b6c7917e 100644 --- a/v7/doc/ref-manual/Makefile +++ b/v7/doc/ref-manual/Makefile @@ -1,5 +1,5 @@ -# $Id: Makefile,v 1.4 2000/07/26 03:02:13 cph Exp $ +# $Id: Makefile,v 1.5 2000/12/08 20:14:24 cph Exp $ # # Copyright (c) 2000 Massachusetts Institute of Technology # @@ -17,32 +17,62 @@ # along with this program; if not, write to the Free Software # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -all: scheme.ps scheme.pdf scheme.info html/scheme_toc.html +all: scheme.info scheme.html scheme.pdf scheme.ps -scheme.ps: scheme.dvi - dvips -o $@ $^ +scheme.info: scheme.texinfo gfdl.texinfo + rm -f scheme.info* + makeinfo scheme.texinfo -scheme.dvi: scheme.texinfo gfdl.texinfo - texi2dvi scheme.texinfo +scheme.html: scheme.texinfo gfdl.texinfo + rm -f scheme*.html + texi2html -split_chapter scheme.texinfo scheme.pdf: scheme.texinfo gfdl.texinfo texi2pdf scheme.texinfo -scheme.info: scheme.texinfo gfdl.texinfo - makeinfo scheme.texinfo - rm -f /usr/local/lib/mit-scheme/edwin/info/scheme.info* - cpx scheme.info* /usr/local/lib/mit-scheme/edwin/info/. - gzip -v /usr/local/lib/mit-scheme/edwin/info/scheme.info* +scheme.ps: scheme.dvi + dvips -o $@ $^ -html/scheme_toc.html: scheme.texinfo gfdl.texinfo - (cd html;make) +scheme.dvi: scheme.texinfo gfdl.texinfo + texi2dvi scheme.texinfo AUX_SUFFIXES = aux log toc INDEX_SUFFIXES = cp fn ky pg tp vr -clean: - rm -f scheme.ps scheme.dvi scheme.pdf scheme.info* - rm -f $(addprefix scheme.,$(AUX_SUFFIXES)) - rm -f $(addprefix scheme.,$(INDEX_SUFFIXES)) - rm -f $(addsuffix s,$(addprefix scheme.,$(INDEX_SUFFIXES))) - $(MAKE) -C html $@ +mostlyclean: + @for S in $(AUX_SUFFIXES); do \ + echo "rm -f scheme.$${S}";\ + rm -f scheme.$${S};\ + done + @for S in $(INDEX_SUFFIXES); do \ + echo "rm -f scheme.$${S}";\ + rm -f scheme.$${S};\ + echo "rm -f scheme.$${S}s";\ + rm -f scheme.$${S}s;\ + done + rm -f scheme.dvi + +clean: mostlyclean + rm -f scheme.info* scheme*.html scheme.pdf scheme.ps + +distclean: clean + +maintainer-clean: distclean + +# The install rules depend on macro variables passwd down from the +# makefile in the top-level documentation directory. + +install-info: scheme.info + $(INSTALL_DATA) scheme.info* $(DESTDIR)$(infodir)/. + +install-html: scheme.html + $(INSTALL_DATA) scheme*.html $(DESTDIR)$(htmldir)/. + +install-pdf: scheme.pdf + $(INSTALL_DATA) scheme.pdf $(DESTDIR)$(pdfdir)/. + +install-ps: scheme.ps + $(INSTALL_DATA) scheme.ps $(DESTDIR)$(psdir)/. + +.PHONY: all mostlyclean clean distclean maintainer-clean +.PHONY: install-info install-html install-pdf install-ps diff --git a/v7/doc/ref-manual/html/Makefile b/v7/doc/ref-manual/html/Makefile deleted file mode 100644 index aec2bfc1d..000000000 --- a/v7/doc/ref-manual/html/Makefile +++ /dev/null @@ -1,27 +0,0 @@ - -# $Id: Makefile,v 1.3 2000/07/24 01:11:28 cph Exp $ -# -# Copyright (c) 2000 Massachusetts Institute of Technology -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of the GNU General Public License as -# published by the Free Software Foundation; either version 2 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - -all: scheme_toc.html - -scheme_toc.html: ../scheme.texinfo ../gfdl.texinfo - rm -rf *.html - texi2html -split_chapter ../scheme.texinfo - -clean: - rm -rf *.html diff --git a/v7/doc/sos/Makefile b/v7/doc/sos/Makefile index 93f9f7201..e3d90066f 100644 --- a/v7/doc/sos/Makefile +++ b/v7/doc/sos/Makefile @@ -1,5 +1,5 @@ -# $Id: Makefile,v 2.5 2000/07/26 03:02:51 cph Exp $ +# $Id: Makefile,v 2.6 2000/12/08 20:14:24 cph Exp $ # # Copyright (c) 2000 Massachusetts Institute of Technology # @@ -17,32 +17,62 @@ # along with this program; if not, write to the Free Software # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -all: sos.ps sos.pdf sos.info html/sos_toc.html +all: sos.info sos.html sos.pdf sos.ps -sos.ps: sos.dvi - dvips -o $@ $^ +sos.info: sos.texinfo gfdl.texinfo + rm -f sos.info* + makeinfo sos.texinfo -sos.dvi: sos.texinfo gfdl.texinfo - texi2dvi sos.texinfo +sos.html: sos.texinfo gfdl.texinfo + rm -f sos*.html + texi2html -split_chapter sos.texinfo sos.pdf: sos.texinfo gfdl.texinfo texi2pdf sos.texinfo -sos.info: sos.texinfo gfdl.texinfo - makeinfo sos.texinfo - rm -f /usr/local/lib/mit-scheme/edwin/info/sos.info* - cpx sos.info* /usr/local/lib/mit-scheme/edwin/info/. - gzip -v /usr/local/lib/mit-scheme/edwin/info/sos.info* +sos.ps: sos.dvi + dvips -o $@ $^ -html/sos_toc.html: sos.texinfo gfdl.texinfo - (cd html;make) +sos.dvi: sos.texinfo gfdl.texinfo + texi2dvi sos.texinfo AUX_SUFFIXES = aux log toc INDEX_SUFFIXES = cp fn ky pg tp vr -clean: - rm -f sos.ps sos.dvi sos.pdf sos.info* - rm -f $(addprefix sos.,$(AUX_SUFFIXES)) - rm -f $(addprefix sos.,$(INDEX_SUFFIXES)) - rm -f $(addsuffix s,$(addprefix sos.,$(INDEX_SUFFIXES))) - $(MAKE) -C html $@ +mostlyclean: + @for S in $(AUX_SUFFIXES); do \ + echo "rm -f sos.$${S}";\ + rm -f sos.$${S};\ + done + @for S in $(INDEX_SUFFIXES); do \ + echo "rm -f sos.$${S}";\ + rm -f sos.$${S};\ + echo "rm -f sos.$${S}s";\ + rm -f sos.$${S}s;\ + done + rm -f sos.dvi + +clean: mostlyclean + rm -f sos.info* sos*.html sos.pdf sos.ps + +distclean: clean + +maintainer-clean: distclean + +# The install rules depend on macro variables passwd down from the +# makefile in the top-level documentation directory. + +install-info: sos.info + $(INSTALL_DATA) sos.info* $(DESTDIR)$(infodir)/. + +install-html: sos.html + $(INSTALL_DATA) sos*.html $(DESTDIR)$(htmldir)/. + +install-pdf: sos.pdf + $(INSTALL_DATA) sos.pdf $(DESTDIR)$(pdfdir)/. + +install-ps: sos.ps + $(INSTALL_DATA) sos.ps $(DESTDIR)$(psdir)/. + +.PHONY: all mostlyclean clean distclean maintainer-clean +.PHONY: install-info install-html install-pdf install-ps diff --git a/v7/doc/sos/html/Makefile b/v7/doc/sos/html/Makefile deleted file mode 100644 index a73294bcb..000000000 --- a/v7/doc/sos/html/Makefile +++ /dev/null @@ -1,27 +0,0 @@ - -# $Id: Makefile,v 1.3 2000/07/24 01:11:55 cph Exp $ -# -# Copyright (c) 2000 Massachusetts Institute of Technology -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of the GNU General Public License as -# published by the Free Software Foundation; either version 2 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - -all: sos_toc.html - -sos_toc.html: ../sos.texinfo ../gfdl.texinfo - rm -rf *.html - texi2html -split_chapter ../sos.texinfo - -clean: - rm -rf *.html diff --git a/v7/doc/user-manual/Makefile b/v7/doc/user-manual/Makefile index c8997fa44..592cb0bde 100644 --- a/v7/doc/user-manual/Makefile +++ b/v7/doc/user-manual/Makefile @@ -1,5 +1,5 @@ -# $Id: Makefile,v 1.7 2000/07/26 03:02:38 cph Exp $ +# $Id: Makefile,v 1.8 2000/12/08 20:14:24 cph Exp $ # # Copyright (c) 2000 Massachusetts Institute of Technology # @@ -17,32 +17,62 @@ # along with this program; if not, write to the Free Software # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -all: user.ps user.pdf user.info html/user_toc.html +all: user.info user.html user.pdf user.ps -user.ps: user.dvi - dvips -o $@ $^ +user.info: user.texinfo gfdl.texinfo + rm -f user.info* + makeinfo user.texinfo -user.dvi: user.texinfo gfdl.texinfo - texi2dvi user.texinfo +user.html: user.texinfo gfdl.texinfo + rm -f user*.html + texi2html -split_chapter user.texinfo user.pdf: user.texinfo gfdl.texinfo texi2pdf user.texinfo -user.info: user.texinfo gfdl.texinfo - makeinfo user.texinfo - rm -f /usr/local/lib/mit-scheme/edwin/info/user.info* - cpx user.info* /usr/local/lib/mit-scheme/edwin/info/. - gzip -v /usr/local/lib/mit-scheme/edwin/info/user.info* +user.ps: user.dvi + dvips -o $@ $^ -html/user_toc.html: user.texinfo gfdl.texinfo - (cd html;make) +user.dvi: user.texinfo gfdl.texinfo + texi2dvi user.texinfo AUX_SUFFIXES = aux log toc INDEX_SUFFIXES = cp fn ky pg tp vr -clean: - rm -f user.ps user.dvi user.pdf user.info* - rm -f $(addprefix user.,$(AUX_SUFFIXES)) - rm -f $(addprefix user.,$(INDEX_SUFFIXES)) - rm -f $(addsuffix s,$(addprefix user.,$(INDEX_SUFFIXES))) - $(MAKE) -C html $@ +mostlyclean: + @for S in $(AUX_SUFFIXES); do \ + echo "rm -f user.$${S}";\ + rm -f user.$${S};\ + done + @for S in $(INDEX_SUFFIXES); do \ + echo "rm -f user.$${S}";\ + rm -f user.$${S};\ + echo "rm -f user.$${S}s";\ + rm -f user.$${S}s;\ + done + rm -f user.dvi + +clean: mostlyclean + rm -f user.info* user*.html user.pdf user.ps + +distclean: clean + +maintainer-clean: distclean + +# The install rules depend on macro variables passwd down from the +# makefile in the top-level documentation directory. + +install-info: user.info + $(INSTALL_DATA) user.info* $(DESTDIR)$(infodir)/. + +install-html: user.html + $(INSTALL_DATA) user*.html $(DESTDIR)$(htmldir)/. + +install-pdf: user.pdf + $(INSTALL_DATA) user.pdf $(DESTDIR)$(pdfdir)/. + +install-ps: user.ps + $(INSTALL_DATA) user.ps $(DESTDIR)$(psdir)/. + +.PHONY: all mostlyclean clean distclean maintainer-clean +.PHONY: install-info install-html install-pdf install-ps diff --git a/v7/doc/user-manual/html/Makefile b/v7/doc/user-manual/html/Makefile deleted file mode 100644 index c8682e6da..000000000 --- a/v7/doc/user-manual/html/Makefile +++ /dev/null @@ -1,27 +0,0 @@ - -# $Id: Makefile,v 1.4 2000/07/24 01:11:42 cph Exp $ -# -# Copyright (c) 2000 Massachusetts Institute of Technology -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of the GNU General Public License as -# published by the Free Software Foundation; either version 2 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - -all: user_toc.html - -user_toc.html: ../user.texinfo ../gfdl.texinfo - rm -rf *.html - texi2html -split_chapter ../user.texinfo - -clean: - rm -rf *.html