feat: 9.5.9
This commit is contained in:
parent
cb1753732b
commit
35f43a7909
1084 changed files with 558985 additions and 0 deletions
159
makefiles/Makefile-csug.in
Normal file
159
makefiles/Makefile-csug.in
Normal file
|
@ -0,0 +1,159 @@
|
|||
m = $(m)
|
||||
Scheme=../$m/bin/$m/scheme -b ../$m/boot/$m/petite.boot -b ../$m/boot/$m/scheme.boot
|
||||
STEXLIB=../stex
|
||||
installdir=/tmp/csug9.5
|
||||
INSTALL=../$m/installsh
|
||||
|
||||
x = csug
|
||||
latex = pdflatex
|
||||
stexmacrofiles = tspl4-prep
|
||||
bib = $(x).bib
|
||||
index=yes
|
||||
TSPL=tspl4
|
||||
DIR=$(shell basename `pwd`)
|
||||
|
||||
target: logcheck1 logcheck2 checklibs $(x).html $(x).pdf
|
||||
|
||||
install: target
|
||||
$(INSTALL) -m 2755 -d $(installdir)
|
||||
$(INSTALL) -m 0644 --ifdiff *.html *.css $(installdir)
|
||||
$(INSTALL) -m 0644 --ifdiff csug.pdf $(installdir)/csug9_5.pdf
|
||||
$(INSTALL) -m 2755 -d $(installdir)/canned
|
||||
$(INSTALL) -m 0644 --ifdiff canned/* $(installdir)/canned
|
||||
$(INSTALL) -m 2755 -d $(installdir)/gifs
|
||||
$(INSTALL) -m 0644 --ifdiff gifs/*.gif $(installdir)/gifs
|
||||
$(INSTALL) -m 2755 -d $(installdir)/$(mathdir)
|
||||
$(INSTALL) -m 0644 --ifdiff $(mathdir)/*.gif $(installdir)/$(mathdir)
|
||||
(cd $(installdir); ln -s -f $(x).html index.html)
|
||||
|
||||
# thrice is not enough when starting from scratch
|
||||
logcheck1: $(x).thirdrun
|
||||
@if [ -n "`grep 'Warning: Label(s) may have changed' $(x).log`" ] ; then\
|
||||
rm -f $(x).thirdrun ;\
|
||||
$(MAKE) $(x).thirdrun;\
|
||||
fi
|
||||
|
||||
rerun: $(x).thirdrun
|
||||
|
||||
logcheck2: $(x).thirdrun
|
||||
@if [ -n "`grep Warning $(x).log | grep -v pdftex.map`" ] ; then\
|
||||
echo "`grep Warning $(x).log | grep -v pdftex.map`";\
|
||||
false;\
|
||||
fi
|
||||
@if [ -n "`grep Overfull $(x).log | grep -v pdftex.map`" ] ; then\
|
||||
echo "`grep Overfull $(x).log | grep -v pdftex.map`";\
|
||||
false;\
|
||||
fi
|
||||
|
||||
include $(STEXLIB)/Mf-stex
|
||||
|
||||
stexsrc = csug.stex title.stex copyright.stex contents.stex\
|
||||
preface.stex intro.stex use.stex expeditor.stex debug.stex foreign.stex\
|
||||
binding.stex control.stex objects.stex numeric.stex io.stex\
|
||||
libraries.stex syntax.stex system.stex smgmt.stex threads.stex\
|
||||
compat.stex bibliography.stex summary.stex
|
||||
texsrc = ${stexsrc:%.stex=%.tex}
|
||||
|
||||
title.tex contents.tex bibliography.tex:
|
||||
rm -f $*.tex
|
||||
echo "%%% DO NOT EDIT THIS FILE" > $*.tex
|
||||
echo "%%% Edit the .stex version instead" >> $*.tex
|
||||
echo "" >> $*.tex
|
||||
cat $*.stex >> $*.tex
|
||||
chmod -w $*.tex
|
||||
title.tex: title.stex
|
||||
contents.tex: contents.stex
|
||||
bibliography.tex: bibliography.stex
|
||||
|
||||
$(x).firstrun: $(x).prefirstrun
|
||||
$(x).prefirstrun: tspl.aux tspl.rfm tspl.idx
|
||||
touch $x.sfm
|
||||
cat tspl.aux > $x.aux
|
||||
cat tspl.rfm > $x.rfm
|
||||
cat tspl.idx > $x.idx
|
||||
touch $(x).prefirstrun
|
||||
|
||||
$(x).secondrun: $(x).presecondrun
|
||||
$(x).presecondrun: $(x).firstrun
|
||||
cat tspl.aux >> $x.aux
|
||||
cat tspl.rfm >> $x.rfm
|
||||
echo '(summary-make "$x")' | $(Scheme) setup.ss summary.ss
|
||||
cat tspl.idx >> $x.idx
|
||||
touch $(x).presecondrun
|
||||
|
||||
$(x).thirdrun: $(x).prethirdrun canned/cisco-logo.png
|
||||
$(x).prethirdrun: $(x).secondrun
|
||||
cat tspl.aux >> $x.aux
|
||||
cat tspl.rfm >> $x.rfm
|
||||
echo '(summary-make "$x")' | $(Scheme) setup.ss summary.ss
|
||||
cat tspl.idx >> $x.idx
|
||||
touch $(x).prethirdrun
|
||||
|
||||
$(x).hfirstrun: $(x).hprefirstrun csug8.hcls
|
||||
$(x).hprefirstrun: $(x).thirdrun tspl.haux in.hidx
|
||||
cat tspl.aux >> $x.aux
|
||||
cat tspl.rfm >> $x.rfm
|
||||
cat tspl.idx >> $x.idx
|
||||
cat tspl.haux > $x.haux
|
||||
touch $(x).hprefirstrun
|
||||
|
||||
$(x).hsecondrun: $(x).hpresecondrun
|
||||
$(x).hpresecondrun: $(x).hfirstrun
|
||||
cat tspl.haux >> $x.haux
|
||||
touch $(x).hpresecondrun
|
||||
|
||||
$(x).hthirdrun: $(x).hprethirdrun
|
||||
$(x).hprethirdrun: $(x).hsecondrun
|
||||
cat tspl.haux >> $x.haux
|
||||
touch $(x).hprethirdrun
|
||||
|
||||
$(x).prefirstrun: $(texsrc) csug8.cls csug810.clo
|
||||
|
||||
$(x).firstrun: scheme.sty
|
||||
|
||||
tspl.aux: ${TSPL}/tspl.aux
|
||||
cat ${TSPL}/*.aux | grep '\\newlabel' | \
|
||||
sed -e 's/\\newlabel{\(.*\){\([^}]*\)}}/\\newlabel{TSPL:\1{t\2}}/' > tspl.aux
|
||||
|
||||
tspl.haux: ${TSPL}/tspl.haux
|
||||
sed -e 's/(putprop (quote /(putprop (quote |TSPL|:/' ${TSPL}/tspl.haux | \
|
||||
sed -e 's;url) ";url) "http://scheme.com/${TSPL}/;' > tspl.haux
|
||||
|
||||
tspl.rfm: ${TSPL}/tspl.rfm
|
||||
sed -e 's/\\pageref{/\\pageref{TSPL:/' ${TSPL}/tspl.rfm > tspl.rfm
|
||||
|
||||
# this version leaves tspl entries out of the printed index
|
||||
#tspl.idx:
|
||||
# echo -n > tspl.idx
|
||||
|
||||
# this version includes tspl entries in the printed index
|
||||
tspl.idx: ${TSPL}/tspl.idx
|
||||
sed -e 's/{\([1-9][0-9]*\)}$$/{t\1}/' ${TSPL}/tspl.idx | \
|
||||
sed -e 's/{\([ivx][ivx]*\)}$$/{t\1}/' > tspl.idx
|
||||
|
||||
in.hidx: ${TSPL}/out.hidx
|
||||
sed -e 's;"\(.*\)\.html#;"http://scheme.com/${TSPL}/\1.html#;' ${TSPL}/out.hidx | \
|
||||
sed -e 's/"")$$/"t")/' > in.hidx
|
||||
|
||||
$(texsrc): tspl4-prep.stex priminfo.ss ../s/primdata.ss
|
||||
|
||||
checklibs: $(x).thirdrun
|
||||
sort libsrecorded | uniq > libsrecorded.sort
|
||||
sort libslisted | uniq > libslisted.sort
|
||||
diff libsrecorded.sort libslisted.sort
|
||||
|
||||
code: $(stexsrc)
|
||||
extract.pl $(stexsrc) > code
|
||||
echo '(load "code" pretty-print)' | $(Scheme) -q
|
||||
|
||||
$(x).clean:
|
||||
-rm -f $(x).rfm $(x).sfm $(x).prefirstrun $(x).presecondrun\
|
||||
$(x).prethirdrun $(x).ans\
|
||||
$(x).hprefirstrun $(x).hpresecondrun $(x).hprethirdrun\
|
||||
tspl.aux tspl.haux tspl.rfm tspl.idx in.hidx\
|
||||
libsrecorded{,.sort} libslisted{,.sort}\
|
||||
code
|
||||
|
||||
$(x).reallyclean:
|
||||
|
||||
$(x).reallyreallyclean:
|
55
makefiles/Makefile-release_notes.in
Normal file
55
makefiles/Makefile-release_notes.in
Normal file
|
@ -0,0 +1,55 @@
|
|||
m = $(m)
|
||||
Scheme=../$m/bin/$m/scheme -b ../$m/boot/$m/petite.boot -b ../$m/boot/$m/scheme.boot
|
||||
STEXLIB=../stex
|
||||
installdir=/tmp/csv9
|
||||
INSTALL=../$m/installsh
|
||||
|
||||
# define default document pathname here
|
||||
# override on command line with 'make x=newdoc'
|
||||
x = release_notes
|
||||
|
||||
# define latex processor: latex or pdflatex
|
||||
latex = pdflatex
|
||||
|
||||
# define stex macro files here
|
||||
stexmacrofiles =
|
||||
|
||||
# list bibliography files here
|
||||
bib =
|
||||
|
||||
# define index if an index is to be generated
|
||||
# index=yes
|
||||
|
||||
include $(STEXLIB)/Mf-stex
|
||||
|
||||
# define or override suffixes here
|
||||
|
||||
# define any additional targets here
|
||||
|
||||
install: $x.pdf $x.html
|
||||
$(INSTALL) -m 2755 -d $(installdir)
|
||||
$(INSTALL) -m 0644 --ifdiff $x.html $x.pdf $(installdir)
|
||||
$(INSTALL) -m 0644 --ifdiff releasenotes.css $(installdir)
|
||||
(X=`echo canned/*` ;\
|
||||
if [ "$$X" != "canned/*" ] ; then\
|
||||
$(INSTALL) -m 2755 -d $(installdir)/canned ;\
|
||||
$(INSTALL) -m 0644 --ifdiff canned/* $(installdir)/canned ;\
|
||||
fi)
|
||||
$(INSTALL) -m 2755 -d $(installdir)/gifs
|
||||
$(INSTALL) -m 0644 --ifdiff gifs/*.gif $(installdir)/gifs
|
||||
$(INSTALL) -m 2755 -d $(installdir)/math
|
||||
-rm -rf $(installdir)/$(mathdir)
|
||||
$(INSTALL) -m 2755 -d $(installdir)/$(mathdir)
|
||||
if [ -e $(mathdir)/0.gif ] ; then $(INSTALL) -m 0644 $(mathdir)/*.gif $(installdir)/$(mathdir) ; fi
|
||||
|
||||
# define any dependencies here
|
||||
|
||||
$(x).firstrun: macros.tex
|
||||
|
||||
# define cleanup targets here:
|
||||
|
||||
$(x).clean:
|
||||
|
||||
$(x).reallyclean:
|
||||
|
||||
$(x).reallyreallyclean:
|
70
makefiles/Makefile-workarea.in
Normal file
70
makefiles/Makefile-workarea.in
Normal file
|
@ -0,0 +1,70 @@
|
|||
# Makefile-workarea.in
|
||||
# Copyright 1984-2017 Cisco Systems, Inc.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
MAKEFLAGS += --no-print-directory
|
||||
PREFIX=
|
||||
|
||||
.PHONY: build
|
||||
build:
|
||||
(cd c && $(MAKE))
|
||||
(cd s && $(MAKE) bootstrap)
|
||||
|
||||
.PHONY: install
|
||||
install: build
|
||||
$(MAKE) -f Mf-install
|
||||
|
||||
.PHONY: uninstall
|
||||
uninstall:
|
||||
$(MAKE) -f Mf-install uninstall
|
||||
|
||||
.PHONY: test
|
||||
test: build
|
||||
(cd mats && $(MAKE) allx)
|
||||
@echo "test run complete. check $(PREFIX)mats/summary for errors."
|
||||
|
||||
.PHONY: coverage
|
||||
coverage:
|
||||
rm -f s/bootstrap
|
||||
(cd c && $(MAKE))
|
||||
(cd s && $(MAKE) bootstrap p=t c=t)
|
||||
(cd mats && $(MAKE) allx c=t)
|
||||
|
||||
.PHONY: bootfiles
|
||||
bootfiles: build
|
||||
$(MAKE) -f Mf-boot
|
||||
|
||||
.PHONY: bintar
|
||||
bintar: build
|
||||
(cd bintar && $(MAKE))
|
||||
|
||||
.PHONY: rpm
|
||||
rpm: bintar
|
||||
(cd rpm && $(MAKE))
|
||||
|
||||
.PHONY: pkg
|
||||
pkg: bintar
|
||||
(cd pkg && $(MAKE))
|
||||
|
||||
.PHONY: clean
|
||||
clean:
|
||||
rm -f petite.1 scheme.1
|
||||
(cd s && $(MAKE) clean)
|
||||
(cd c && $(MAKE) clean)
|
||||
(cd mats && $(MAKE) clean)
|
||||
(cd examples && $(MAKE) clean)
|
||||
(cd bintar && $(MAKE) clean)
|
||||
(cd rpm && $(MAKE) clean)
|
||||
(cd pkg && $(MAKE) clean)
|
||||
rm -f Make.out
|
92
makefiles/Makefile.in
Normal file
92
makefiles/Makefile.in
Normal file
|
@ -0,0 +1,92 @@
|
|||
# Makefile.in
|
||||
# Copyright 1984-2017 Cisco Systems, Inc.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
MAKEFLAGS += --no-print-directory
|
||||
|
||||
.PHONY: build
|
||||
build:
|
||||
(cd $(workarea) && $(MAKE) build)
|
||||
|
||||
.PHONY: run
|
||||
run:
|
||||
env SCHEMEHEAPDIRS=$(workarea)/boot/$(m) $(workarea)/bin/$(m)/scheme
|
||||
|
||||
.PHONY: install
|
||||
install:
|
||||
(cd $(workarea) && $(MAKE) install)
|
||||
|
||||
.PHONY: uninstall
|
||||
uninstall:
|
||||
(cd $(workarea) && $(MAKE) uninstall)
|
||||
|
||||
.PHONY: test
|
||||
test:
|
||||
(cd $(workarea) && $(MAKE) test PREFIX=$(workarea)/)
|
||||
|
||||
.PHONY: coverage
|
||||
coverage:
|
||||
(cd $(workarea) && $(MAKE) coverage)
|
||||
|
||||
.PHONY: bootfiles
|
||||
bootfiles:
|
||||
(cd $(workarea) && $(MAKE) bootfiles)
|
||||
|
||||
# Supply XM=<machine> to build boot files for <machine>
|
||||
.PHONY: boot
|
||||
boot: build
|
||||
mkdir -p boot/$(XM)
|
||||
(cd $(workarea) && $(MAKE) -f Mf-boot $(XM).boot)
|
||||
|
||||
# Supply ORIG=<dir> to build using existing at <dir>
|
||||
.PHONY: from-orig
|
||||
from-orig:
|
||||
(cd $(m)/s && $(MAKE) -f Mf-cross m=$(m) xm=$(m) base=$(ORIG)/$(m))
|
||||
$(MAKE) build
|
||||
|
||||
.PHONY: docs
|
||||
docs: build
|
||||
(cd csug && $(MAKE) m=$(m))
|
||||
(cd release_notes && $(MAKE) m=$(m))
|
||||
|
||||
.PHONY: install-docs
|
||||
install-docs: docs
|
||||
(cd csug && $(MAKE) install m=$(m))
|
||||
(cd release_notes && $(MAKE) install m=$(m))
|
||||
|
||||
.PHONY: bintar
|
||||
bintar:
|
||||
(cd $(workarea) && $(MAKE) bintar)
|
||||
|
||||
.PHONY: rpm
|
||||
rpm:
|
||||
(cd $(workarea) && $(MAKE) rpm)
|
||||
|
||||
.PHONY: pkg
|
||||
pkg:
|
||||
(cd $(workarea) && $(MAKE) pkg)
|
||||
|
||||
.PHONY: clean
|
||||
clean:
|
||||
(cd $(workarea) && $(MAKE) clean)
|
||||
|
||||
.PHONY: distclean
|
||||
distclean:
|
||||
(cd csug && if [ -e Makefile ] ; then $(MAKE) reallyreallyclean ; fi)
|
||||
rm -f csug/Makefile
|
||||
(cd release_notes && if [ -e Makefile ] ; then $(MAKE) reallyreallyclean ; fi)
|
||||
rm -f release_notes/Makefile
|
||||
rm -rf $(workarea)
|
||||
rm -f Makefile
|
||||
rm -f Make.out
|
28
makefiles/Mf-boot.in
Normal file
28
makefiles/Mf-boot.in
Normal file
|
@ -0,0 +1,28 @@
|
|||
# Mf-boot.in
|
||||
# Copyright 1984-2017 Cisco Systems, Inc.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
bootfiles=$(addsuffix .boot, $(shell cd ../boot ; echo *))
|
||||
|
||||
doit: $(bootfiles)
|
||||
|
||||
%.boot:
|
||||
( cd .. ; ./workarea $* xc-$* )
|
||||
( cd ../xc-$*/s ; make -f Mf-cross base=../../$(workarea) --jobs=2 m=$(m) xm=$* )
|
||||
for x in `echo scheme.boot petite.boot scheme.h equates.h` ; do\
|
||||
if [ ! -h ../xc-$*/boot/$*/$$x ] ; then \
|
||||
mv -f ../xc-$*/boot/$*/$$x ../boot/$*/$$x ;\
|
||||
fi ;\
|
||||
done
|
||||
rm -rf ../xc-$*
|
164
makefiles/Mf-install.in
Normal file
164
makefiles/Mf-install.in
Normal file
|
@ -0,0 +1,164 @@
|
|||
# Mf-install.in
|
||||
# Copyright 1984-2017 Cisco Systems, Inc.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
###############################################################################
|
||||
# the following variables are set up by configure #
|
||||
###############################################################################
|
||||
|
||||
m=none
|
||||
|
||||
# The following variables determine where the executables, boot files,
|
||||
# example programs, and manual pages are installed.
|
||||
|
||||
# executable directory
|
||||
InstallBin=/usr/bin
|
||||
|
||||
# library directory
|
||||
InstallLib=/usr/lib
|
||||
|
||||
# man page directory
|
||||
InstallMan=/usr/man/man1
|
||||
|
||||
# installation owner
|
||||
InstallOwner=
|
||||
|
||||
# installation group
|
||||
InstallGroup=
|
||||
|
||||
# Files are actually installed at ${TempRoot}${InstallBin},
|
||||
# ${TempRoot}${InstallLib}, and ${TempRoot}${InstallMan}.
|
||||
# This useful for testing the install process and for building
|
||||
# installation scripts
|
||||
TempRoot=
|
||||
|
||||
# compress man pages?
|
||||
GzipManPages=yes
|
||||
|
||||
# executable names
|
||||
InstallSchemeName=scheme
|
||||
InstallPetiteName=petite
|
||||
InstallScriptName=scheme-script
|
||||
|
||||
# Whether to install "kernel.o" or "libkernel.a"
|
||||
InstallKernelTarget=installkernellib
|
||||
|
||||
# Maybe install libz.a and liblz4.a by setting to "installzlib" and "installliz4"
|
||||
InstallZlibTarget=
|
||||
InstallLZ4Target=
|
||||
|
||||
###############################################################################
|
||||
# no changes should be needed below this point #
|
||||
###############################################################################
|
||||
|
||||
Version=csv9.5.9
|
||||
Include=boot/$m
|
||||
PetiteBoot=boot/$m/petite.boot
|
||||
SchemeBoot=boot/$m/scheme.boot
|
||||
Revision=boot/$m/revision
|
||||
Scheme=bin/$m/scheme
|
||||
Petite=bin/$m/petite
|
||||
InstallLibExamples=${InstallLib}/${Version}/examples
|
||||
InstallLibBin=${InstallLib}/${Version}/$m
|
||||
|
||||
Bin=${TempRoot}${InstallBin}
|
||||
Lib=${TempRoot}${InstallLib}/${Version}
|
||||
LibExamples=${TempRoot}${InstallLibExamples}
|
||||
LibBin=${TempRoot}${InstallLibBin}
|
||||
Man=${TempRoot}${InstallMan}
|
||||
PetitePath=${Bin}/${InstallPetiteName}
|
||||
SchemePath=${Bin}/${InstallSchemeName}
|
||||
SchemeScriptPath=${Bin}/${InstallScriptName}
|
||||
|
||||
install: bininstall libbininstall maninstall liblibinstall ${InstallKernelTarget}
|
||||
|
||||
uninstall:
|
||||
rm -rf ${Lib}
|
||||
rm -f ${PetitePath}
|
||||
rm -f ${SchemePath}
|
||||
rm -f ${SchemeScriptPath}
|
||||
rm -f ${Man}/${InstallPetiteName}.1{,.gz}
|
||||
rm -f ${Man}/${InstallSchemeName}.1{,.gz}
|
||||
|
||||
scheme.1 petite.1: scheme.1.in
|
||||
sed -e "s;{InstallBin};${InstallBin};g" \
|
||||
-e "s;{InstallLibExamples};${InstallLibExamples};g" \
|
||||
-e "s;{InstallLibBin};${InstallLibBin};g" \
|
||||
-e "s;{InstallPetiteName};${InstallPetiteName};g" \
|
||||
-e "s;{InstallSchemeName};${InstallSchemeName};g" \
|
||||
-e "s;{InstallScriptName};${InstallScriptName};g" \
|
||||
scheme.1.in > $@
|
||||
|
||||
###############################################################################
|
||||
# no useful external targets below this line #
|
||||
###############################################################################
|
||||
|
||||
I=./installsh -o "${InstallOwner}" -g "${InstallGroup}"
|
||||
|
||||
bininstall: ${Bin}
|
||||
$I -m 555 ${Scheme} ${SchemePath}
|
||||
ln -f ${SchemePath} ${PetitePath}
|
||||
ln -f ${SchemePath} ${SchemeScriptPath}
|
||||
|
||||
libbininstall: ${LibBin}
|
||||
$I -m 444 ${PetiteBoot} ${LibBin}/petite.boot
|
||||
if [ "${InstallPetiteName}" != "petite" ]; then\
|
||||
rm -f ${LibBin}/${InstallPetiteName}.boot;\
|
||||
ln -f ${LibBin}/petite.boot ${LibBin}/${InstallPetiteName}.boot;\
|
||||
fi
|
||||
$I -m 444 ${SchemeBoot} ${LibBin}/scheme.boot;\
|
||||
if [ "${InstallSchemeName}" != "scheme" ]; then\
|
||||
rm -f ${LibBin}/${InstallSchemeName}.boot;\
|
||||
ln -f ${LibBin}/scheme.boot ${LibBin}/${InstallSchemeName}.boot;\
|
||||
fi
|
||||
ln -f ${LibBin}/scheme.boot ${LibBin}/${InstallScriptName}.boot;
|
||||
$I -m 444 ${Include}/main.o ${LibBin}
|
||||
$I -m 444 ${Include}/scheme.h ${LibBin}
|
||||
$I -m 444 ${Revision} ${LibBin}/revision
|
||||
|
||||
installkernelobj: ${LibBin}
|
||||
$I -m 444 ${Include}/kernel.o ${LibBin}
|
||||
|
||||
installkernellib: ${LibBin} ${InstallZlibTarget} ${InstallLZ4Target}
|
||||
$I -m 444 ${Include}/libkernel.a ${LibBin}
|
||||
|
||||
installzlib: ${LibBin}
|
||||
$I -m 444 zlib/libz.a ${LibBin}
|
||||
|
||||
installlz4: ${LibBin}
|
||||
$I -m 444 lz4/lib/liblz4.a ${LibBin}
|
||||
|
||||
maninstall: scheme.1 petite.1 ${Man}
|
||||
$I -m 444 scheme.1 ${Man}/${InstallSchemeName}.1
|
||||
if [ ${GzipManPages} = yes ] ; then gzip -f ${Man}/${InstallSchemeName}.1 ; fi
|
||||
$I -m 444 petite.1 ${Man}/${InstallPetiteName}.1
|
||||
if [ ${GzipManPages} = yes ] ; then gzip -f ${Man}/${InstallPetiteName}.1 ; fi
|
||||
|
||||
liblibinstall: ${LibExamples}
|
||||
$I -m 444 examples/* ${LibExamples}
|
||||
|
||||
${Lib}:
|
||||
$I -d -m 755 ${Lib}
|
||||
|
||||
${LibBin}: ${Lib}
|
||||
$I -d -m 755 ${LibBin}
|
||||
|
||||
${LibExamples}: ${Lib}
|
||||
$I -d -m 755 ${LibExamples}
|
||||
|
||||
${Bin}:
|
||||
$I -d -m 755 ${Bin}
|
||||
|
||||
${Man}:
|
||||
$I -d -m 755 ${Man}
|
79
makefiles/installsh
Executable file
79
makefiles/installsh
Executable file
|
@ -0,0 +1,79 @@
|
|||
#! /bin/sh
|
||||
if [ -x /bin/true ]; then TRUE=/bin/true;
|
||||
elif [ -x /usr/bin/true ]; then TRUE=/usr/bin/true;
|
||||
elif command -v true &> /dev/null; then TRUE=true;
|
||||
else echo "Can't find /bin/true or /usr/bin/true and no true command" ; exit 1;
|
||||
fi
|
||||
|
||||
while ${TRUE} ; do
|
||||
mkdirs=0
|
||||
ifdiff=0
|
||||
|
||||
while [ $# -ge 0 ] ; do
|
||||
case $1 in
|
||||
-d) mkdirs=1 ;;
|
||||
-o) shift; owner=$1 ;;
|
||||
-g) shift; group=$1 ;;
|
||||
-m) shift; mode=$1 ;;
|
||||
--ifdiff) ifdiff=1 ;;
|
||||
-*) break 2 ;;
|
||||
*) break ;;
|
||||
esac
|
||||
shift
|
||||
done
|
||||
|
||||
if [ $mkdirs -eq 1 ] && [ $ifdiff -eq 1 ] ; then
|
||||
break
|
||||
fi
|
||||
|
||||
if [ $mkdirs -eq 1 ] ; then
|
||||
dirs=$*
|
||||
|
||||
for dir in $dirs ; do
|
||||
stack=""
|
||||
while [ "$dir" != "/" -a "$dir" != "." -a "$dir" != ".." ] ; do
|
||||
stack="$dir $stack"
|
||||
dir=`dirname $dir`
|
||||
done
|
||||
|
||||
for dir in $stack ; do
|
||||
if [ ! -d $dir ] ; then
|
||||
if mkdir $dir ; then
|
||||
if [ "$owner" != "" ] ; then chown $owner $dir ; fi
|
||||
if [ "$group" != "" ] ; then chgrp $group $dir ; fi
|
||||
if [ "$mode" != "" ] ; then chmod $mode $dir ; fi
|
||||
fi
|
||||
fi
|
||||
done
|
||||
done
|
||||
else
|
||||
nargs=$#
|
||||
if [ $nargs -lt 2 ] ; then break ; fi
|
||||
|
||||
files=""
|
||||
while [ $# -ne 1 ] ; do
|
||||
files="$files $1"
|
||||
shift
|
||||
done
|
||||
dest=$1
|
||||
|
||||
if [ ! -d $dest -a $nargs -ne 2 ] ; then break ; fi
|
||||
|
||||
for file in $files ; do
|
||||
destfile=$dest
|
||||
if [ -d $destfile ] ; then destfile=$destfile/`basename $file` ; fi
|
||||
if [ $ifdiff -eq 1 ] && cmp -s $file $destfile || cp -f -p $file $destfile ; then
|
||||
if [ "$owner" != "" ] ; then chown $owner $destfile ; fi
|
||||
if [ "$group" != "" ] ; then chgrp $group $destfile ; fi
|
||||
if [ "$mode" != "" ] ; then chmod $mode $destfile ; fi
|
||||
fi
|
||||
done
|
||||
fi
|
||||
|
||||
exit 0
|
||||
done
|
||||
|
||||
echo "usage: $0 [ -o owner] [ -g group ] [ -m mode ] [ --ifdiff] file dest"
|
||||
echo " $0 [ -o owner] [ -g group ] [ -m mode ] [ --ifdiff] file file ... dir"
|
||||
echo " $0 -d [ -o owner] [ -g group ] [ -m mode ] dir dir ..."
|
||||
exit 1
|
Reference in a new issue