Tweak the HC_OPTS generation
authorIan Lynagh <igloo@earth.li>
Tue, 24 Jul 2012 14:46:55 +0000 (15:46 +0100)
committerIan Lynagh <igloo@earth.li>
Tue, 24 Jul 2012 14:46:55 +0000 (15:46 +0100)
libraries/base/GHC/Base_HC_OPTS wasn't getting included, because we
were using libraries/base/./GHC/Base.lhs as the path, and the ./
meant we got the wrong filename.

I didn't use $(realpath ...) as the .hs file may be generated by hsc2hs
or similar, so may not exist when the HC_OPTS are constructed.

rules/distdir-way-opts.mk

index bbd37d1..ed2a4d0 100644 (file)
@@ -105,7 +105,7 @@ $1_$2_$3_MOST_HC_OPTS = \
  $$($1_$2_MORE_HC_OPTS) \
  $$($1_$2_EXTRA_HC_OPTS) \
  $$($1_$2_$3_HC_OPTS) \
- $$($$(basename $$<)_HC_OPTS) \
+ $$($$(basename $$(subst ./,,$$<))_HC_OPTS) \
  $$(SRC_HC_WARNING_OPTS) \
  $$(EXTRA_HC_OPTS)