New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[PATCH 2/11] make -s and TAGS #14582
Comments
From @rurbanThis is a bug report for perl from rurban@cpanel.net, make -s: silent means silent add TAGS target (etags, not ctags) Flags: Site configuration information for perl 5.21.9: Configured by rurban at Sun Feb 22 17:14:55 CET 2015. Summary of my perl5 (revision 5 version 21 subversion 9) configuration: Locally applied patches: @INC for perl 5.21.9: Environment for perl 5.21.9: |
From @rurban0001-make-s-silent-means-silent.patchFrom b3ac587375d63ccd86e36e74d970c212f37e7288 Mon Sep 17 00:00:00 2001
From: Reini Urban <rurban@cpanel.net>
Date: Mon, 9 Feb 2015 09:41:43 +0100
Subject: [PATCH 1/2] make -s: silent means silent
check MAKEFLAGS for -s|--silent|--quiet and honor it
---
make_ext.pl | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git make_ext.pl make_ext.pl
index 12926f8..ca6deca 100644
--- make_ext.pl
+++ make_ext.pl
@@ -656,7 +656,8 @@ sub just_pm_to_blib {
die "Inconsistent module $mname has both lib/ and $first/"
if $has_lib && $has_topdir;
- print "\nRunning pm_to_blib for $ext_dir directly\n";
+ print "\nRunning pm_to_blib for $ext_dir directly\n"
+ if !defined $ENV{MAKEFLAGS} or $ENV{MAKEFLAGS} !~ /\b(s|silent|quiet)\b/;
my %pm;
if ($has_top) {
--
2.1.4
|
From @rurban0002-Makefile-add-TAGS-target-etags-not-ctags.patchFrom c9349331eec6441fbb398c9ee4efb38f9e1cd2c6 Mon Sep 17 00:00:00 2001
From: Reini Urban <rurban@cpanel.net>
Date: Mon, 9 Feb 2015 10:08:45 +0100
Subject: [PATCH 2/2] Makefile: add TAGS target (etags, not ctags)
---
Makefile.SH | 3 +++
1 file changed, 3 insertions(+)
diff --git Makefile.SH Makefile.SH
index 12414a5..229f0e8 100755
--- Makefile.SH
+++ Makefile.SH
@@ -1589,6 +1589,9 @@ distcheck: FORCE
.PHONY: ctags
+TAGS: $(c1) $(c2) $(c3) $(c4) $(c5) $(h)
+ etags $(c1) $(c2) $(c3) $(c4) $(c5) $(h)
+
ctags:
ctags -f Tags -N --totals --languages=c --langmap=c:+.h --exclude=opmini.c --exclude=perlmini.c *.c *.h
--
2.1.4
|
From @bulk88On Sat Mar 14 03:47:47 2015, rurban@cpanel.net wrote:
+ if !defined $ENV{MAKEFLAGS} or $ENV{MAKEFLAGS} !~ /\b(s|silent|quiet)\b/; that statement looks too complicated if the point of the patch is to speed up the build by not printing to console. "!defined $ENV{MAKEFLAGS} or $ENV{MAKEFLAGS} !~ /\b(s|silent|quiet)\b/" should be cached to a my var ONCE on startup. Else atleast do a "\" ref on the hash slice to stop 2 magic hash lookups. -- |
The RT System itself - Status changed from 'new' to 'open' |
From @rurbanOn 03/14/2015 10:08 PM, bulk88 via RT wrote:
True, this looks better. |
From @rurban0001-Improve-make-s-silent-means-silent.patchFrom 4f610b515187c199bc19781b311aa140df7cac9f Mon Sep 17 00:00:00 2001
From: Reini Urban <rurban@cpanel.net>
Date: Sat, 14 Mar 2015 22:41:13 +0100
Subject: [PATCH] Improve make -s: silent means silent
---
ext/DynaLoader/dlutils.c | 7 ++++++-
make_ext.pl | 3 ++-
2 files changed, 8 insertions(+), 2 deletions(-)
diff --git ext/DynaLoader/dlutils.c ext/DynaLoader/dlutils.c
index 26c3698..bfcbc61 100644
--- ext/DynaLoader/dlutils.c
+++ ext/DynaLoader/dlutils.c
@@ -136,7 +136,12 @@ dl_generic_private_init(pTHX) /* called by dl_*.xs dl_private_init() */
#ifdef DL_UNLOAD_ALL_AT_EXIT
call_atexit(&dl_unload_all_files, (void*)0);
#endif
- dl_boot(aTHX);
+#ifdef DL_LOADONCEONLY
+ if (!dl_loaded_files)
+#else
+ if (!get_cv("DynaLoader::bootstrap", 0))
+#endif
+ dl_boot(aTHX);
}
diff --git make_ext.pl make_ext.pl
index ca6deca..73d4283 100644
--- make_ext.pl
+++ make_ext.pl
@@ -612,6 +612,7 @@ sub just_pm_to_blib {
my ($first) = $mname =~ /^([^:]+)/;
my $pm_to_blib = IS_VMS ? 'pm_to_blib.ts' : 'pm_to_blib';
+ my $silent = defined $ENV{MAKEFLAGS} and $ENV{MAKEFLAGS} =~ /\b(s|silent|quiet)\b/;
foreach my $leaf (<*>) {
if (-d $leaf) {
@@ -657,7 +658,7 @@ sub just_pm_to_blib {
if $has_lib && $has_topdir;
print "\nRunning pm_to_blib for $ext_dir directly\n"
- if !defined $ENV{MAKEFLAGS} or $ENV{MAKEFLAGS} !~ /\b(s|silent|quiet)\b/;
+ unless $silent;
my %pm;
if ($has_top) {
--
2.1.4
|
From @bulk88On Sat Mar 14 14:42:09 2015, rurban@cpanel.net wrote:
On 2nd thought, const sub/"use constant" like the IS_OSNAME stuff in make_ext.pl (which I added in the past) would be better than "my $silent". That way the bool check op is skipped and optimized away by the constant folder. The ENV var isn't expected to ever change during make_ext.pl's process run life. IIRC on unix make_ext.pl runs once per each module, but on Win32 make_ext.pl builds many modules in 1 run of make_ext.pl so the optimization is more for Win32 than Unix perl, it is still something I'd have to fix in the future if the my $silent version is commited,. -- |
From @tonycozOn Sat Mar 14 14:42:09 2015, rurban@cpanel.net wrote:
You included an unrelated change in that patch. Tony |
From @tonycozOn Sun Apr 12 18:36:31 2015, tonyc wrote:
That unrelated change doesn't apply to any recent version of perl that I can see. Ignoring that part, I've applied 0001-make-s-silent-means-silent.patch and 0001-Improve-make-s-silent-means-silent.patch squeezed together as b4c079c and 0002-Makefile-add-TAGS-target-etags-not-ctags.patch as e8d46ec. Tony |
@tonycoz - Status changed from 'open' to 'resolved' |
From @bulk88On Tue Oct 13 20:30:15 2015, tonyc wrote:
There seems to be something very wrong with commit "make -s: silent means silent" my $silent = defined $ENV{MAKEFLAGS} and $ENV{MAKEFLAGS} =~ /\b(s|silent|quiet)\b/; On my Win32 gmake build (but not dmake), $ENV{MAKEFLAGS} is -j --jobserver-fds=gmake_semaphore_5876 $ENV{MAKEFLAGS} = " -j --jobserver-fds=gmake_semaphore_5876"; prints 1. Also empty string $ENV{MAKEFLAGS} = ""; prints 1. Something is wrong with that regex. -- |
From Eirik-Berg.Hanssen@allverden.noOn Thu, Nov 12, 2015 at 7:04 AM, bulk88 via RT <perlbug-followup@perl.org>
<snip>
The regex looks fine. The problem looks like one of precedence (C<=> Eirik |
Migrated from rt.perl.org#124063 (status was 'resolved')
Searchable as RT124063$
The text was updated successfully, but these errors were encountered: