remove suspicious whitespace-only lines
[ghc-hetmet.git] / rts / ghc.mk
index bffdaae..e71473d 100644 (file)
@@ -103,7 +103,7 @@ rts/dist/build/win32/libHS$1.def : rts/win32/libHS$1.def
                | sed "s/@LibVersion@/$$(libraries/$1_dist-install_VERSION)/" \
                | sed "s/@ProjectVersion@/$(ProjectVersion)/" \
                > rts/dist/build/win32/libHS$1.def
-               
+
 rts/dist/build/win32/libHS$1.dll.a : rts/dist/build/win32/libHS$1.def
        "$$(DLLTOOL)"   -d rts/dist/build/win32/libHS$1.def \
                        -l rts/dist/build/win32/libHS$1.dll.a
@@ -116,7 +116,7 @@ rts/dist/build/win32/libHSffi.def : rts/win32/libHSffi.def
        cat rts/win32/libHSffi.def \
                | sed "s/@ProjectVersion@/$(ProjectVersion)/" \
                > rts/dist/build/win32/libHSffi.def
-               
+
 rts/dist/build/win32/libHSffi.dll.a : rts/dist/build/win32/libHSffi.def
        "$(DLLTOOL)"    -d rts/dist/build/win32/libHSffi.def \
                        -l rts/dist/build/win32/libHSffi.dll.a
@@ -128,6 +128,8 @@ endif
 # Building one way
 define build-rts-way # args: $1 = way
 
+ifneq "$$(BINDIST)" "YES"
+
 # The per-way CC_OPTS
 ifneq "$$(findstring debug, $1)" ""
 rts_dist_$1_HC_OPTS =
@@ -160,12 +162,12 @@ rts_dist_$1_CC_OPTS += -DRtsWay=$$(DQ)rts_$1$$(DQ)
 
 # Making a shared library for the RTS.
 ifneq "$$(findstring dyn, $1)" ""
-ifeq "$(HOSTPLATFORM)" "i386-unknown-mingw32"
+ifeq "$$(HOSTPLATFORM)" "i386-unknown-mingw32"
 $$(rts_$1_LIB) : $$(rts_$1_OBJS) $$(ALL_RTS_DEF_LIBS) rts/libs.depend
        "$$(RM)" $$(RM_OPTS) $$@
        "$$(rts_dist_HC)" -shared -dynamic -dynload deploy \
          -no-auto-link-packages `cat rts/libs.depend` $$(rts_$1_OBJS) $$(ALL_RTS_DEF_LIBS) -o $$@
-ifeq "$(darwin_TARGET_OS)" "1"
+ifeq "$$(darwin_TARGET_OS)" "1"
        # Ensure library's install name is correct before anyone links with it.
        install_name_tool -id $(ghclibdir)/$$(rts_$1_LIB_NAME) $$@
 endif
@@ -181,6 +183,8 @@ $$(rts_$1_LIB) : $$(rts_$1_OBJS)
        echo $$(rts_$1_OBJS) | "$$(XARGS)" $$(XARGS_OPTS) "$$(AR)" $$(AR_OPTS) $$(EXTRA_AR_ARGS) $$@
 endif
 
+endif
+
 endef
 
 # And expand the above for each way:
@@ -367,6 +371,13 @@ rts_dist_C_SRCS  = $(rts_C_SRCS) $(rts_thr_EXTRA_C_SRCS)
 rts_dist_S_SRCS =  $(rts_S_SRCS)
 rts_dist_C_FILES = $(rts_C_SRCS) $(rts_thr_EXTRA_C_SRCS) $(rts_S_SRCS)
 
+# Hack: we define every way-related option here, so that we get (hopefully)
+# a superset of the dependencies.  To do this properly, we should generate
+# a different set of dependencies for each way.  Further hack: PROFILING an
+
+# TICKY_TICKY can't be used together, so we omit TICKY_TICKY for now.
+rts_dist_MKDEPENDC_OPTS += -DPROFILING -DTHREADED_RTS -DDEBUG
+
 ifeq "$(HaveDtrace)" "YES"
 
 rts_dist_MKDEPENDC_OPTS += -Irts/dist/build
@@ -410,8 +421,10 @@ endif
 # -----------------------------------------------------------------------------
 # build the static lib containing the C main symbol
 
+ifneq "$(BINDIST)" "YES"
 rts/dist/build/libHSrtsmain.a : rts/dist/build/Main.o
        "$(AR)" $(AR_OPTS) $(EXTRA_AR_ARGS) $@ $<
+endif
 
 # -----------------------------------------------------------------------------
 # The RTS package config
@@ -434,13 +447,7 @@ endif
 # -----------------------------------------------------------------------------
 # installing
 
-install : install_rts
-
-.PHONY: install_rts
-install_rts:
-       $(INSTALL_DIR) "$(DESTDIR)$(ghclibdir)"
-       $(INSTALL_DIR) "$(DESTDIR)$(ghclibdir)/include"
-       "$(CP)" $(ALL_RTS_LIBS) "$(DESTDIR)$(ghclibdir)"
+INSTALL_LIBS += $(ALL_RTS_LIBS)
 
 # -----------------------------------------------------------------------------
 # cleaning