/pidgin/main: 4613cb48e254: Make perl compilation quieter
Tomasz Wasilczyk
tomkiewicz at cpw.pidgin.im
Wed Apr 10 21:17:21 EDT 2013
Changeset: 4613cb48e2540f919604968083e42824053b2c6c
Author: Tomasz Wasilczyk <tomkiewicz at cpw.pidgin.im>
Date: 2013-04-11 03:17 +0200
Branch: default
URL: https://hg.pidgin.im/pidgin/main/rev/4613cb48e254
Description:
Make perl compilation quieter
diffstat:
libpurple/plugins/perl/Makefile.am | 4 ++--
libpurple/win32/tag.sh | 29 +++++++++++++++++++++++++----
libpurple/win32/global.mak | 2 +-
pidgin/plugins/perl/Makefile.am | 4 ++--
4 files changed, 30 insertions(+), 9 deletions(-)
diffs (102 lines):
diff --git a/libpurple/plugins/perl/Makefile.am b/libpurple/plugins/perl/Makefile.am
--- a/libpurple/plugins/perl/Makefile.am
+++ b/libpurple/plugins/perl/Makefile.am
@@ -110,8 +110,8 @@ all-local: common/Makefile
if [ ! -f Makefile ]; then \
$(perlpath) Makefile.PL; \
fi && \
- ($(MAKE) CC="$(CC)" CCFLAGS="$(PERL_CFLAGS) $(CFLAGS)" $(PERL_EXTRA_OPTS) || \
- $(MAKE) CC="$(CC)" CCFLAGS="$(PERL_CFLAGS) $(CFLAGS)" $(PERL_EXTRA_OPTS)) && \
+ ($(MAKE) CC="@../../../tag.sh CC $(CC)" PERLRUN="@../../../tag.sh PERL $(PERL)" CCFLAGS="$(PERL_CFLAGS) $(CFLAGS)" $(PERL_EXTRA_OPTS) || \
+ $(MAKE) CC="@../../../tag.sh CC $(CC)" PERLRUN="@../../../tag.sh PERL $(PERL)" CCFLAGS="$(PERL_CFLAGS) $(CFLAGS)" $(PERL_EXTRA_OPTS)) && \
cd ..; \
done
diff --git a/libpurple/win32/tag.sh b/libpurple/tag.sh
old mode 100644
new mode 100755
rename from libpurple/win32/tag.sh
rename to libpurple/tag.sh
--- a/libpurple/win32/tag.sh
+++ b/libpurple/tag.sh
@@ -1,12 +1,14 @@
#!/bin/bash
-# Script to silence win32 build by displaying a neat one-line notice instead of
-# full command contents when executing compilers.
+# Script to silence win32 and perl build by displaying a neat one-line notice
+# instead of full command contents when executing compilers.
#
# Written by Tomek Wasilczyk <tomkiewicz at cpw.pidgin.im>, licensed under GNU GPL
tag=$1
found=0
object=""
+c_file=""
+xs_file=""
for arg in "$@"
do
if [ "$found" == 1 ]; then
@@ -22,6 +24,14 @@ do
if [ "$tag" == "PERL" ] && [ "$arg" == "-e" ]; then
found=1
fi
+ ext_1=${arg#${arg%??}}
+ if [ "${ext_1}" == ".c" ]; then
+ c_file="$arg"
+ fi
+ ext_2=${arg#${arg%???}}
+ if [ "${ext_2}" == ".xs" ]; then
+ xs_file="$arg"
+ fi
done
if [ "$tag" == "auto" ]; then
@@ -29,9 +39,20 @@ if [ "$tag" == "auto" ]; then
fi
if [ "$tag" == "PERL" ]; then
- object=`echo "$object" | sed 's|.*output *=> *"\([^"]*\)".*|\1|'`
+ object=`echo "$object" | sed -n 's|.*output *=> *"\([^"]*\)".*|\1|p'`
fi
-echo -e " $tag\t$object"
+if [ "$object" == "" ] && [ "${c_file}" != "" ]; then
+ object="${c_file}"
+fi
+if [ "$object" == "" ] && [ "${xs_file}" != "" ]; then
+ object="${xs_file}"
+fi
+
shift 1
+if [ "$object" == "" ]; then
+ echo "$@" > /dev/stderr
+else
+ echo -e " $tag\t$object" > /dev/stderr
+fi
"$@"
diff --git a/libpurple/win32/global.mak b/libpurple/win32/global.mak
--- a/libpurple/win32/global.mak
+++ b/libpurple/win32/global.mak
@@ -65,7 +65,7 @@ GCCWARNINGS ?= -Waggregate-return -Wcast
CC_HARDENING_OPTIONS ?= -Wstack-protector -fwrapv -fno-strict-overflow -Wno-missing-field-initializers -Wformat-security -fstack-protector-all --param ssp-buffer-size=1
LD_HARDENING_OPTIONS ?= -Wl,--dynamicbase -Wl,--nxcompat
-TAG := @$(PURPLE_TOP)/win32/tag.sh
+TAG := @$(PURPLE_TOP)/tag.sh
# parse the version number from the configure.ac file if it is newer
#m4_define([purple_major_version], [2])
diff --git a/pidgin/plugins/perl/Makefile.am b/pidgin/plugins/perl/Makefile.am
--- a/pidgin/plugins/perl/Makefile.am
+++ b/pidgin/plugins/perl/Makefile.am
@@ -55,8 +55,8 @@ all-local: common/Makefile
if [ ! -f Makefile ]; then \
$(perlpath) Makefile.PL; \
fi && \
- ($(MAKE) CC="$(CC)" CCFLAGS="$(PERL_CFLAGS) $(CFLAGS)" $(PERL_EXTRA_OPTS) || \
- $(MAKE) CC="$(CC)" CCFLAGS="$(PERL_CFLAGS) $(CFLAGS)" $(PERL_EXTRA_OPTS)) && \
+ ($(MAKE) CC="@../../../../libpurple/tag.sh CC $(CC)" PERLRUN="@../../../../libpurple/tag.sh PERL $(PERL)" CCFLAGS="$(PERL_CFLAGS) $(CFLAGS)" $(PERL_EXTRA_OPTS) || \
+ $(MAKE) CC="@../../../../libpurple/tag.sh CC $(CC)" PERLRUN="@../../../../libpurple/tag.sh PERL $(PERL)" CCFLAGS="$(PERL_CFLAGS) $(CFLAGS)" $(PERL_EXTRA_OPTS)) && \
cd ..; \
done
More information about the Commits
mailing list