diff options
author | Ian Lynagh <ian@well-typed.com> | 2012-09-13 21:26:05 +0100 |
---|---|---|
committer | Ian Lynagh <ian@well-typed.com> | 2012-09-13 21:26:05 +0100 |
commit | a7a91cdc9323eee09fd6f83e93e0b9e3549a99cc (patch) | |
tree | b245d768ca3a2b09873cb209237b2f0ae8e3a30a /includes | |
parent | 568fdb14cdb9bed064c96decf1420bf8d9a37ff0 (diff) | |
download | haskell-a7a91cdc9323eee09fd6f83e93e0b9e3549a99cc.tar.gz |
Remove the --gen-haskell mode of mkDerivedConstants
It no longer generates anything
Diffstat (limited to 'includes')
-rw-r--r-- | includes/HaskellConstants.hs | 5 | ||||
-rw-r--r-- | includes/ghc.mk | 18 | ||||
-rw-r--r-- | includes/mkDerivedConstants.c | 25 |
3 files changed, 5 insertions, 43 deletions
diff --git a/includes/HaskellConstants.hs b/includes/HaskellConstants.hs index dfef14e48f..6f2c4a16fe 100644 --- a/includes/HaskellConstants.hs +++ b/includes/HaskellConstants.hs @@ -200,8 +200,3 @@ bLOCKS_PER_MBLOCK = BLOCKS_PER_MBLOCK bITMAP_BITS_SHIFT :: Int bITMAP_BITS_SHIFT = BITMAP_BITS_SHIFT --- Constants derived from headers in ghc/includes, generated by the program --- ../includes/mkDerivedConstants.c. - -#include "../includes/dist-derivedconstants/header/GHCConstants.h" - diff --git a/includes/ghc.mk b/includes/ghc.mk index c34fd47b8a..065dd0a60b 100644 --- a/includes/ghc.mk +++ b/includes/ghc.mk @@ -131,7 +131,6 @@ endif # Make DerivedConstants.h for the compiler includes_DERIVEDCONSTANTS = includes/dist-derivedconstants/header/DerivedConstants.h -includes_GHCCONSTANTS = includes/dist-derivedconstants/header/GHCConstants.h includes_GHCCONSTANTS_HASKELL_TYPE = includes/dist-derivedconstants/header/GHCConstantsHaskellType.hs includes_GHCCONSTANTS_HASKELL_VALUE = includes/dist-derivedconstants/header/platformConstants includes_GHCCONSTANTS_HASKELL_WRAPPERS = includes/dist-derivedconstants/header/GHCConstantsHaskellWrappers.hs @@ -145,10 +144,6 @@ DerivedConstants.h : @echo "*** Cross-compiling: please copy DerivedConstants.h from the target system" @exit 1 -$(includes_GHCCONSTANTS) : - @echo "*** Cross-compiling: please copy DerivedConstants.h from the target system" - @exit 1 - else includes_dist-derivedconstants_C_SRCS = mkDerivedConstants.c @@ -172,13 +167,6 @@ else $(AlienScript) run ./$< >$@ endif -$(includes_GHCCONSTANTS) : $(INPLACE_BIN)/mkDerivedConstants$(exeext) | $$(dir $$@)/. -ifeq "$(AlienScript)" "" - ./$< --gen-haskell >$@ -else - $(AlienScript) run ./$< --gen-haskell >$@ -endif - $(includes_GHCCONSTANTS_HASKELL_TYPE) : $(INPLACE_BIN)/mkDerivedConstants$(exeext) | $$(dir $$@)/. ifeq "$(AlienScript)" "" ./$< --gen-haskell-type >$@ @@ -215,11 +203,11 @@ endif $(eval $(call clean-target,includes,,\ $(includes_H_CONFIG) $(includes_H_PLATFORM) \ - $(includes_GHCCONSTANTS) $(includes_GHCCONSTANTS_HASKELL_TYPE) $(includes_GHCCONSTANTS_HASKELL_VALUE) $(includes_DERIVEDCONSTANTS))) + $(includes_GHCCONSTANTS_HASKELL_TYPE) $(includes_GHCCONSTANTS_HASKELL_VALUE) $(includes_DERIVEDCONSTANTS))) $(eval $(call all-target,includes,,\ $(includes_H_CONFIG) $(includes_H_PLATFORM) \ - $(includes_GHCCONSTANTS) $(includes_GHCCONSTANTS_HASKELL_TYPE) $(includes_GHCCONSTANTS_HASKELL_VALUE) $(includes_DERIVEDCONSTANTS))) + $(includes_GHCCONSTANTS_HASKELL_TYPE) $(includes_GHCCONSTANTS_HASKELL_VALUE) $(includes_DERIVEDCONSTANTS))) install: install_includes @@ -230,5 +218,5 @@ install_includes : $(call INSTALL_DIR,"$(DESTDIR)$(ghcheaderdir)/$d") && \ $(call INSTALL_HEADER,$(INSTALL_OPTS),includes/$d/*.h,"$(DESTDIR)$(ghcheaderdir)/$d/") && \ ) true - $(call INSTALL_HEADER,$(INSTALL_OPTS),$(includes_H_CONFIG) $(includes_H_PLATFORM) $(includes_GHCCONSTANTS) $(includes_DERIVEDCONSTANTS),"$(DESTDIR)$(ghcheaderdir)/") + $(call INSTALL_HEADER,$(INSTALL_OPTS),$(includes_H_CONFIG) $(includes_H_PLATFORM) $(includes_DERIVEDCONSTANTS),"$(DESTDIR)$(ghcheaderdir)/") diff --git a/includes/mkDerivedConstants.c b/includes/mkDerivedConstants.c index 3334d5fdff..984044645e 100644 --- a/includes/mkDerivedConstants.c +++ b/includes/mkDerivedConstants.c @@ -29,7 +29,7 @@ #include <stdio.h> #include <string.h> -enum Mode { Gen_Haskell, Gen_Haskell_Type, Gen_Haskell_Value, Gen_Haskell_Wrappers, Gen_Haskell_Exports, Gen_Header } mode; +enum Mode { Gen_Haskell_Type, Gen_Haskell_Value, Gen_Haskell_Wrappers, Gen_Haskell_Exports, Gen_Header } mode; #define str(a,b) #a "_" #b @@ -41,8 +41,6 @@ enum Mode { Gen_Haskell, Gen_Haskell_Type, Gen_Haskell_Value, Gen_Haskell_Wrappe #define def_offset(str, offset) \ switch (mode) { \ - case Gen_Haskell: \ - break; \ case Gen_Haskell_Type: \ printf(" , pc_OFFSET_" str " :: Int\n"); \ break; \ @@ -63,7 +61,6 @@ enum Mode { Gen_Haskell, Gen_Haskell_Type, Gen_Haskell_Value, Gen_Haskell_Wrappe #define ctype(type) \ switch (mode) { \ - case Gen_Haskell: \ case Gen_Haskell_Type: \ case Gen_Haskell_Value: \ case Gen_Haskell_Wrappers: \ @@ -83,7 +80,6 @@ enum Mode { Gen_Haskell, Gen_Haskell_Type, Gen_Haskell_Value, Gen_Haskell_Wrappe */ #define field_type_(str, s_type, field) \ switch (mode) { \ - case Gen_Haskell: \ case Gen_Haskell_Type: \ case Gen_Haskell_Value: \ case Gen_Haskell_Wrappers: \ @@ -97,7 +93,6 @@ enum Mode { Gen_Haskell, Gen_Haskell_Type, Gen_Haskell_Value, Gen_Haskell_Wrappe #define field_type_gcptr_(str, s_type, field) \ switch (mode) { \ - case Gen_Haskell: \ case Gen_Haskell_Type: \ case Gen_Haskell_Value: \ case Gen_Haskell_Wrappers: \ @@ -120,7 +115,6 @@ enum Mode { Gen_Haskell, Gen_Haskell_Type, Gen_Haskell_Value, Gen_Haskell_Wrappe /* An access macro for use in C-- sources. */ #define struct_field_macro(str) \ switch (mode) { \ - case Gen_Haskell: \ case Gen_Haskell_Type: \ case Gen_Haskell_Value: \ case Gen_Haskell_Wrappers: \ @@ -144,8 +138,6 @@ enum Mode { Gen_Haskell, Gen_Haskell_Type, Gen_Haskell_Value, Gen_Haskell_Wrappe #define def_size(str, size) \ switch (mode) { \ - case Gen_Haskell: \ - break; \ case Gen_Haskell_Type: \ printf(" , pc_SIZEOF_" str " :: Int\n"); \ break; \ @@ -166,7 +158,6 @@ enum Mode { Gen_Haskell, Gen_Haskell_Type, Gen_Haskell_Value, Gen_Haskell_Wrappe #define def_closure_size(str, size) \ switch (mode) { \ - case Gen_Haskell: \ case Gen_Haskell_Type: \ case Gen_Haskell_Value: \ case Gen_Haskell_Wrappers: \ @@ -195,7 +186,6 @@ enum Mode { Gen_Haskell, Gen_Haskell_Type, Gen_Haskell_Value, Gen_Haskell_Wrappe /* An access macro for use in C-- sources. */ #define closure_field_macro(str) \ switch (mode) { \ - case Gen_Haskell: \ case Gen_Haskell_Type: \ case Gen_Haskell_Value: \ case Gen_Haskell_Wrappers: \ @@ -214,7 +204,6 @@ enum Mode { Gen_Haskell, Gen_Haskell_Type, Gen_Haskell_Value, Gen_Haskell_Wrappe #define closure_payload_macro(str) \ switch (mode) { \ - case Gen_Haskell: \ case Gen_Haskell_Type: \ case Gen_Haskell_Value: \ case Gen_Haskell_Wrappers: \ @@ -254,7 +243,6 @@ enum Mode { Gen_Haskell, Gen_Haskell_Type, Gen_Haskell_Value, Gen_Haskell_Wrappe /* Full byte offset for a TSO field, for use from Cmm */ #define tso_field_offset_macro(str) \ switch (mode) { \ - case Gen_Haskell: \ case Gen_Haskell_Type: \ case Gen_Haskell_Value: \ case Gen_Haskell_Wrappers: \ @@ -271,7 +259,6 @@ enum Mode { Gen_Haskell, Gen_Haskell_Type, Gen_Haskell_Value, Gen_Haskell_Wrappe #define tso_field_macro(str) \ switch (mode) { \ - case Gen_Haskell: \ case Gen_Haskell_Type: \ case Gen_Haskell_Value: \ case Gen_Haskell_Wrappers: \ @@ -289,7 +276,6 @@ enum Mode { Gen_Haskell, Gen_Haskell_Type, Gen_Haskell_Value, Gen_Haskell_Wrappe #define opt_struct_size(s_type, option) \ switch (mode) { \ - case Gen_Haskell: \ case Gen_Haskell_Type: \ case Gen_Haskell_Value: \ case Gen_Haskell_Wrappers: \ @@ -314,10 +300,7 @@ main(int argc, char *argv[]) mode = Gen_Header; } else if (argc == 2) { - if (0 == strcmp("--gen-haskell", argv[1])) { - mode = Gen_Haskell; - } - else if (0 == strcmp("--gen-haskell-type", argv[1])) { + if (0 == strcmp("--gen-haskell-type", argv[1])) { mode = Gen_Haskell_Type; } else if (0 == strcmp("--gen-haskell-value", argv[1])) { @@ -340,8 +323,6 @@ main(int argc, char *argv[]) } switch (mode) { - case Gen_Haskell: - break; case Gen_Haskell_Type: printf("data PlatformConstants = PlatformConstants {\n"); /* Now a kludge that allows the real entries to all start with a @@ -621,8 +602,6 @@ main(int argc, char *argv[]) #endif switch (mode) { - case Gen_Haskell: - break; case Gen_Haskell_Type: printf(" } deriving (Read, Show)\n"); break; |