X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=mk%2Fpaths.mk;h=fa0c27ae503f92d4a2f14ea19966e55335ccd580;hb=3c709aa79b9a887bf845eaaa0f99a51bdadf04fe;hp=5b3c637c5829a923510bd8c8195f98e553f7bc81;hpb=ad38b443c9a4f4650cf7129881ab430077331077;p=ghc-hetmet.git diff --git a/mk/paths.mk b/mk/paths.mk index 5b3c637..fa0c27a 100644 --- a/mk/paths.mk +++ b/mk/paths.mk @@ -22,6 +22,7 @@ # INSTALL_LIBS (installed in $(libdir)) # INSTALL_LIBEXECS (installed in $(libexecdir)) # INSTALL_DATAS (installed in $(datadir)) +# INSTALL_IFACES (installed in $(ifacedir)) # # see target.mk for more information. # @@ -61,9 +62,6 @@ INSTALL_DIR = $(FPTOOLS_TOP)/glafp-utils/mkdirhier/mkdirhier # The install variables does not have any defaults, # what files to install have to be specified in the Makefiles. # -#INSTALL_PROGS += $(HS_PROG) $(C_PROG) -#INSTALL_LIBS += $(LIBRARY) -#INSTALL_DATAS += $(HS_IFACES) ################################################################################# # @@ -166,7 +164,10 @@ EXCLUDED_DERIVED_SRCS = $(patsubst %.hsc, %.hs, $(EXCLUDED_HSC_SRCS)) \ $(patsubst %.y, %.hs, $(EXCLUDED_HAPPY_Y_SRCS)) \ $(patsubst %.ly, %.hs, $(EXCLUDED_HAPPY_LY_SRCS)) \ $(patsubst %.hs, %.hc, $(EXCLUDED_HS_SRCS)) \ - $(patsubst %.lhs, %.hc, $(EXCLUDED_LHS_SRCS)) + $(patsubst %.lhs, %.hc, $(EXCLUDED_LHS_SRCS)) \ + $(patsubst %.hs, %_stub.c, $(EXCLUDED_HS_SRCS)) \ + $(patsubst %.lhs, %_stub.c, $(EXCLUDED_LHS_SRCS)) + # Exclude _hsc.c files; they get built as part of the cbits library, # not part of the main library @@ -181,7 +182,12 @@ HS_IFACES = $(addsuffix .$(way_)hi,$(basename $(HS_SRCS))) HSC_C_OBJS = $(addsuffix _hsc.$(way_)o,$(basename $(filter %.hsc,$(SRCS)))) -C_SRCS = $(filter %.c,$(SRCS)) +# Always remove $(EXCLUDED_C_SRCS) from C_SRCS +EXCLUDED_C_SRCS = $(patsubst %.lhs, %_stub.c, $(HS_SRCS)) \ + $(patsubst %.hs, %_stub.c, $(HS_SRCS)) + + +C_SRCS = $(filter-out $(EXCLUDED_C_SRCS),$(filter %.c,$(SRCS))) C_OBJS = $(addsuffix .$(way_)o,$(basename $(C_SRCS))) # SCRIPT_SRCS: list of raw script files (in literate form) @@ -191,6 +197,9 @@ SCRIPT_OBJS = $(addsuffix .prl,$(basename $(SCRIPT_SRCS))) OBJS = $(HS_OBJS) $(C_OBJS) $(SCRIPT_OBJS) +# The default is for $(LIBOBJS) to be the same as $(OBJS) +LIBOBJS = $(OBJS) + # # Note that as long as you use the standard variables for setting # which C & Haskell programs you want to work on, you don't have @@ -218,7 +227,7 @@ MKDEPENDC_SRCS=$(C_SRCS) # # make TAGS defaults # -# The default set of files for the dependency generators to work on +# The default set of files for the TAGS file generators to work on # is just their source equivalents. # TAGS_HS_SRCS=$(HS_SRCS) @@ -241,8 +250,13 @@ TAGS_C_SRCS=$(C_SRCS) # MOSTLY_CLEAN_FILES += $(HS_OBJS) $(C_OBJS) $(HSC_C_OBJS) CLEAN_FILES += $(HS_PROG) $(C_PROG) $(SCRIPT_PROG) $(SCRIPT_LINK) \ - $(PROG) $(LIBRARY) $(HS_IFACES) a.out \ - $(DERIVED_HSC_SRCS) + $(PROG) $(LIBRARY) a.out \ + $(DERIVED_HSC_SRCS) \ + $(patsubst %,%/*.$(way_)hi, . $(ALL_DIRS)) + +# we delete *all* the .hi files we can find, rather than just +# $(HS_IFACES), because stale interfaces left around by modules which +# don't exist any more can screw up the build. # Don't clean the .hc files if we're bootstrapping ifneq "$(BootingFromHc)" "YES"