[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gsrc-commit] /srv/bzr/gsrc/trunk r1344: catch build failures and exit g
From: |
Brandon Invergo |
Subject: |
[Gsrc-commit] /srv/bzr/gsrc/trunk r1344: catch build failures and exit gracefully with a message |
Date: |
Fri, 07 Dec 2012 22:34:45 +0100 |
User-agent: |
Bazaar (2.5.0) |
------------------------------------------------------------
revno: 1344
committer: Brandon Invergo <address@hidden>
branch nick: trunk
timestamp: Fri 2012-12-07 22:34:45 +0100
message:
catch build failures and exit gracefully with a message
modified:
ChangeLog
gar.lib.mk
=== modified file 'ChangeLog'
--- a/ChangeLog 2012-12-07 19:20:30 +0000
+++ b/ChangeLog 2012-12-07 21:34:45 +0000
@@ -1,5 +1,8 @@
2012-12-07 Brandon Invergo <address@hidden>
+ * gar.lib.mk (build-%/*): catch build failures and exit gracefully
+ with a message
+
* gar.mk (pkg-info): add pkg-info target to view basic package
metadata
=== modified file 'gar.lib.mk'
--- a/gar.lib.mk 2012-12-07 19:09:00 +0000
+++ b/gar.lib.mk 2012-12-07 21:34:45 +0000
@@ -511,52 +511,60 @@
BUILD_ARGS += $(BUILD_OPTS)
+BUILD_FAIL = (echo -e "[$(ERR)build$(OFF)] $(MSG)Build failed. Exiting.$(OFF)"
&& exit 1)
+
# build from a standard gnu-style makefile's default rule.
build-%/Makefile build-%/makefile build-%/GNUmakefile:
@echo -e "[$(OK)build$(OFF)] $(MSG)Running make in $(OFF)$*"
- @$(BUILD_ENV) $(MAKE) -C $* $(MAKE_ARGS) $(BUILD_ARGS) $(OUTPUT)
+ @$(BUILD_ENV) $(MAKE) -C $* $(MAKE_ARGS) $(BUILD_ARGS) $(OUTPUT) || \
+ $(BUILD_FAIL)
$(MAKECOOKIE)
build-%/Makefile-BSD:
@echo -e "[$(OK)build$(OFF)] $(MSG)Running make in $(OFF)$*"
- @cd $* && $(BUILD_ENV) pmake $(BUILD_ARGS) $(OUTPUT)
+ @cd $* && $(BUILD_ENV) pmake $(BUILD_ARGS) $(OUTPUT) || $(BUILD_FAIL)
$(MAKECOOKIE)
# build using Python distutils
build-%/setup.py:
@echo -e "[$(OK)build$(OFF)] $(MSG)Running setup.py build in $(OFF)$*"
- @cd $* && $(BUILD_ENV) python setup.py build $(PY_BUILD_ARGS) $(OUTPUT)
+ @cd $* && $(BUILD_ENV) python setup.py build $(PY_BUILD_ARGS) $(OUTPUT)
\
+ || $(BUILD_FAIL)
$(MAKECOOKIE)
# build using Ruby setup.rb
build-%/setup.rb:
@echo -e "[$(OK)build$(OFF)] $(MSG)Running setup.rb setup in $(OFF)$*"
- @cd $* && $(BUILD_ENV) ruby setup.rb setup $(RUBY_BUILD_ARGS) $(OUTPUT)
+ @cd $* && $(BUILD_ENV) ruby setup.rb setup $(RUBY_BUILD_ARGS) $(OUTPUT)
\
+ || $(BUILD_FAIL)
$(MAKECOOKIE)
# build using Ruby install.rb
build-%/install.rb:
@echo -e "[$(OK)build$(OFF)] $(MSG)Running install.rb setup in $(OFF)$*"
- @cd $* && $(BUILD_ENV) ruby install.rb setup $(RUBY_BUILD_ARGS)
$(OUTPUT)
+ @cd $* && $(BUILD_ENV) ruby install.rb setup $(RUBY_BUILD_ARGS)
$(OUTPUT) \
+ || $(BUILD_FAIL)
$(MAKECOOKIE)
# build using SCons (which pretends not to have a seperate configure step,
# having "sticky options" instead...)
build-%/SConstruct:
@echo -e "[$(OK)build$(OFF)] $(MSG)Running scons in $(OFF)$*"
- @cd $* && $(BUILD_ENV) scons $(SCONS_DEBUG) $(SCONS_ARGS) $(OUTPUT)
+ @cd $* && $(BUILD_ENV) scons $(SCONS_DEBUG) $(SCONS_ARGS) $(OUTPUT) \
+ || $(BUILD_FAIL)
$(MAKECOOKIE)
# build using Cabal
build-%/Setup.hs:
@echo -e "[$(OK)build$(OFF)] $(MSG)Running Setup build in $(OFF)$*"
- @cd $* && $(BUILD_ENV) ./Setup build $(CABAL_BUILD_ARGS) $(OUTPUT)
+ @cd $* && $(BUILD_ENV) ./Setup build $(CABAL_BUILD_ARGS) $(OUTPUT) \
+ || $(BUILD_FAIL)
$(MAKECOOKIE)
# build using waf
build-%/waf:
@echo -e "[$(OK)build$(OFF)] $(MSG)Running waf in $(OFF)$*"
- @cd $* && $(BUILD_ENV) ./waf $(WAF_BUILD_ARGS) $(OUTPUT)
+ @cd $* && $(BUILD_ENV) ./waf $(WAF_BUILD_ARGS) $(OUTPUT) ||
$(BUILD_FAIL)
$(MAKECOOKIE)
#################### TEST RULES ####################
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Gsrc-commit] /srv/bzr/gsrc/trunk r1344: catch build failures and exit gracefully with a message,
Brandon Invergo <=