diff options
author | nbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73> | 2005-10-22 21:54:11 +0000 |
---|---|---|
committer | nbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73> | 2005-10-22 21:54:11 +0000 |
commit | 036a55d69a3e520d829be2e4324bed98e472a963 (patch) | |
tree | e7970a943db940663ca226c91bfa20e0361ab3da /package/Makefile | |
parent | 716a9c3eb18dd79f297a3da804e209961575777d (diff) |
proper error handling in package/Makefile
git-svn-id: svn://svn.openwrt.org/openwrt/trunk/openwrt@2264 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/Makefile')
-rw-r--r-- | package/Makefile | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/package/Makefile b/package/Makefile index 9053acb377..1bdbbbfd85 100644 --- a/package/Makefile +++ b/package/Makefile @@ -443,21 +443,25 @@ $(TARGET_DIR): %-prepare: $(STAMP_DIR) $(TARGET_DIR) @[ -f $(STAMP_DIR)/.$@ ] || { \ $(START_TRACE) "package/$(patsubst %-prepare,%,$@)/prepare: "; \ - $(MAKE) -C $(patsubst %-prepare,%,$@) prepare; \ - $(CMD_TRACE) " done"; \ - $(END_TRACE); \ + $(MAKE) -C $(patsubst %-prepare,%,$@) prepare && { \ + touch $(STAMP_DIR)/.$@; \ + } || { \ + $(CMD_TRACE) " done"; \ + $(END_TRACE); \ + } \ } - @touch $(STAMP_DIR)/.$@ %-compile: @[ -f $(STAMP_DIR)/.$@ ] || { \ $(START_TRACE) "package/$(patsubst %-compile,%,$@)/compile: "; \ - $(MAKE) -C $(patsubst %-compile,%,$@) compile; \ - $(CMD_TRACE) " done"; \ - $(END_TRACE); \ + $(MAKE) -C $(patsubst %-compile,%,$@) compile && { \ + touch $(STAMP_DIR)/.$(patsubst %-compile,%,$@)-prepare; \ + touch $(STAMP_DIR)/.$@; \ + } || { \ + $(CMD_TRACE) " done"; \ + $(END_TRACE); \ + } \ } - @touch $(STAMP_DIR)/.$(patsubst %-compile,%,$@)-prepare - @touch $(STAMP_DIR)/.$@ %-install: %-compile @$(START_TRACE) "package/$(patsubst %-install,%,$@)/install: " |