From a68ffce3fa1871c21ed51b0414404c365df3aabf Mon Sep 17 00:00:00 2001 From: Ian Lynagh Date: Sun, 21 Nov 2010 17:49:16 +0000 Subject: [PATCH] Fix a makefile include ordering sanity check --- rules/build-prog.mk | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/rules/build-prog.mk b/rules/build-prog.mk index 3fbed21..4121ca3 100644 --- a/rules/build-prog.mk +++ b/rules/build-prog.mk @@ -139,13 +139,17 @@ endif # need to depend on the libraries too. NB. since $(ALL_STAGE1_LIBS) and # $(ALL_RTS_LIBS) are not defined until after libraries/*/ghc.mk have # been included, this introduces an ordering dependency. +ifneq "$$(CLEANING)" "YES" ifneq "$3" "0" -ifeq "$$(ALL_STAGE1_LIBS)" "" -$$(error ordering failure in $1: $$(ALL_STAGE1_LIBS) is empty) +ifneq "$$($1_$2_HS_SRCS)" "" +ifeq "$$(strip $$(ALL_STAGE1_LIBS))" "" +$$(error ordering failure in $1 ($2): ALL_STAGE1_LIBS is empty) +endif endif $1/$2/build/tmp/$$($1_$2_PROG) : $$(ALL_STAGE1_LIBS) $$(ALL_RTS_LIBS) $$(OTHER_LIBS) endif endif +endif ifeq "$$($1_$2_INSTALL_INPLACE)" "NO" $(call all-target,$1_$2,$1/$2/build/tmp/$$($1_$2_PROG)) -- 1.7.10.4