Build: check during make for perl script library requirements
authorJeremy Harris <jgh146exb@wizmail.org>
Thu, 7 Sep 2023 15:02:03 +0000 (16:02 +0100)
committerJeremy Harris <jgh146exb@wizmail.org>
Thu, 7 Sep 2023 15:02:03 +0000 (16:02 +0100)
12 files changed:
src/OS/Makefile-Base
src/src/exicyclog.src
src/src/exim_checkaccess.src
src/src/exim_id_update.src
src/src/eximon.src
src/src/eximstats.src
src/src/exinext.src
src/src/exipick.src
src/src/exiqgrep.src
src/src/exiqsumm.src
src/src/exiwhat.src
src/src/transport-filter.src

index e0aa1dc6ce77263028827a679d5bb644d4cc32c6..6778331c7100c218d7c7fc7a92a4bd969b40b016 100644 (file)
@@ -287,6 +287,7 @@ exicyclog: config ../src/exicyclog.src
          ../src/exicyclog.src > exicyclog-t
        @mv exicyclog-t exicyclog
        @chmod a+x exicyclog
+       @./exicyclog -v 2>&1 >/dev/null
        @echo ">>> exicyclog script built"
 
 # Target for the exinext utility script
@@ -304,6 +305,7 @@ exinext: config ../src/exinext.src
          ../src/exinext.src > exinext-t
        @mv exinext-t exinext
        @chmod a+x exinext
+       @./exinext -v 2>&1 >/dev/null
        @echo ">>> exinext script built"
 
 # Target for the exiwhat utility script
@@ -328,6 +330,7 @@ exiwhat: config ../src/exiwhat.src
          ../src/exiwhat.src > exiwhat-t
        @mv exiwhat-t exiwhat
        @chmod a+x exiwhat
+       @./exiwhat -v 2>&1 >/dev/null
        @echo ">>> exiwhat script built"
 
 # Target for the exim_checkaccess utility script
@@ -346,6 +349,7 @@ exim_checkaccess: config ../src/exim_checkaccess.src
          ../src/exim_checkaccess.src > exim_checkaccess-t
        @mv exim_checkaccess-t exim_checkaccess
        @chmod a+x exim_checkaccess
+       # @./exim_checkaccess -v 2>&1 >/dev/null
        @echo ">>> exim_checkaccess script built"; echo ""
 
 # Target for the Exim monitor start-up script
@@ -366,6 +370,7 @@ eximon: config ../src/eximon.src ../OS/eximon.conf-Default \
          -e "s?EXIM_RELEASE_VERSION?$${EXIM_RELEASE_VERSION}?" \
          -e "s?EXIM_VARIANT_VERSION?$${EXIM_VARIANT_VERSION}?" \
          ../src/eximon.src >> eximon
+       @./eximon -v 2>&1 >/dev/null
        @echo ">>> eximon script built"; echo ""
 
 # Targets for utilities; these are all Perl scripts that have to get the
@@ -385,6 +390,7 @@ exigrep: config ../src/exigrep.src
          ../src/exigrep.src > exigrep-t
        @mv exigrep-t exigrep
        @chmod a+x exigrep
+       @./exigrep --version 2>&1 >/dev/null
        @echo ">>> exigrep script built"
 
 exim_msgdate: config ../src/exim_msgdate.src
@@ -402,6 +408,7 @@ exim_msgdate: config ../src/exim_msgdate.src
          ../src/exim_msgdate.src > exim_msgdate-t
        @mv exim_msgdate-t exim_msgdate
        @chmod a+x exim_msgdate
+       @./exim_msgdate -v 2>&1 >/dev/null
        @echo ">>> exim_msgdate script built"
 
 eximstats: config ../src/eximstats.src
@@ -413,6 +420,7 @@ eximstats: config ../src/eximstats.src
          ../src/eximstats.src > eximstats-t
        @mv eximstats-t eximstats
        @chmod a+x eximstats
+       @./eximstats -v 2>&1 >/dev/null
        @echo ">>> eximstats script built"
 
 exiqgrep: config ../src/exiqgrep.src
@@ -428,6 +436,7 @@ exiqgrep: config ../src/exiqgrep.src
          ../src/exiqgrep.src > exiqgrep-t
        @mv exiqgrep-t exiqgrep
        @chmod a+x exiqgrep
+       @./exiqgrep -v 2>&1 >/dev/null
        @echo ">>> exiqgrep script built"
 
 exiqsumm: config ../src/exiqsumm.src
@@ -439,6 +448,7 @@ exiqsumm: config ../src/exiqsumm.src
          ../src/exiqsumm.src > exiqsumm-t
        @mv exiqsumm-t exiqsumm
        @chmod a+x exiqsumm
+       @./exiqsumm -v 2>&1 >/dev/null
        @echo ">>> exiqsumm script built"
 
 exipick: config ../src/exipick.src
@@ -452,6 +462,7 @@ exipick: config ../src/exipick.src
          ../src/exipick.src > exipick-t
        @mv exipick-t exipick
        @chmod a+x exipick
+       @./exipick -v 2>&1 >/dev/null
        @echo ">>> exipick script built"
 
 exim_id_update: config ../src/exim_id_update.src
@@ -465,6 +476,7 @@ exim_id_update: config ../src/exim_id_update.src
          ../src/exim_id_update.src > exim_id_update-t
        @mv exim_id_update-t exim_id_update
        @chmod a+x exim_id_update
+       @./exim_id_update -v 2>&1 >/dev/null
        @echo ">>> exim_id_update script built"
 
 transport-filter.pl: config ../src/transport-filter.src
@@ -487,6 +499,7 @@ convert4r3: config ../src/convert4r3.src
          ../src/convert4r3.src > convert4r3-t
        @mv convert4r3-t convert4r3
        @chmod a+x convert4r3
+       @./convert4r3 -v 2>&1 >/dev/null
        @echo ">>> convert4r3 script built"
 
 convert4r4: config ../src/convert4r4.src
@@ -498,6 +511,7 @@ convert4r4: config ../src/convert4r4.src
          ../src/convert4r4.src > convert4r4-t
        @mv convert4r4-t convert4r4
        @chmod a+x convert4r4
+       @./convert4r4 -v 2>&1 >/dev/null
        @echo ">>> convert4r4 script built"
 
 
index 20bf9fcd4ead3f9262bc73896fd18cf32aafc3bf..ce43b80b0d733a2e965872572d6acb693192ac2b 100644 (file)
@@ -72,7 +72,7 @@ while [ $# -gt 0 ] ; do
   -k) keep=$2
       shift
       ;;
-   --version)
+   --version|-v)
       echo "`basename $0`: $0"
       echo "build: EXIM_RELEASE_VERSIONEXIM_VARIANT_VERSION"
       exit 0
index 360f307ba5e6806cfbda613eece0b18fc56cdfd7..159d9a47281f6ebd437d72f0f8bc4ba0297565fa 100755 (executable)
@@ -68,11 +68,11 @@ use FileHandle;
 use File::Basename;
 use IPC::Open2;
 
-if ($ARGV[0] eq '--version') {
+if ($ARGV[0] eq '--version' || $ARGV[0] eq '-v') {
     print basename($0) . ": $0\n",
           "build: EXIM_RELEASE_VERSIONEXIM_VARIANT_VERSION\n",
           "perl(runtime): $]\n";
-          exit 0;
+    exit 0;
 }
 
 if (scalar(@ARGV) < 3)
index 28fff1c4d7433bf8731e42fd9abd629635594999..1597accc98e2cf318a2e23ee204e4a5e84d495f0 100644 (file)
@@ -25,12 +25,18 @@ my $id;
 
 my $b62 = '[0-9A-Za-z]';
 
-if (  !getopts('hud', \%opt)
+if (  !getopts('hudv', \%opt)
    || $opt{h}
-   || !$opt{u} && !$opt{d}
+   || !$opt{v} && !$opt{u} && !$opt{d}
    ) {
   &help; exit 1;
 }
+if ($opt{v}) {
+    print "exim_id_update:\n",
+          "build: EXIM_RELEASE_VERSIONEXIM_VARIANT_VERSION\n",
+          "perl(runtime): $]\n";
+    exit 0;
+}
 
 $spool = $ARGV[0] if ($ARGV[0]);
 $mode_upgrade = $opt{u};
@@ -42,11 +48,12 @@ in spool files.  Only the filenames is first-line ID tag values
 are affected; not message content such as Message-ID fields.
 Only -H, -D and -J files are handled.
 
-Syntax:  exim_id_update [-d | -u | -h] [spooldir]
+Syntax:  exim_id_update [-d | -u | -h | -v] [spooldir]
 
        -d      Downgrade mode
        -h      This help message
        -u      Upgrade mode
+       -v      Version
 
 Exactly one of -d or -u must be given.
 The spool directory defaults to the build-time value,
index 6293a7cc2e11dbf25eac5199f67adc35ffded392..77bd88050816957592786d303c106a574c09a152 100644 (file)
@@ -19,7 +19,7 @@
 
 # PROCESSED_FLAG
 #
-if test "x$1" = x--version
+if [ "x$1" = x--version -o "x$1" = x-v ]
 then
     echo "`basename $0`: $0"
     echo "build: EXIM_RELEASE_VERSIONEXIM_VARIANT_VERSION"
index 3b89e6bd7d4767146677ba26709c4882f8bd188d..b961df8e1781e4043c4998c81c4abba1b93ee28c 100644 (file)
@@ -557,7 +557,7 @@ use File::Basename;
 # use Time::Local;  # PH/FANF
 use POSIX;
 
-if (@ARGV and $ARGV[0] eq '--version') {
+if (@ARGV and ($ARGV[0] eq '--version' || $ARGV[0] eq '-v')) {
     print basename($0) . ": $0\n",
         "build: EXIM_RELEASE_VERSIONEXIM_VARIANT_VERSION\n",
         "perl(runtime): $]\n";
index 91380186747240b0c31d0bfa6a5e992970c68216..30e08a5e2d7cd40b6ef14fc6933f77494d2b6600 100644 (file)
@@ -25,7 +25,7 @@ config=
 eximmacdef=
 exim_path=
 
-if test "x$1" = x--version
+if [ "x$1" = x--version -o "x$1" = x-v ]
 then
     echo "`basename $0`: $0"
     echo "build: EXIM_RELEASE_VERSIONEXIM_VARIANT_VERSION"
index 61527ca642ade897f637400c5c0d1ebe8bd9f331..c3830f4a53f6debcae7b1504b5e394388b1bc97e 100644 (file)
@@ -90,7 +90,7 @@ GetOptions(
   'show-tests'  => \$G::show_tests, # display tests as applied to each message
   'man'         => sub { pod2usage(-verbose => 2, -exit => 0, -noperldoc => system('perldoc -V >/dev/null 2>&1')) },
   'help'        => sub { pod2usage(-verbose => 1, -exit => 0) },
-  'version'     => sub {
+  'v|version'     => sub {
         print "$p_name: $0\n",
             "build: EXIM_RELEASE_VERSIONEXIM_VARIANT_VERSION\n",
             "perl(runtime): $]\n";
index 74c29f7ef8cb83ba901f75e1762fa83691bce54a..6a0d40b516552cb4d1c4633036d6e239def36362 100644 (file)
@@ -50,7 +50,7 @@ if ($^O eq 'darwin') { # aka MacOS X
   $base = 62;
 };
 
-if ($ARGV[0] eq '--version') {
+if ($ARGV[0] eq '--version' || $ARGV[0] eq '-v') {
     print basename($0) . ": $0\n",
         "build: EXIM_RELEASE_VERSIONEXIM_VARIANT_VERSION\n",
         "perl(runtime): $]\n";
index afb74fdcd19c1710b27761a53e8bc8f8b1de726f..3918ab0b83ef77e2d7c45399846f652e406bb022 100644 (file)
@@ -50,7 +50,7 @@ use warnings;
 BEGIN { pop @INC if $INC[-1] eq '.' };
 use File::Basename;
 
-if (@ARGV && $ARGV[0] eq '--version') {
+if (@ARGV && ($ARGV[0] eq '--version' || ($ARGV[0] eq '-v'))) {
     print basename($0) . ": $0\n",
         "build: EXIM_RELEASE_VERSIONEXIM_VARIANT_VERSION\n",
         "perl(runtime): $]\n";
index a1f748edd570ed75df0955448adcfca2e001adc5..812f0b149e7dc0beda1ce04b780c15ff9b4dd8a6 100644 (file)
@@ -55,7 +55,7 @@ signal=EXIWHAT_KILL_SIGNAL
 # See if this installation is using the esoteric "USE_NODE" feature of Exim,
 # in which it uses the host's name as a suffix for the configuration file name.
 
-if test "x$1" = x--version
+if [ "x$1" = x--version -o "x$1" = x-v ]
 then
     echo "`basename $0`: $0"
     echo "build: EXIM_RELEASE_VERSIONEXIM_VARIANT_VERSION"
index db00d877f8154cb43cf2524bf461e17eae86704f..ba86d8f46b6d27b6266df067b8023d9963135a11 100644 (file)
@@ -15,7 +15,7 @@ use warnings;
 BEGIN { pop @INC if $INC[-1] eq '.' };
 use File::Basename;
 
-if ($ARGV[0] eq '--version') {
+if ($ARGV[0] eq '--version' || $ARGV[0] eq '-v') {
     print basename($0) . ": $0\n",
         "build: EXIM_RELEASE_VERSIONEXIM_VARIANT_VERSION\n",
         "perl(runtime): $]\n";