Discussion:
[perl.git] branch blead, updated. v5.21.2-54-gecd78e2
(too old to reply)
Brian Fraser
2014-07-25 19:53:45 UTC
Permalink
In perl.git, the branch blead has been updated

<http://perl5.git.perl.org/perl.git/commitdiff/ecd78e215c9b4ab3f3ab71b30e76bbead372a84e?hp=a872f748481d44baa8bc0f6eb29659782c96ba7f>

- Log -----------------------------------------------------------------
commit ecd78e215c9b4ab3f3ab71b30e76bbead372a84e
Author: Brian Fraser <***@gmail.com>
Date: Fri Jul 25 19:46:41 2014 +0200

Configure: Handle hyphens when searching cpp symbols

This is really just for Android, which in Configure is
known as linux-android; the hyphen is passes as-is to
the preprocessor, which handles it as a minus.

So don't do that.
-----------------------------------------------------------------------

Summary of changes:
Configure | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/Configure b/Configure
index 8d802fd..c86e42f 100755
--- a/Configure
+++ b/Configure
@@ -22066,11 +22066,13 @@ EOSH
cat <<EOSH >>Cppsym.know
$osname
EOSH
+./tr '-' '_' < Cppsym.know > Cppsym.know.tmp
+$cat Cppsym.know.tmp > Cppsym.know
./tr '[a-z]' '[A-Z]' < Cppsym.know > Cppsym.a
./tr '[A-Z]' '[a-z]' < Cppsym.know > Cppsym.b
$cat Cppsym.know > Cppsym.c
$cat Cppsym.a Cppsym.b Cppsym.c | $tr ' ' $trnl | $sort | $uniq > Cppsym.know
-$rm -f Cppsym.a Cppsym.b Cppsym.c
+$rm -f Cppsym.a Cppsym.b Cppsym.c Cppsym.know.tmp
cat <<EOSH > Cppsym
$startsh
if $test \$# -gt 0; then

--
Perl5 Master Repository
H.Merijn Brand
2014-07-26 15:32:17 UTC
Permalink
Post by Brian Fraser
In perl.git, the branch blead has been updated
<http://perl5.git.perl.org/perl.git/commitdiff/ecd78e215c9b4ab3f3ab71b30e76bbead372a84e?hp=a872f748481d44baa8bc0f6eb29659782c96ba7f>
- Log -----------------------------------------------------------------
commit ecd78e215c9b4ab3f3ab71b30e76bbead372a84e
Date: Fri Jul 25 19:46:41 2014 +0200
Configure: Handle hyphens when searching cpp symbols
This is really just for Android, which in Configure is
known as linux-android; the hyphen is passes as-is to
the preprocessor, which handles it as a minus.
So don't do that.
-----------------------------------------------------------------------
Configure | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
I find this patch overly complicated and would suggest to replace it
with this:

# Maybe put other stuff here too.
./tr '-' '_' <<EOSH >>Cppsym.know
$osname
EOSH
./tr '[a-z]' '[A-Z]' < Cppsym.know > Cppsym.a
./tr '[A-Z]' '[a-z]' < Cppsym.know > Cppsym.b
$cat Cppsym.know > Cppsym.c
$cat Cppsym.a Cppsym.b Cppsym.c | $tr ' ' $trnl | $sort | $uniq > Cppsym.know
$rm -f Cppsym.a Cppsym.b Cppsym.c

Doing it like this is not only shorter and simpler, but also makes it
way more obvious that this tr is *ONLY* for the $osname, as all symbols
stated just above do not have a dash. The comment just above the large
list could state this explicitely

If you agree, I'll commit that to meta and regen
Post by Brian Fraser
diff --git a/Configure b/Configure
index 8d802fd..c86e42f 100755
--- a/Configure
+++ b/Configure
@@ -22066,11 +22066,13 @@ EOSH
cat <<EOSH >>Cppsym.know
$osname
EOSH
+./tr '-' '_' < Cppsym.know > Cppsym.know.tmp
+$cat Cppsym.know.tmp > Cppsym.know
./tr '[a-z]' '[A-Z]' < Cppsym.know > Cppsym.a
./tr '[A-Z]' '[a-z]' < Cppsym.know > Cppsym.b
$cat Cppsym.know > Cppsym.c
$cat Cppsym.a Cppsym.b Cppsym.c | $tr ' ' $trnl | $sort | $uniq > Cppsym.know
-$rm -f Cppsym.a Cppsym.b Cppsym.c
+$rm -f Cppsym.a Cppsym.b Cppsym.c Cppsym.know.tmp
cat <<EOSH > Cppsym
$startsh
if $test \$# -gt 0; then
--
H.Merijn Brand http://tux.nl Perl Monger http://amsterdam.pm.org/
using perl5.00307 .. 5.19 porting perl5 on HP-UX, AIX, and openSUSE
http://mirrors.develooper.com/hpux/ http://www.test-smoke.org/
http://qa.perl.org http://www.goldmark.org/jeff/stupid-disclaimers/
H.Merijn Brand
2014-07-26 15:54:49 UTC
Permalink
On Sat, 26 Jul 2014 17:32:17 +0200, "H.Merijn Brand"
Post by H.Merijn Brand
I find this patch overly complicated and would suggest to replace it
# Maybe put other stuff here too.
./tr '-' '_' <<EOSH >>Cppsym.know
$osname
EOSH
./tr '[a-z]' '[A-Z]' < Cppsym.know > Cppsym.a
./tr '[A-Z]' '[a-z]' < Cppsym.know > Cppsym.b
$cat Cppsym.know > Cppsym.c
$cat Cppsym.a Cppsym.b Cppsym.c | $tr ' ' $trnl | $sort | $uniq > Cppsym.know
$rm -f Cppsym.a Cppsym.b Cppsym.c
Doing it like this is not only shorter and simpler, but also makes it
way more obvious that this tr is *ONLY* for the $osname, as all symbols
stated just above do not have a dash. The comment just above the large
list could state this explicitely
If you agree, I'll commit that to meta and regen
Post by Brian Fraser
diff --git a/Configure b/Configure
index 8d802fd..c86e42f 100755
--- a/Configure
+++ b/Configure
@@ -22066,11 +22066,13 @@ EOSH
cat <<EOSH >>Cppsym.know
$osname
EOSH
+./tr '-' '_' < Cppsym.know > Cppsym.know.tmp
+$cat Cppsym.know.tmp > Cppsym.know
./tr '[a-z]' '[A-Z]' < Cppsym.know > Cppsym.a
./tr '[A-Z]' '[a-z]' < Cppsym.know > Cppsym.b
$cat Cppsym.know > Cppsym.c
$cat Cppsym.a Cppsym.b Cppsym.c | $tr ' ' $trnl | $sort | $uniq > Cppsym.know
-$rm -f Cppsym.a Cppsym.b Cppsym.c
+$rm -f Cppsym.a Cppsym.b Cppsym.c Cppsym.know.tmp
cat <<EOSH > Cppsym
$startsh
if $test \$# -gt 0; then
The meta-change I suggest to commit is:
--8<---
diff --git a/U/modified/Cppsym.U b/U/modified/Cppsym.U
index ce0de1e..fb09952 100644
--- a/U/modified/Cppsym.U
+++ b/U/modified/Cppsym.U
@@ -148,7 +148,10 @@ XPG2_EXTENDED XPG3 XPG3_EXTENDED XPG4 XPG4_EXTENDED
z8000 zarch
EOSH
# Maybe put other stuff here too.
-cat <<EOSH >>Cppsym.know
+?X:Some OS's will have a dash in their $osname
+?X:e.g. Android is known as linux-android
+?X:The preprocessor will interpret the dash as a minus
+./tr '-' '_' <<EOSH >>Cppsym.know
$osname
EOSH
./tr '[a-z]' '[A-Z]' < Cppsym.know > Cppsym.a
-->8---
--
H.Merijn Brand http://tux.nl Perl Monger http://amsterdam.pm.org/
using perl5.00307 .. 5.19 porting perl5 on HP-UX, AIX, and openSUSE
http://mirrors.develooper.com/hpux/ http://www.test-smoke.org/
http://qa.perl.org http://www.goldmark.org/jeff/stupid-disclaimers/
Brian Fraser
2014-07-26 18:50:00 UTC
Permalink
Post by H.Merijn Brand
Post by Brian Fraser
In perl.git, the branch blead has been updated
<http://perl5.git.perl.org/perl.git/commitdiff/ecd78e215c9b4ab3f3ab71b30e76bbead372a84e?hp=a872f748481d44baa8bc0f6eb29659782c96ba7f>
- Log -----------------------------------------------------------------
commit ecd78e215c9b4ab3f3ab71b30e76bbead372a84e
Date: Fri Jul 25 19:46:41 2014 +0200
Configure: Handle hyphens when searching cpp symbols
This is really just for Android, which in Configure is
known as linux-android; the hyphen is passes as-is to
the preprocessor, which handles it as a minus.
So don't do that.
-----------------------------------------------------------------------
Configure | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
I find this patch overly complicated and would suggest to replace it
# Maybe put other stuff here too.
./tr '-' '_' <<EOSH >>Cppsym.know
$osname
EOSH
./tr '[a-z]' '[A-Z]' < Cppsym.know > Cppsym.a
./tr '[A-Z]' '[a-z]' < Cppsym.know > Cppsym.b
$cat Cppsym.know > Cppsym.c
$cat Cppsym.a Cppsym.b Cppsym.c | $tr ' ' $trnl | $sort | $uniq > Cppsym.know
$rm -f Cppsym.a Cppsym.b Cppsym.c
Doing it like this is not only shorter and simpler, but also makes it
way more obvious that this tr is *ONLY* for the $osname, as all symbols
stated just above do not have a dash. The comment just above the large
list could state this explicitely
If you agree, I'll commit that to meta and regen
Post by Brian Fraser
diff --git a/Configure b/Configure
index 8d802fd..c86e42f 100755
--- a/Configure
+++ b/Configure
@@ -22066,11 +22066,13 @@ EOSH
cat <<EOSH >>Cppsym.know
$osname
EOSH
+./tr '-' '_' < Cppsym.know > Cppsym.know.tmp
+$cat Cppsym.know.tmp > Cppsym.know
./tr '[a-z]' '[A-Z]' < Cppsym.know > Cppsym.a
./tr '[A-Z]' '[a-z]' < Cppsym.know > Cppsym.b
$cat Cppsym.know > Cppsym.c
$cat Cppsym.a Cppsym.b Cppsym.c | $tr ' ' $trnl | $sort | $uniq > Cppsym.know
-$rm -f Cppsym.a Cppsym.b Cppsym.c
+$rm -f Cppsym.a Cppsym.b Cppsym.c Cppsym.know.tmp
cat <<EOSH > Cppsym
$startsh
if $test \$# -gt 0; then
--
H.Merijn Brand http://tux.nl Perl Monger http://amsterdam.pm.org/
using perl5.00307 .. 5.19 porting perl5 on HP-UX, AIX, and openSUSE
http://mirrors.develooper.com/hpux/ http://www.test-smoke.org/
http://qa.perl.org http://www.goldmark.org/jeff/stupid-disclaimers/
Sure, please go ahead.

Loading...