fix for compiling the base package with --make
[ghc-hetmet.git] / ghc / compiler / Makefile
index 97cd2c6..0c877ce 100644 (file)
@@ -680,7 +680,11 @@ $(odir)/ghc-inplace : $(HS_PROG)
 ghc-inplace : stage1/ghc-inplace
        $(LN_S) -f $< $@
 
-CLEAN_FILES += $(odir)/ghc-inplace ghc-inplace
+ifeq "$(stage)" "1"
+CLEAN_FILES += ghc-inplace
+endif
+
+CLEAN_FILES += $(odir)/ghc-inplace
 
 #-----------------------------------------------------------------------------
 #              install
@@ -756,7 +760,7 @@ PKG_DEPENDS += base haskell98
 PACKAGE_CPP_OPTS += -DPKG_DEPENDS='$(PKG_DEPENDS)'
 
 # Omit Main from the library, the client will want to plug their own Main in
-LIBOBJS = $(filter-out $(odir)/main/Main.o, $(OBJS))
+LIBOBJS = $(filter-out $(odir)/main/Main.o $(odir)/parser/hschooks.o, $(OBJS))
 
 # disable splitting: it won't really help with GHC, and the specialised
 # build system for ghc/compiler isn't set up to handle it.