From 9f8eb2ef4673842521dd98a94deae4c026bd68ab Mon Sep 17 00:00:00 2001 From: Dominic Hargreaves Date: Fri, 13 Oct 2017 14:49:03 +0200 Subject: [PATCH] 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. --- MANIFEST | 1 + Porting/README.pod | 4 ++++ Porting/exec-bit.txt | 1 + Porting/mksample | 33 +++++++++++++++++++++++++++++++++ Porting/pumpkin.pod | 6 ++---- 5 files changed, 41 insertions(+), 4 deletions(-) create mode 100755 Porting/mksample diff --git a/MANIFEST b/MANIFEST index b5492edc76..d57a8e5165 100644 --- a/MANIFEST +++ b/MANIFEST @@ -5176,6 +5176,7 @@ Porting/makerel Release making utility Porting/manicheck Check against MANIFEST Porting/manifest_lib.pl Library for checking and sorting the MANIFEST Porting/manisort Sort the MANIFEST +Porting/mksample Generate Porting/config_H and Porting/config.sh Porting/new-perldelta.pl Generate a new perldelta Porting/newtests-perldelta.pl Generate Perldelta stub for newly added tests Porting/perldelta_template.pod Template for creating new perldelta.pod files diff --git a/Porting/README.pod b/Porting/README.pod index bb047eb6e8..110e9f0df6 100644 --- a/Porting/README.pod +++ b/Porting/README.pod @@ -258,6 +258,10 @@ This library provides functions used in checking and sorting the F. This script sorts the files in F. +=head2 F + +This script regenerates F and F. + =head2 F This script automates the process for creating perldelta.pl. diff --git a/Porting/exec-bit.txt b/Porting/exec-bit.txt index bf79b62398..83448f7d28 100644 --- a/Porting/exec-bit.txt +++ b/Porting/exec-bit.txt @@ -52,6 +52,7 @@ Porting/findrfuncs Porting/makerel Porting/make_dot_patch.pl Porting/make_snapshot.pl +Porting/mksample Porting/newtests-perldelta.pl Porting/perlhist_calculate.pl Porting/sort_perldiag.pl diff --git a/Porting/mksample b/Porting/mksample new file mode 100755 index 0000000000..191a5e54c5 --- /dev/null +++ b/Porting/mksample @@ -0,0 +1,33 @@ +#!/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 diff --git a/Porting/pumpkin.pod b/Porting/pumpkin.pod index 7253fe7770..c385962109 100644 --- a/Porting/pumpkin.pod +++ b/Porting/pumpkin.pod @@ -303,10 +303,8 @@ is not really hard. Also F is automatically produced from F. In general, look out for all F<*.SH> files. -Finally, the sample files in the F subdirectory are -generated automatically by the script F included -with the metaconfig units. See L<"run metaconfig"> below for -information on obtaining the metaconfig units. +Finally, the sample files F and F in the +F subdirectory are generated by the script F. =head1 How to Make a Distribution