r1042 - in glibc-package/trunk/debian: . rules.d
Author: dan
Date: 2005-10-14 03:26:09 +0000 (Fri, 14 Oct 2005)
New Revision: 1042
Modified:
glibc-package/trunk/debian/changelog
glibc-package/trunk/debian/rules.d/build.mk
Log:
* Merge makefile patch from Goswin Brederlow
<brederlo@informatik.uni-tuebingen.de> to fail earlier if builds fail
(but omit the bit for make -k check) (Closes: #325460).
Modified: glibc-package/trunk/debian/changelog
===================================================================
--- glibc-package/trunk/debian/changelog 2005-10-14 03:05:28 UTC (rev 1041)
+++ glibc-package/trunk/debian/changelog 2005-10-14 03:26:09 UTC (rev 1042)
@@ -16,8 +16,11 @@
* Remove obsolete references to NPTL as an add-on.
* Conflict with broken versions of libterm-readline-gnu-perl
(Closes: #326856, #326492).
+ * Merge makefile patch from Goswin Brederlow
+ <brederlo@informatik.uni-tuebingen.de> to fail earlier if builds fail
+ (but omit the bit for make -k check) (Closes: #325460).
- -- Daniel Jacobowitz <dan@debian.org> Thu, 13 Oct 2005 23:04:37 -0400
+ -- Daniel Jacobowitz <dan@debian.org> Thu, 13 Oct 2005 23:24:46 -0400
glibc (2.3.5-6) unstable; urgency=low
Modified: glibc-package/trunk/debian/rules.d/build.mk
===================================================================
--- glibc-package/trunk/debian/rules.d/build.mk 2005-10-14 03:05:28 UTC (rev 1041)
+++ glibc-package/trunk/debian/rules.d/build.mk 2005-10-14 03:26:09 UTC (rev 1042)
@@ -3,6 +3,15 @@
# This little bit of magic makes it possible:
xx=$(if $($(curpass)_$(1)),$($(curpass)_$(1)),$($(1)))
+# We want to log output to a logfile but we also need to preserve the
+# return code of the command being run.
+# This little bit of magic makes it possible:
+# $(call logme, [-a] <log file>, <cmd>)
+define logme
+(exec 3>&1; exit `( ( ( $(2) ) 2>&1 3>&-; echo $$? >&4) | tee $(1) >&3) 4>&1`)
+endef
+
+
$(patsubst %,mkbuilddir_%,$(GLIBC_PASSES)) :: mkbuilddir_% : $(stamp)mkbuilddir_%
$(stamp)mkbuilddir_%: $(stamp)patch-stamp $(LINUX_HEADER_DIR)
@echo Making builddir for $(curpass)
@@ -42,21 +51,22 @@
echo "No. Forcing cross-compile by setting build to $$configure_build."; \
fi; \
fi; \
- cd $(DEB_BUILDDIR) && \
+ $(call logme, -a $(log_build), \
+ cd $(DEB_BUILDDIR) && \
CC="$(call xx,CC)" \
AUTOCONF=false \
$(CURDIR)/$(DEB_SRCDIR)/configure \
--host=$(call xx,configure_target) \
--build=$$configure_build --prefix=/usr --without-cvs \
--enable-add-ons="$(call xx,add-ons)" --without-selinux \
- $(call xx,with_headers) $(call xx,extra_config_options) 2>&1 | tee -a $(log_build)
+ $(call xx,with_headers) $(call xx,extra_config_options))
touch $@
$(patsubst %,build_%,$(GLIBC_PASSES)) :: build_% : $(stamp)build_%
$(stamp)build_%: $(stamp)configure_%
@echo Building $(curpass)
- $(MAKE) -C $(DEB_BUILDDIR) -j $(NJOBS) 2>&1 | tee -a $(log_build)
+ $(call logme, -a $(log_build), $(MAKE) -C $(DEB_BUILDDIR) -j $(NJOBS))
touch $@
$(patsubst %,check_%,$(GLIBC_PASSES)) :: check_% : $(stamp)check_%
Reply to: