perl/Porting/mksample
Dominic Hargreaves 9f8eb2ef46 Add Porting/mksample
This script was previously in the metaconfig repository, and also dealt
with updating Porting/Glossary, but it wasn't being regularly used.
It does not use any data from that repository, so is better placed
here.

There are some outstanding ambiguities to resolve in when this script
should be run in the documentation, since the generated files
Porting/config.sh and Porting/config_H are also updated by other
means.
2017-10-13 15:31:47 +02:00

34 lines
890 B
Bash
Executable File

#!/bin/sh
#
# This script can be used to keep Porting/config_H (which is an example
# config.h) up-to-date with the latest Configure.
# Original author: Andy Dougherty July 14, 1998
rm -f config.sh Policy.sh
cat >Policy.sh <<'EOP'
libswanted="cl pthread $libswanted"
EOP
sh ./Configure -Dprefix=/opt/perl \
-Dcf_by='yourname' \
-Dcf_email='yourname@yourhost.yourplace.com' \
-Dperladmin='yourname@yourhost.yourplace.com' \
-Dmydomain='.yourplace.com' \
-Dmyhostname='yourhost' \
-Duse64bitint \
-Dusedevel \
-dE
test $? = 0 || exit 1
chmod u+w Porting Porting/config*
cp config.sh Porting/config.sh
sh config_h.SH
cat <<'EOCP' > Porting/config_H
/* This file (config_H) is a sample config.h file. If you are unable
to successfully run Configure, copy this file to config.h and
edit it to suit your system.
*/
EOCP
cat config.h >> Porting/config_H
rm config.sh config.h