summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorqrczak <unknown>2001-03-30 08:26:41 +0000
committerqrczak <unknown>2001-03-30 08:26:41 +0000
commit98f8adeebfe4229ca78d5569190ed6c211468d2b (patch)
treea97ac233f96e38af05efc46d0986c095789d93ed
parentf84efc9c5a13e16a2f4afd1d4c7da7c775425d9b (diff)
downloadhaskell-98f8adeebfe4229ca78d5569190ed6c211468d2b.tar.gz
[project @ 2001-03-30 08:26:40 by qrczak]
Move hsc making rules to a common place.
-rw-r--r--ghc/lib/std/Makefile9
-rw-r--r--mk/paths.mk14
2 files changed, 9 insertions, 14 deletions
diff --git a/ghc/lib/std/Makefile b/ghc/lib/std/Makefile
index ccb63f66da..31adf52a21 100644
--- a/ghc/lib/std/Makefile
+++ b/ghc/lib/std/Makefile
@@ -38,10 +38,6 @@ GHCI_LIBOBJS = $(filter-out PrelMain.$(way_)o,$(HS_OBJS))
BOOT_SRCS += PrelPrimopWrappers.hs
-HSC_SRCS = $(wildcard *.hsc)
-HSC_HS = $(patsubst %.hsc,%.hs, $(HSC_SRCS))
-HS_SRCS := $(HSC_HS) $(filter-out $(HSC_HS),$(HS_SRCS))
-
#-----------------------------------------------------------------------------
# Setting the GHC compile options
@@ -91,11 +87,6 @@ endif
CLEAN_FILES += PrelGHC.hi $(foreach way, $(WAYS), PrelGHC.$(way)_hi)
-CLEAN_FILES += \
- $(patsubst %.hsc, %.hs, $(HSC_SRCS)) \
- $(patsubst %.hsc, %_hsc.c, $(HSC_SRCS)) \
- $(patsubst %.hsc, %_hsc.h, $(HSC_SRCS))
-
#-----------------------------------------------------------------------------
# Installation; need to install .hi files as well as libraries
#
diff --git a/mk/paths.mk b/mk/paths.mk
index 0cb1e2d880..7c282a32e1 100644
--- a/mk/paths.mk
+++ b/mk/paths.mk
@@ -97,7 +97,9 @@ INSTALL_DIR = $(FPTOOLS_TOP)/glafp-utils/mkdirhier/mkdirhier
# (caveat: assuming no funny use of -hisuf and that
# file name and module name match)
-SRCS=$(wildcard *.lhs *.hs *.c *.prl *.lprl *.lit *.verb)
+HSC_SRCS = $(wildcard *.hsc)
+SRCS = $(wildcard *.lhs *.hs *.c *.prl *.lprl *.lit *.verb) \
+ $(patsubst %.hsc,%.hs,$(HSC_SRCS))
HS_SRCS=$(filter %.lhs %.hs %.hc,$(sort $(SRCS) $(BOOT_SRCS)))
HS_OBJS=$(addsuffix .$(way_)o,$(basename $(HS_SRCS)))
@@ -163,10 +165,12 @@ TAGS_C_SRCS=$(C_SRCS)
# that may require extra tools to create.
#
#
-MOSTLY_CLEAN_FILES += $(HS_OBJS) $(C_OBJS)
-CLEAN_FILES += $(HS_PROG) $(C_PROG) $(SCRIPT_PROG) $(SCRIPT_LINK) \
- $(PROG) $(LIBRARY) $(HS_IFACES) $(HS_SS) \
- a.out
+MOSTLY_CLEAN_FILES += $(HS_OBJS) $(C_OBJS)
+CLEAN_FILES += $(HS_PROG) $(C_PROG) $(SCRIPT_PROG) $(SCRIPT_LINK) \
+ $(PROG) $(LIBRARY) $(HS_IFACES) $(HS_SS) a.out \
+ $(patsubst %.hsc,%.hs,$(HSC_SRCS)) \
+ $(patsubst %.hsc,%_hsc.c,$(HSC_SRCS)) \
+ $(patsubst %.hsc,%_hsc.h,$(HSC_SRCS))
# Don't clean the .hc files if we're bootstrapping
ifneq "$(BootingFromHc)" "YES"