Added +site=foo option for naming site specific Makefile fragments.

This commit is contained in:
K. Richard Pixley
1991-10-02 06:29:53 +00:00
parent 6f8ac2d9fb
commit 7875b07ffa

40
configure vendored
View File

@@ -107,10 +107,12 @@ do
-rm | +rm) -rm | +rm)
removing=${arg} removing=${arg}
;; ;;
# -srcdir=* | +srcdir=* | +srcdi=* | +srcd=* | +src=* | +sr=* | +s=*) -site=* | +site=* | +sit=* | +si=*)
site=`echo ${arg} | sed 's/[+-]s[a-z]*=//'`
;;
# -srcdir=* | +srcdir=* | +srcdi=* | +srcd=* | +src=* | +sr=*)
# srcdir=`echo ${arg} | sed 's/[+-]s[a-z]*=//'` # srcdir=`echo ${arg} | sed 's/[+-]s[a-z]*=//'`
# ;; # ;;
-subdirs | +su*) -subdirs | +su*)
subdirs=${arg} subdirs=${arg}
;; ;;
@@ -422,6 +424,17 @@ for host in ${hosts} ; do
mv Makefile.tem ${Makefile} mv Makefile.tem ${Makefile}
fi fi
# Conditionalize the makefile for this site.
if [ -n "${site}" ] ; then
site_makefile_frag=smake-${site}
if [ -f ${srcdir}/${site_makefile_frag} ] ; then
(echo "site_makefile_frag = ${srcdir}/${site_makefile_frag}" ;
sed -e "/^####/ r ${srcdir}/${target_makefile_frag}" ${Makefile}) > Makefile.tem
mv Makefile.tem ${Makefile}
fi
fi
# set srcdir # set srcdir
sed "s@^srcdir = \.@srcdir = ${srcdir}@" ${Makefile} > Makefile.tem sed "s@^srcdir = \.@srcdir = ${srcdir}@" ${Makefile} > Makefile.tem
mv Makefile.tem ${Makefile} mv Makefile.tem ${Makefile}
@@ -440,15 +453,15 @@ for host in ${hosts} ; do
sed "s:^NONSUBDIRS =.*$:NONSUBDIRS = ${noconfigdirs}:" ${Makefile} > Makefile.tem sed "s:^NONSUBDIRS =.*$:NONSUBDIRS = ${noconfigdirs}:" ${Makefile} > Makefile.tem
mv Makefile.tem ${Makefile} mv Makefile.tem ${Makefile}
# remove any form feeds.
sed -e "s/ //" ${Makefile} > Makefile.tem
mv Makefile.tem ${Makefile}
using= using=
if [ -f ${srcdir}/${host_makefile_frag} ] ; then if [ -f ${srcdir}/${host_makefile_frag} ] ; then
using=" using \"${host_makefile_frag}\"" using=" using \"${host_makefile_frag}\""
fi fi
# remove any form feeds.
sed -e "s/ //" ${Makefile} > Makefile.tem
mv Makefile.tem ${Makefile}
if [ -f ${srcdir}/${target_makefile_frag} ] ; then if [ -f ${srcdir}/${target_makefile_frag} ] ; then
if [ -z "${using}" ] ; then if [ -z "${using}" ] ; then
andusing=" using \"${target_makefile_frag}\"" andusing=" using \"${target_makefile_frag}\""
@@ -459,8 +472,18 @@ for host in ${hosts} ; do
andusing=${using} andusing=${using}
fi fi
if [ -f ${srcdir}/${site_makefile_frag} ] ; then
if [ -z "${andusing}" ] ; then
andandusing=" using \"${site_makefile_frag}\""
else
andandusing="${andusing} and \"${site_makefile_frag}\""
fi
else
andandusing=${using}
fi
if [ -n "${verbose}" -o -z "${recurring}" ] ; then if [ -n "${verbose}" -o -z "${recurring}" ] ; then
echo "Created \"${Makefile}\"" in `pwd`${andusing}. echo "Created \"${Makefile}\"" in `pwd`${andandusing}.
fi fi
if [ -f ./configure.pos ] ; then if [ -f ./configure.pos ] ; then
@@ -528,6 +551,9 @@ exit 0
# #
# #
# $Log$ # $Log$
# Revision 1.46 1991/10/02 06:29:53 rich
# Added +site=foo option for naming site specific Makefile fragments.
#
# Revision 1.45 1991/10/02 06:15:13 rich # Revision 1.45 1991/10/02 06:15:13 rich
# Removed +f option. Used to stand for +forcesubdirs which is now # Removed +f option. Used to stand for +forcesubdirs which is now
# called +subdirs. # called +subdirs.