pidgin/android/libpurple

Parents 349178fe04d3
Children 0ab9ed685a54
win32: silence win32 build by displaying neat CC/CCLD/PERL tags instead of compilation command contents
--- a/libpurple/win32/global.mak Mon Apr 08 16:49:48 2013 +0200
+++ b/libpurple/win32/global.mak Mon Apr 08 16:57:03 2013 +0200
@@ -65,6 +65,7 @@
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
# parse the version number from the configure.ac file if it is newer
#m4_define([purple_major_version], [2])
@@ -106,6 +107,9 @@
ifeq "$(origin CC)" "default"
CC := gcc.exe
endif
+# comment out the next line to make output more verbose
+CC := $(TAG) "auto" $(CC)
+
GMSGFMT ?= $(WIN32_DEV_TOP)/gettext-0.18/bin/msgfmt
MAKENSIS ?= makensis.exe
PERL ?= perl
--- a/libpurple/win32/rules.mak Mon Apr 08 16:49:48 2013 +0200
+++ b/libpurple/win32/rules.mak Mon Apr 08 16:57:03 2013 +0200
@@ -4,7 +4,7 @@
$(CC) $(CFLAGS) $(DEFINES) $(INCLUDE_PATHS) -o $@ -c $<
%.c: %.xs
- $(PERL) -MExtUtils::ParseXS -e 'ExtUtils::ParseXS::process_file(filename => "$<", output => "$@", typemap => "$(PURPLE_PERL_TOP)/common/typemap");'
+ $(TAG) "PERL" $(PERL) -MExtUtils::ParseXS -e 'ExtUtils::ParseXS::process_file(filename => "$<", output => "$@", typemap => "$(PURPLE_PERL_TOP)/common/typemap");'
%.o: %.rc
$(WINDRES) -I$(PURPLE_TOP) -i $< -o $@
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/libpurple/win32/tag.sh Mon Apr 08 16:57:03 2013 +0200
@@ -0,0 +1,37 @@
+#!/bin/bash
+# Script to silence win32 build by displaying a neat one-line notice instead of
+# full command contents when executing compilers.
+#
+# Written by Tomek Wasilczyk <tomkiewicz@cpw.pidgin.im>, licensed under GNU GPL
+
+tag=$1
+found=0
+object=""
+for arg in "$@"
+do
+ if [ "$found" == 1 ]; then
+ object="$arg"
+ break
+ fi
+ if [ "$arg" == "-o" ]; then
+ found=1
+ fi
+ if [ "$tag" == "auto" ] && [ "$arg" == "-shared" ]; then
+ tag="CCLD"
+ fi
+ if [ "$tag" == "PERL" ] && [ "$arg" == "-e" ]; then
+ found=1
+ fi
+done
+
+if [ "$tag" == "auto" ]; then
+ tag="CC"
+fi
+
+if [ "$tag" == "PERL" ]; then
+ object=`echo "$object" | sed 's|.*output *=> *"\([^"]*\)".*|\1|'`
+fi
+
+echo -e " $tag\t$object"
+shift 1
+"$@"