This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Add Porting/mksample
authorDominic Hargreaves <dom@earth.li>
Fri, 13 Oct 2017 12:49:03 +0000 (14:49 +0200)
committerDominic Hargreaves <dom@earth.li>
Fri, 13 Oct 2017 13:31:47 +0000 (15:31 +0200)
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
Porting/README.pod
Porting/exec-bit.txt
Porting/mksample [new file with mode: 0755]
Porting/pumpkin.pod

index b5492ed..d57a8e5 100644 (file)
--- 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
index bb047eb..110e9f0 100644 (file)
@@ -258,6 +258,10 @@ This library provides functions used in checking and sorting the F<MANIFEST>.
 
 This script sorts the files in F<MANIFEST>.
 
+=head2 F<mksample>
+
+This script regenerates F<Porting/config.sh> and F<Porting/config_H>.
+
 =head2 F<new-perldelta.pl>
 
 This script automates the process for creating perldelta.pl.
index bf79b62..83448f7 100644 (file)
@@ -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 (executable)
index 0000000..191a5e5
--- /dev/null
@@ -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
index 7253fe7..c385962 100644 (file)
@@ -303,10 +303,8 @@ is not really hard.
 Also F<Makefile> is automatically produced from F<Makefile.SH>.
 In general, look out for all F<*.SH> files.
 
-Finally, the sample files in the F<Porting/> subdirectory are
-generated automatically by the script F<U/mksample> included 
-with the metaconfig units.  See L<"run metaconfig"> below for
-information on obtaining the metaconfig units.
+Finally, the sample files F<config.sh> and F<config_H> in the
+F<Porting/> subdirectory are generated by the script F<Porting/mksample>.
 
 =head1 How to Make a Distribution