[project @ 2002-01-30 13:13:55 by simonmar]
authorsimonmar <unknown>
Wed, 30 Jan 2002 13:13:55 +0000 (13:13 +0000)
committersimonmar <unknown>
Wed, 30 Jan 2002 13:13:55 +0000 (13:13 +0000)
Oops, better not pre-compute PRE_SRCS in paths.mk, because ALL_DIRS is
not set yet.  Instead, defer it until we include target.mk.

mk/paths.mk
mk/target.mk

index 51a75f4..a48fc7b 100644 (file)
@@ -111,7 +111,7 @@ INSTALL_DIR     = $(FPTOOLS_TOP)/glafp-utils/mkdirhier/mkdirhier
 
 # NB. use := rather than = here, otherwise the wildcard will get re-computed
 # every time PRE_SRCS is expanded (this happens a lot).
-PRE_SRCS    := $(wildcard $(patsubst ./%, %,  \
+ALL_SRCS    = $(wildcard $(patsubst ./%, %,  \
                   $(patsubst %,%/*.hs,   . $(ALL_DIRS)) \
                   $(patsubst %,%/*.lhs,  . $(ALL_DIRS)) \
                   $(patsubst %,%/*.y,    . $(ALL_DIRS)) \
@@ -125,6 +125,8 @@ PRE_SRCS    := $(wildcard $(patsubst ./%, %,  \
                   $(patsubst %,%/*.hsc,  . $(ALL_DIRS)) \
               ))
 
+# ALL_SRCS is computed once and for all into PRE_SRCS at the top of target.mk.
+
 PRE_HS_SRCS  = $(filter %.hs,  $(PRE_SRCS))
 PRE_LHS_SRCS = $(filter %.lhs, $(PRE_SRCS))
 
index 59f00ef..26ee2c7 100644 (file)
 #
 
 ##################################################################
+# Pre-compute the list of sources so we don't have to do this 
+# multiple times.  See paths.mk.
+
+PRE_SRCS := $(ALL_SRCS)
+
+##################################################################
 #              FPtools standard targets
 #
 # depend: