Subject: | 0.21 no make under windows |
Date: | Fri, 19 Jan 2018 08:47:54 +0100 |
To: | bug-Crypt-SMIME [...] rt.cpan.org |
From: | "Thomas Eckardt" <thomas.eckardt [...] thockar.com> |
Subject: | 0.21 no make under windows |
The Makefile.pl in 0.21 contains nix 'only' commands. This requires MSYS
or linux utils under windows.
depend => {
'lib/SMIME.pm'
=> "SMIME.pl SMIME.pod const-autoload.inc\n" .
"\tmkdir -p lib\n" .
"\techo \"# This file is automatically generated from
SMIME.pl\" > \$\@\n" .
"\techo \"# All of your changes will be lost if you edit this
directly.\" >> \$\@\n" .
"\tcat SMIME.pl >> \$\@\n" .
"\tcat const-autoload.inc >> \$\@\n" .
"\techo >> \$\@\n" .
"\techo __END__ >> \$\@\n" .
"\techo >> \$\@\n" .
"\tcat SMIME.pod >> \$\@\n",
'SMIME.pod'
=> "SMIME.mlpod\n" .
"\tmlpod2pod \$< > \$\@",
'lib/SMIME/JA.pod'
=> "SMIME.mlpod\n" .
"\tmkdir -p lib/SMIME\n" .
"\tmlpod2pod --langs=ja \$< | perl -pe
's/(\\xe5\\x90\\x8d\\xe5\\x89\\x8d)/NAME/' > \$\@",
},
to make it on windows, commands have to be changed to
depend => {
'lib/SMIME.pm'
=> "SMIME.pl SMIME.pod const-autoload.inc\n" .
# "\tmkdir lib\n" .
"\techo \"# This file is automatically generated from
SMIME.pl\" > \$\@\n" .
"\techo \"# All of your changes will be lost if you edit this
directly.\" >> \$\@\n" .
"\ttype SMIME.pl >> \$\@\n" .
"\ttype const-autoload.inc >> \$\@\n" .
"\techo >> \$\@\n" .
"\techo __END__ >> \$\@\n" .
"\techo >> \$\@\n" .
"\ttype SMIME.pod >> \$\@\n",
'SMIME.pod'
=> "SMIME.mlpod\n" .
"\tmlpod2pod \$< > \$\@",
'lib/SMIME/JA.pod'
=> "SMIME.mlpod\n" .
# "\tmkdir lib/SMIME\n" .
"\tmlpod2pod --langs=ja \$< | perl -pe
's/(\\xe5\\x90\\x8d\\xe5\\x89\\x8d)/NAME/' > \$\@",
},
mkdir is not required, because the folders already exists - how ever,
there is no '-p' switch under windows and mkdir fails if the folder
already exists
( -d 'lib' ? '' : "\tmkdir lib\n") .
and
( -d 'lib/SMIME' ? '' : "\tmkdir lib/SMIME\n") .
will work on every OS
doing something like:
my $cat = $^O eq 'MSWin32' ? 'type' : 'cat';
...
"\t$cat SMIME.pl >> \$\@\n" .
...
would solve the problem for 'cat'
The complete section may look like:
...
my $USE_PROXYSUBS = $^V gt v5.14.0;
my $cat = $^O eq 'MSWin32' ? 'type' : 'cat';
...
...
depend => {
'lib/SMIME.pm'
=> "SMIME.pl SMIME.pod const-autoload.inc\n" .
( -d 'lib' ? '' : "\tmkdir lib\n") .
"\techo \"# This file is automatically generated from
SMIME.pl\" > \$\@\n" .
"\techo \"# All of your changes will be lost if you edit this
directly.\" >> \$\@\n" .
"\t$cat SMIME.pl >> \$\@\n" .
"\t$cat const-autoload.inc >> \$\@\n" .
"\techo >> \$\@\n" .
"\techo __END__ >> \$\@\n" .
"\techo >> \$\@\n" .
"\t$cat SMIME.pod >> \$\@\n",
'SMIME.pod'
=> "SMIME.mlpod\n" .
"\tmlpod2pod \$< > \$\@",
'lib/SMIME/JA.pod'
=> "SMIME.mlpod\n" .
( -d 'lib/SMIME' ? '' : "\tmkdir lib/SMIME\n") .
"\tmlpod2pod --langs=ja \$< | perl -pe
's/(\\xe5\\x90\\x8d\\xe5\\x89\\x8d)/NAME/' > \$\@",
},
...
Thomas
DISCLAIMER:
*******************************************************
This email and any files transmitted with it may be confidential, legally
privileged and protected in law and are intended solely for the use of the
individual to whom it is addressed.
This email was multiple times scanned for viruses. There should be no
known virus in this email!
*******************************************************
Message body is not shown because it is too large.
Message body not shown because it is not plain text.