extract_config.sh revision 02e56f3f1bfc8d9977bafb8cb5202f576dcded27
#
# Copyright 2005 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
# ident "%Z%%M% %I% %E% SMI"
#
#
# This script extracts values from the passed config.sh file and prints them to
# stdout in a form that is suitable for including in a Makefile. This removes
# the requirement to manually keep the various Makefile macros in step with the
# contents of config.sh.
#
if [ -z "$1" -o ! -r "$1" ]; then
exit 1
fi
typeset -r config=$1
# Pull in config.sh.
set -e
. $config
set +e
printf '# This file was automatically generated from %s by %s\n\n' \
#
# set of flags, and needs to build with the selected compilers.
#
printf 'C99MODE = $(C99_DISABLE)\n'
printf 'SPACEFLAG =\n'
printf 'ILDOFF =\n'
printf 'CERRWARN =\n'
printf 'DYNFLAGS += $(ZIGNORE)\n'
# Global stuff.
printf 'MINIPERL = $(PERL_DISTRIB)/miniperl\n'
printf 'PERL_CONFIGDEP = $(PERL_CONFIG_H) $(PERL_CONFIG_PM)\n'
# Directory locations.
# Directory locations relative to the current build $ROOT.
# Compilation environment flags
printf 'KEEP_STATE_OFF = unset KEEP_STATE SUNPRO_DEPENDENCIES\n'
printf 'PERL_COREFLAGS = -DPERL_CORE\n'
printf 'PERL_MM_ENV = $(KEEP_STATE_OFF); unset VERSION; '
printf 'PERL5LIB=$(PERL_UTILS)/lib:$(PERL_DISTRIB)/lib; export PERL5LIB\n'
printf "PERL_MM_ARGS = DEFINE='\$(DTEXTDOM)'\n"