#!/bin/sh package=rfpc version_major=0 version_minor=0 version_micro=0 version=$version_major.$version_minor.$version_micro install_dir=/usr/local help () { cat < install directory (default /usr/local) -name shows package name -version shows package version EOF exit 1 } while true; do if [ -z "$1" ]; then break; fi case $1 in -prefix) shift if [ -z "$1" ]; then help; fi install_dir="$1" ;; -name) echo $package exit 0 ;; -version) echo $version exit 0 ;; -help|*) help ;; esac shift done . ./config.functions config_mk=config.mk subdirs_mk=subdirs.mk if [ -e "$config_mk" ] ; then rm $config_mk fi if [ -e "$subdirs_mk" ] ; then rm $subdirs_mk fi if [ -z "$RFP" ]; then RFP="rfp" ; fi if [ -z "$RFPC" ]; then RFPC="rfpc" ; fi echon "Checking for working Refal+ compiler... " cat <cfgtest.rf Main = ; EOF if $RFP -o cfgtest cfgtest.rf >/dev/null 2>&1; then echo "found" rm -f cfgtest cfgtest.rf else echo "not found" rm -f cfgtest cfgtest.rf exit 1 fi cat >>$config_mk <>$subdirs_mk <