Commit 9ae8e545 authored by Ian Lynagh's avatar Ian Lynagh

Change how PACKAGES is constructed, so that everything gets cleaned properly

If Windows wasn't defined properly then the Win32 package wasn't being
cleaned, as it wasn't added to PACKAGES. Now we always add everything to
PACKAGES when CLEANING=YES.
parent 7be53d45
...@@ -282,46 +282,52 @@ include rules/bindist.mk ...@@ -282,46 +282,52 @@ include rules/bindist.mk
# ----------------------------------------------------------------------------- # -----------------------------------------------------------------------------
# Building libraries # Building libraries
# XXX generate from $(TOP)/packages define addPackage # args: $1 = package, $2 = condition
PACKAGES = \ ifneq "$2" ""
ghc-prim \ ifeq "$$(CLEANING)" "YES"
integer-gmp \ PACKAGES += $1
integer \ else
base \ ifeq $2
filepath \ PACKAGES += $1
array \ endif
bytestring \ endif
containers else
PACKAGES += $1
endif
endef
ifeq "$(Windows)" "YES" $(eval $(call addPackage,ghc-prim))
PACKAGES += Win32 $(eval $(call addPackage,integer-gmp))
else $(eval $(call addPackage,integer))
PACKAGES += unix $(eval $(call addPackage,base))
endif $(eval $(call addPackage,filepath))
$(eval $(call addPackage,array))
PACKAGES += \ $(eval $(call addPackage,bytestring))
old-locale \ $(eval $(call addPackage,containers))
old-time \
time \ $(eval $(call addPackage,Win32,($$(Windows),YES)))
directory \ $(eval $(call addPackage,unix,($$(Windows),NO)))
process \
random \ $(eval $(call addPackage,old-locale))
extensible-exceptions \ $(eval $(call addPackage,old-time))
haskell98 \ $(eval $(call addPackage,time))
hpc \ $(eval $(call addPackage,directory))
pretty \ $(eval $(call addPackage,process))
syb \ $(eval $(call addPackage,random))
template-haskell \ $(eval $(call addPackage,extensible-exceptions))
base3-compat \ $(eval $(call addPackage,haskell98))
Cabal \ $(eval $(call addPackage,hpc))
mtl \ $(eval $(call addPackage,pretty))
utf8-string $(eval $(call addPackage,syb))
$(eval $(call addPackage,template-haskell))
ifneq "$(Windows)" "YES" $(eval $(call addPackage,base3-compat))
PACKAGES += terminfo $(eval $(call addPackage,Cabal))
endif $(eval $(call addPackage,mtl))
$(eval $(call addPackage,utf8-string))
PACKAGES += haskeline
$(eval $(call addPackage,terminfo,($$(Windows),YES)))
$(eval $(call addPackage,haskeline))
ifneq "$(BootingFromHc)" "YES" ifneq "$(BootingFromHc)" "YES"
PACKAGES_STAGE2 += \ PACKAGES_STAGE2 += \
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment