-%-compile: %-prepare
- @[ -f $(STAMP_DIR)/.$@ ] || $(MAKE) -C $(patsubst %-compile,%,$@) compile
- @touch $(STAMP_DIR)/.$@
+%-prepare: $(STAMP_DIR) $(TARGET_DIR)
+ @[ -f $(STAMP_DIR)/.$@ ] || { \
+ $(START_TRACE) "package/$(patsubst %-prepare,%,$@)/prepare: "; \
+ $(MAKE) -C $(patsubst %-prepare,%,$@) prepare && { \
+ touch $(STAMP_DIR)/.$@; \
+ $(CMD_TRACE) " done"; \
+ $(END_TRACE); \
+ } \
+ }
+
+%-compile:
+ @[ -f $(STAMP_DIR)/.$@ ] || { \
+ $(START_TRACE) "package/$(patsubst %-compile,%,$@)/compile: "; \
+ $(MAKE) -C $(patsubst %-compile,%,$@) compile && { \
+ touch $(STAMP_DIR)/.$(patsubst %-compile,%,$@)-prepare; \
+ touch $(STAMP_DIR)/.$@; \
+ $(CMD_TRACE) " done"; \
+ $(END_TRACE); \
+ } \
+ }