ALL_DIRS += posix
endif
+EXCLUDED_SRCS :=
EXCLUDED_SRCS += rts/Main.c
EXCLUDED_SRCS += rts/parallel/SysMan.c
EXCLUDED_SRCS += $(wildcard rts/Vis*.c)
-rts_C_SRCS = $(filter-out $(EXCLUDED_SRCS),$(wildcard rts/*.c $(foreach dir,$(ALL_DIRS),rts/$(dir)/*.c)))
-rts_CMM_SRCS = $(wildcard rts/*.cmm)
+rts_C_SRCS := $(filter-out $(EXCLUDED_SRCS),$(wildcard rts/*.c $(foreach dir,$(ALL_DIRS),rts/$(dir)/*.c)))
+rts_CMM_SRCS := $(wildcard rts/*.cmm)
# Don't compile .S files when bootstrapping a new arch
ifneq "$(PORTING_HOST)" "YES"
rts/dist/build/sm/Scav_thr.c : rts/sm/Scav.c | $$(dir $$@)/.
cp $< $@
-rts_H_FILES = $(wildcard includes/*.h) $(wildcard rts/*.h)
+rts_H_FILES := $(wildcard rts/*.h)
-ifeq "$(HaveDtrace)" "YES"
+ifeq "$(USE_DTRACE)" "YES"
DTRACEPROBES_H = rts/dist/build/RtsProbes.h
rts_H_FILES += $(DTRACEPROBES_H)
endif
$(call distdir-way-opts,rts,dist,$1)
$(call c-suffix-rules,rts,dist,$1,YES)
$(call cmm-suffix-rules,rts,dist,$1)
-$(call hs-suffix-rules-srcdir,rts,dist,$1,$$(dir))
+$(call hs-suffix-rules-srcdir,rts,dist,$1,.)
# hs-suffix-rules-srcdir is needed when BootingFromHc to get the .hc rules
rts_$1_LIB_NAME = libHSrts$$($1_libsuf)
# 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"
+ifeq "$(USE_DTRACE)" "YES"
rts_dist_MKDEPENDC_OPTS += -Irts/dist/build
# -----------------------------------------------------------------------------
# compile dtrace probes if dtrace is supported
-ifeq "$(HaveDtrace)" "YES"
+ifeq "$(USE_DTRACE)" "YES"
rts_CC_OPTS += -DDTRACE
rts_HC_OPTS += -DDTRACE
+# Apple's dtrace (the only one supported by ghc at the moment) uses
+# gcc as its preprocessor. If gcc isn't at /usr/bin/gcc, or we need
+# to force it to use a different gcc, we need to give the path in
+# the option cpppath.
+
DTRACEPROBES_SRC = rts/RtsProbes.d
$(DTRACEPROBES_H): $(DTRACEPROBES_SRC) includes/ghcplatform.h | $(dir $@)/.
- "$(DTRACE)" $(filter -I%,$(rts_CC_OPTS)) -C -h -o $@ -s $<
+ "$(DTRACE)" $(filter -I%,$(rts_CC_OPTS)) -C -x cpppath=$(WhatGccIsCalled) -h -o $@ -s $<
endif