From: Andy Dougherty Date: Tue, 30 Mar 1999 12:41:29 +0000 (-0500) Subject: Introduce myconfig.SH. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=4663847075ec7a4ae5ad72ea6821c81ef4ff7779;p=p5sagit%2Fp5-mst-13.2.git Introduce myconfig.SH. To: Jarkko Hietaniemi Cc: Nick Ing-Simmons , Perl Porters Subject: [PATCH] myconfig.SH (was Re: perl install bug on AIX 4.3.1.0) Message-Id: p4raw-id: //depot/cfgperl@3200 --- diff --git a/MANIFEST b/MANIFEST index 2b69bc2..60612f2 100644 --- a/MANIFEST +++ b/MANIFEST @@ -857,7 +857,7 @@ mpeix/mpeixish.h MPE/iX port mpeix/nm MPE/iX port mpeix/relink MPE/iX port mv-if-diff Script to mv a file if it changed -myconfig Prints summary of the current configuration +myconfig.SH Prints summary of the current configuration nostdio.h Cause compile error on stdio calls op.c Opcode syntax tree code op.h Opcode syntax tree header diff --git a/myconfig b/myconfig.SH old mode 100755 new mode 100644 similarity index 67% rename from myconfig rename to myconfig.SH index 02ee0a6..dd2b914 --- a/myconfig +++ b/myconfig.SH @@ -1,22 +1,32 @@ -#!/bin/sh +case $CONFIG in +'') + if test -f config.sh; then TOP=.; + elif test -f ../config.sh; then TOP=..; + elif test -f ../../config.sh; then TOP=../..; + elif test -f ../../../config.sh; then TOP=../../..; + elif test -f ../../../../config.sh; then TOP=../../../..; + else + echo "Can't find the perl config.sh file produced by Configure"; + exit 1 + fi + . $TOP/config.sh + ;; +esac +: This forces SH files to create target in same directory as SH file. +: This is so that make depend always knows where to find SH derivatives. +case "$0" in +*/*) cd `expr X$0 : 'X\(.*\)/'` ;; +esac +echo "Extracting myconfig (with variable substitutions)" +$spitshell >myconfig <