diff options
author | Ian Lynagh <igloo@earth.li> | 2012-01-08 19:36:14 +0000 |
---|---|---|
committer | Ian Lynagh <igloo@earth.li> | 2012-01-08 23:11:06 +0000 |
commit | 9e452874df05f5f98243576ffaefc2f356358038 (patch) | |
tree | bad3b659234883643d088b48034a6bd99e2b851f | |
parent | 4c49eb512499255fe7de0e6cfc08ed138957d583 (diff) | |
download | haskell-9e452874df05f5f98243576ffaefc2f356358038.tar.gz |
Refactoring
This is working towards being able to put ghcautoconf.h and
ghcplatform.h in includes/dist
-rw-r--r-- | compiler/ghc.mk | 2 | ||||
-rw-r--r-- | ghc.mk | 6 | ||||
-rw-r--r-- | includes/ghc.mk | 8 | ||||
-rw-r--r-- | mk/tree.mk | 2 | ||||
-rw-r--r-- | rts/ghc.mk | 4 | ||||
-rw-r--r-- | rts/package.conf.in | 2 | ||||
-rw-r--r-- | rules/hs-suffix-rules-srcdir.mk | 4 | ||||
-rw-r--r-- | rules/manual-package-config.mk | 4 | ||||
-rw-r--r-- | utils/genapply/ghc.mk | 6 | ||||
-rw-r--r-- | utils/hp2ps/ghc.mk | 2 |
10 files changed, 20 insertions, 20 deletions
diff --git a/compiler/ghc.mk b/compiler/ghc.mk index a78255fecb..8790df361e 100644 --- a/compiler/ghc.mk +++ b/compiler/ghc.mk @@ -258,7 +258,7 @@ PRIMOP_BITS = compiler/primop-data-decl.hs-incl \ compiler/primop-strictness.hs-incl \ compiler/primop-primop-info.hs-incl -compiler_CPP_OPTS += -I$(GHC_INCLUDE_DIR) +compiler_CPP_OPTS += $(addprefix -I,$(GHC_INCLUDE_DIRS)) compiler_CPP_OPTS += ${GhcCppOpts} $(PRIMOPS_TXT) compiler/parser/Parser.y: %: %.pp compiler/stage1/$(PLATFORM_H) @@ -1111,7 +1111,7 @@ ifeq "$(BootingFromHc)" "YES" # flags explicitly to C compilations. SRC_CC_OPTS += -DNO_REGS -DUSE_MINIINTERPRETER SRC_CC_OPTS += -D__GLASGOW_HASKELL__=$(ProjectVersionInt) -SRC_CC_OPTS += -I$(GHC_INCLUDE_DIR) +SRC_CC_OPTS += $(addprefix -I,$(GHC_INCLUDE_DIRS)) endif # ----------------------------------------------------------------------------- @@ -1132,10 +1132,12 @@ CLEAN_FILES += libraries/bootstrapping.conf CLEAN_FILES += libraries/integer-gmp/cbits/GmpDerivedConstants.h CLEAN_FILES += libraries/integer-gmp/cbits/mkGmpDerivedConstants -# These two are no longer generated, but we still clean them for a while +# These four are no longer generated, but we still clean them for a while # as they may still be in old GHC trees: CLEAN_FILES += includes/GHCConstants.h CLEAN_FILES += includes/DerivedConstants.h +CLEAN_FILES += includes/ghcautoconf.h +CLEAN_FILES += includes/ghcplatform.h clean : clean_files clean_libraries diff --git a/includes/ghc.mk b/includes/ghc.mk index cef12dcabc..ef994f2329 100644 --- a/includes/ghc.mk +++ b/includes/ghc.mk @@ -41,9 +41,7 @@ ifeq "$(GhcEnableTablesNextToCode) $(GhcUnregisterised)" "YES NO" includes_CC_OPTS += -DTABLES_NEXT_TO_CODE endif -includes_CC_OPTS += -Iincludes -includes_CC_OPTS += -Iincludes/dist-derivedconstants/header -includes_CC_OPTS += -Iincludes/dist-ghcconstants/header +includes_CC_OPTS += $(addprefix -I,$(GHC_INCLUDE_DIRS)) includes_CC_OPTS += -Irts ifneq "$(GhcWithSMP)" "YES" @@ -65,7 +63,7 @@ $(includes_H_CONFIG) : else -$(includes_H_CONFIG) : mk/config.h mk/config.mk includes/ghc.mk +$(includes_H_CONFIG) : mk/config.h mk/config.mk includes/ghc.mk | $$(dir $$@)/. @echo "Creating $@..." @echo "#ifndef __GHCAUTOCONF_H__" >$@ @echo "#define __GHCAUTOCONF_H__" >>$@ @@ -76,7 +74,7 @@ $(includes_H_CONFIG) : mk/config.h mk/config.mk includes/ghc.mk endif -$(includes_H_PLATFORM) : includes/Makefile +$(includes_H_PLATFORM) : includes/Makefile | $$(dir $$@)/. $(call removeFiles,$@) @echo "Creating $@..." @echo "#ifndef __GHCPLATFORM_H__" >$@ diff --git a/mk/tree.mk b/mk/tree.mk index 564e55353c..8273d6766a 100644 --- a/mk/tree.mk +++ b/mk/tree.mk @@ -16,7 +16,7 @@ endif # indicates a directory relative to the top of the source tree. GHC_UTILS_DIR = utils -GHC_INCLUDE_DIR = includes +GHC_INCLUDE_DIRS = includes includes/dist includes/dist-derivedconstants/header includes/dist-ghcconstants/header GHC_COMPILER_DIR = compiler GHC_PROG_DIR = ghc GHC_RTS_DIR = rts diff --git a/rts/ghc.mk b/rts/ghc.mk index c5e0093723..fc634c7ff2 100644 --- a/rts/ghc.mk +++ b/rts/ghc.mk @@ -162,7 +162,7 @@ ifeq "$(TargetOS_CPP)" "solaris2" rts_$1_DTRACE_OBJS = rts/dist/build/RtsProbes.$$($1_osuf) rts/dist/build/RtsProbes.$$($1_osuf) : $$(rts_$1_OBJS) - $(DTRACE) -G -C -Iincludes -DDTRACE -s rts/RtsProbes.d -o \ + $(DTRACE) -G -C $$(addprefix -I,$$(GHC_INCLUDE_DIRS)) -DDTRACE -s rts/RtsProbes.d -o \ $$@ $$(rts_$1_OBJS) endif endif @@ -236,7 +236,7 @@ WARNING_OPTS += -Wredundant-decls # support for registerised builds on this arch. -- BL 2010/02/03 # WARNING_OPTS += -Wcast-align -STANDARD_OPTS += -Iincludes -Irts -Irts/dist/build +STANDARD_OPTS += $(addprefix -I,$(GHC_INCLUDE_DIRS)) -Irts -Irts/dist/build # COMPILING_RTS is only used when building Win32 DLL support. STANDARD_OPTS += -DCOMPILING_RTS diff --git a/rts/package.conf.in b/rts/package.conf.in index 6651e5e5ce..f2d1d8491d 100644 --- a/rts/package.conf.in +++ b/rts/package.conf.in @@ -51,7 +51,7 @@ extra-libraries: #ifdef INSTALLING include-dirs: INCLUDE_DIR PAPI_INCLUDE_DIR #else /* !INSTALLING */ -include-dirs: TOP"/rts/dist/build" TOP"/includes" TOP"/includes/dist-ghcconstants/header" TOP"/includes/dist-derivedconstants/header" +include-dirs: TOP"/rts/dist/build" TOP"/includes" TOP"/includes/dist" TOP"/includes/dist-ghcconstants/header" TOP"/includes/dist-derivedconstants/header" #endif includes: Stg.h diff --git a/rules/hs-suffix-rules-srcdir.mk b/rules/hs-suffix-rules-srcdir.mk index ce579c4d09..73d967a150 100644 --- a/rules/hs-suffix-rules-srcdir.mk +++ b/rules/hs-suffix-rules-srcdir.mk @@ -52,10 +52,10 @@ endif # .hs->.o rule, I don't know why --SDM $1/$2/build/%.$$($3_osuf) : $1/$4/%.hc includes/ghcautoconf.h includes/ghcplatform.h | $$$$(dir $$$$@)/. - "$$($1_$2_CC)" $$($1_$2_$3_ALL_CC_OPTS) -Iincludes -x c -c $$< -o $$@ + "$$($1_$2_CC)" $$($1_$2_$3_ALL_CC_OPTS) $$(addprefix -I,$$(GHC_INCLUDE_DIRS)) -x c -c $$< -o $$@ $1/$2/build/%.$$($3_osuf) : $1/$2/build/%.hc includes/ghcautoconf.h includes/ghcplatform.h - "$$($1_$2_CC)" $$($1_$2_$3_ALL_CC_OPTS) -Iincludes -x c -c $$< -o $$@ + "$$($1_$2_CC)" $$($1_$2_$3_ALL_CC_OPTS) $$(addprefix -I,$$(GHC_INCLUDE_DIRS)) -x c -c $$< -o $$@ # $1/$2/build/%.$$($3_osuf) : $1/$2/build/%.$$($3_way_)hc # "$$($1_$2_HC)" $$($1_$2_$3_ALL_HC_OPTS) -c $$< -o $$@ diff --git a/rules/manual-package-config.mk b/rules/manual-package-config.mk index 6f350dcac0..848fe1b4ce 100644 --- a/rules/manual-package-config.mk +++ b/rules/manual-package-config.mk @@ -19,7 +19,7 @@ $1/package.conf.inplace : $1/package.conf.in $(GHC_PKG_INPLACE) $$(CPP) $$(RAWCPP_FLAGS) -P \ -DTOP='"$$(TOP)"' \ $$($1_PACKAGE_CPP_OPTS) \ - -x c -I$$(GHC_INCLUDE_DIR) $$< -o $$@.raw + -x c $$(addprefix -I,$$(GHC_INCLUDE_DIRS)) $$< -o $$@.raw grep -v '^#pragma GCC' $$@.raw | \ sed -e 's/""//g' -e 's/:[ ]*,/: /g' > $$@ @@ -34,7 +34,7 @@ $1/package.conf.install: -DLIB_DIR='"$$(if $$(filter YES,$$(RelocatableBuild)),$$$$topdir,$$(ghclibdir))"' \ -DINCLUDE_DIR='"$$(if $$(filter YES,$$(RelocatableBuild)),$$$$topdir,$$(ghclibdir))/include"' \ $$($1_PACKAGE_CPP_OPTS) \ - -x c -I$$(GHC_INCLUDE_DIR) $1/package.conf.in -o $$@.raw + -x c $$(addprefix -I,$$(GHC_INCLUDE_DIRS)) $1/package.conf.in -o $$@.raw grep -v '^#pragma GCC' $$@.raw | \ sed -e 's/""//g' -e 's/:[ ]*,/: /g' >$$@ diff --git a/utils/genapply/ghc.mk b/utils/genapply/ghc.mk index cc0aede99e..4f78bc9600 100644 --- a/utils/genapply/ghc.mk +++ b/utils/genapply/ghc.mk @@ -19,8 +19,8 @@ ifeq "$(GhcUnregisterised)" "YES" utils/genapply_HC_OPTS += -DNO_REGS endif -utils/genapply/GenApply.hs : $(GHC_INCLUDE_DIR)/ghcconfig.h -utils/genapply/GenApply.hs : $(GHC_INCLUDE_DIR)/MachRegs.h -utils/genapply/GenApply.hs : $(GHC_INCLUDE_DIR)/Constants.h +utils/genapply/GenApply.hs : includes/ghcconfig.h +utils/genapply/GenApply.hs : includes/MachRegs.h +utils/genapply/GenApply.hs : includes/Constants.h $(eval $(call build-prog,utils/genapply,dist,0)) diff --git a/utils/hp2ps/ghc.mk b/utils/hp2ps/ghc.mk index d2d31470e6..30a9d05658 100644 --- a/utils/hp2ps/ghc.mk +++ b/utils/hp2ps/ghc.mk @@ -19,7 +19,7 @@ utils/hp2ps_dist_EXTRA_LIBRARIES = m utils/hp2ps_dist_PROG = hp2ps$(exeext) utils/hp2ps_dist_INSTALL = YES -utils/hp2ps_CC_OPTS += -Iincludes +utils/hp2ps_CC_OPTS += $(addprefix -I,$(GHC_INCLUDE_DIRS)) $(eval $(call build-prog,utils/hp2ps,dist,0)) |