racket/makefiles/Mf-install.in
Andy Keep a80f0fb0b3 - added custom install options. workarea creates an empty config.h,
and configure creates a config.h that sets the default scheme heap
  path and scheme-script name based on the actual configuration.
    configure, newrelease, workarea, checkin,
    c/Mf-base, scheme.c, main.c,
    Mf-install.in
- renamed the installed example directory from lib to examples.
    Mf-install.in,
    scheme.1.in
- added force option to gzip during man page install to prevent gzip from
  asking for permission to overwrite existing man page files.
    Mf-install.in
- removed ~/lib/csv%v/%m from the default scheme heap path on unix-like
  systems.  documented inclusion of %x\..\..\boot\%m in the Windows
  default scheme heap path.
    main.c,
    use.stex
- added new configuration options: --installbin, --installlib,
  --installschemename, --installpetitename, and --installscriptname.
    configure
- updated the example library link to the nanopass framework.
    CONTRIBUTING.md
- now cleaning up petite.1 and scheme.1 left behind by make install
    Makefile-workarea.in, checkin
- now removing workarea after cleaning csug and release_notes so
  Mf-stex (included from csug/Makefile and release_notes/Makefile)
  doesn't complain trying to determine the machine type.
    Makefile.in
- added installsh support for --ifdiff so the csug make file can use it
  for the install target.
    installsh,
    csug/Makefile
- added instructions for building (cross-compiling) a boot file for
  a supported machine type for which a boot file is not built by default.
    BUILDING

original commit: df4194c83a9e67d1ec20165fc3e2def4ed8e8986
2016-05-06 18:30:06 -04:00

151 lines
4.7 KiB
Plaintext

# Mf-install.in
# Copyright 1984-2016 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.
# InstallPrefix is the final destination base and will be reflected
# in the generated manual page
InstallPrefix=/usr
# executable directory
InstallBin=${InstallPrefix}/bin
# library directory
InstallLib=${InstallPrefix}/lib
# man page directory
InstallMan=${InstallPrefix}/man/man1
# installation owner
InstallOwner=
# installation group
InstallGroup=
# Files are actually installed at ${TempRoot}${InstallPrefix}
# 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
###############################################################################
# no changes should be needed below this point #
###############################################################################
Version=csv9.4
Include=boot/$m
PetiteBoot=boot/$m/petite.boot
SchemeBoot=boot/$m/scheme.boot
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
uninstall:
@echo To uninstall all machine types:
@echo rm -rf ${Lib}
@echo rm -f ${PetitePath}
@echo rm -f ${SchemePath}
@echo rm -f ${Man}/${InstallPetiteName}.1'{,.gz}'
@echo rm -f ${Man}/${InstallSchemeName}.1'{,.gz}'
@echo ""
@echo To uninstall just machine-type $m
@echo rm -rf ${Lib}/$m
@echo rm -f ${PetitePath}
@echo rm -f ${SchemePath}
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\
/bin/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\
/bin/rm -f ${LibBin}/${InstallSchemeName}.boot;\
ln -f ${LibBin}/scheme.boot ${LibBin}/${InstallSchemeName}.boot;\
fi
ln -sf ${LibBin}/scheme.boot ${LibBin}/${InstallScriptName}.boot;
$I -m 444 ${Include}/scheme.h ${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}