diff options
author | Ian Lynagh <igloo@earth.li> | 2009-04-26 11:42:15 +0000 |
---|---|---|
committer | Ian Lynagh <igloo@earth.li> | 2009-04-26 11:42:15 +0000 |
commit | 34cc75e1a62638f2833815746ebce0a9114dc26b (patch) | |
tree | ef21e8fd7af1356beea9cce7d6efb8a65374e24c /driver | |
parent | 74e1368d4688ee16f6decdf2cd3ebe27506b26ba (diff) | |
download | haskell-34cc75e1a62638f2833815746ebce0a9114dc26b.tar.gz |
GHC new build system megapatch
Diffstat (limited to 'driver')
-rw-r--r-- | driver/ghc-pkg/Makefile | 18 | ||||
-rw-r--r-- | driver/ghc.mk | 11 | ||||
-rw-r--r-- | driver/ghc/ghc.mk | 10 | ||||
-rw-r--r-- | driver/ghci/Makefile | 66 | ||||
-rw-r--r-- | driver/ghci/ghc.mk | 50 | ||||
-rw-r--r-- | driver/mangler/Makefile | 29 | ||||
-rw-r--r-- | driver/mangler/ghc.mk | 7 | ||||
-rw-r--r-- | driver/runhaskell/Makefile | 14 | ||||
-rw-r--r-- | driver/split/Makefile | 24 | ||||
-rw-r--r-- | driver/split/ghc.mk | 7 |
10 files changed, 94 insertions, 142 deletions
diff --git a/driver/ghc-pkg/Makefile b/driver/ghc-pkg/Makefile deleted file mode 100644 index 2ee42d56b1..0000000000 --- a/driver/ghc-pkg/Makefile +++ /dev/null @@ -1,18 +0,0 @@ -TOP=../.. -include $(TOP)/mk/boilerplate.mk - -ifneq "$(TARGETPLATFORM)" "i386-unknown-mingw32" -SCRIPT_DIR = $(DESTDIR)$(bindir) -SCRIPT_BASE = ghc-pkg -SCRIPT_VERSIONED_BASE = $(SCRIPT_BASE)-$(ProjectVersion) -SCRIPT = $(SCRIPT_DIR)/$(SCRIPT_BASE) -SCRIPT_VERSIONED = $(SCRIPT_DIR)/$(SCRIPT_VERSIONED_BASE) - -install:: - mv $(SCRIPT) $(SCRIPT_VERSIONED) - ln -s $(SCRIPT_VERSIONED_BASE) $(SCRIPT) -endif - -include $(TOP)/mk/bindist.mk - -include $(TOP)/mk/target.mk diff --git a/driver/ghc.mk b/driver/ghc.mk new file mode 100644 index 0000000000..7739f6b2a9 --- /dev/null +++ b/driver/ghc.mk @@ -0,0 +1,11 @@ + +$(eval $(call all-target,driver,$(INPLACE_LIB)/ghc-usage.txt) $(INPLACE_LIB)/ghci-usage.txt) + +$(INPLACE_LIB)/ghc-usage.txt: driver/ghc-usage.txt + cp $< $@ + +$(INPLACE_LIB)/ghci-usage.txt: driver/ghci-usage.txt + cp $< $@ + +INSTALL_LIBS += driver/ghc-usage.txt driver/ghci-usage.txt + diff --git a/driver/ghc/ghc.mk b/driver/ghc/ghc.mk new file mode 100644 index 0000000000..68d35cb679 --- /dev/null +++ b/driver/ghc/ghc.mk @@ -0,0 +1,10 @@ +ifeq "$(Windows)" "YES" + +driver/ghc_dist_C_SRCS = ghc.c +driver/ghc_dist_PROG = ghc-$(ProjectVersion) +driver/ghc_dist_INSTALL = YES + +$(eval $(call build-prog,driver/ghc,dist,0)) + +endif + diff --git a/driver/ghci/Makefile b/driver/ghci/Makefile index 47f51b8c23..afb57176fb 100644 --- a/driver/ghci/Makefile +++ b/driver/ghci/Makefile @@ -1,63 +1,3 @@ -#----------------------------------------------------------------------------- -# $Id: Makefile,v 1.11 2005/05/05 00:58:38 sof Exp $ -# - -TOP=../.. -include $(TOP)/mk/boilerplate.mk - -# ----------------------------------------------------------------------------- -# ghci script - -ifeq "$(TARGETPLATFORM)" "i386-unknown-mingw32" -C_PROG = ghci$(exeext) -C_PROG_VERSIONED = ghci-$(ProjectVersion)$(exeext) -C_OBJS += ghci.res - -all :: $(C_PROG_VERSIONED) -$(C_PROG_VERSIONED) : $(C_PROG) - cp $< $@ -else -C_SRCS= -endif - -ifeq "$(TARGETPLATFORM)" "i386-unknown-mingw32" -INSTALL_PROGS += $(C_PROG) $(C_PROG_VERSIONED) -GHCII_SCRIPT=$(DESTDIR)$(bindir)/ghcii.sh -GHCII_SCRIPT_VERSIONED = $(DESTDIR)$(bindir)/ghcii-$(ProjectVersion).sh -install:: - $(RM) -f $(GHCII_SCRIPT) - echo "#!$(SHELL)" >> $(GHCII_SCRIPT) - echo 'exec "$$0"/../ghc --interactive $${1+"$$@"}' >> $(GHCII_SCRIPT) - chmod +x $(GHCII_SCRIPT) - cp $(GHCII_SCRIPT) $(GHCII_SCRIPT_VERSIONED) - chmod +x $(GHCII_SCRIPT_VERSIONED) -else -LINK = ghci -LINK_TARGET = $(LINK)-$(ProjectVersion) -INSTALLED_SCRIPT=$(DESTDIR)$(bindir)/$(LINK_TARGET) -install:: - $(RM) -f $(INSTALLED_SCRIPT) - echo "#!$(SHELL)" >> $(INSTALLED_SCRIPT) - echo 'exec $(bindir)/ghc-$(ProjectVersion) --interactive $${1+"$$@"}' >> $(INSTALLED_SCRIPT) - $(EXECUTABLE_FILE) $(INSTALLED_SCRIPT) -endif - -ifneq "$(TARGETPLATFORM)" "i386-unknown-mingw32" -INPLACE_SCRIPT = ghci -INPLACE_GHC = $(FPTOOLS_TOP_ABS)/ghc/stage2-inplace/ghc -CLEAN_FILES += $(INPLACE_SCRIPT) -all:: - $(RM) -f $(INPLACE_SCRIPT) - echo "#!$(SHELL)" >> $(INPLACE_SCRIPT) - echo "exec $(INPLACE_GHC) --interactive $${1+"$$@"}" >> $(INPLACE_SCRIPT) - $(EXECUTABLE_FILE) $(INPLACE_SCRIPT) -endif - -ifeq "$(TARGETPLATFORM)" "i386-unknown-mingw32" -ghci.res : ghci.rc ghci.ico - windres --preprocessor="$(CPP) -xc -DRC_INVOKED" -o ghci.res -i ghci.rc -O coff -endif - -include $(TOP)/mk/bindist.mk - -include $(TOP)/mk/target.mk +dir = driver/ghci +TOP = ../.. +include $(TOP)/mk/sub-makefile.mk diff --git a/driver/ghci/ghc.mk b/driver/ghci/ghc.mk new file mode 100644 index 0000000000..14e27123a7 --- /dev/null +++ b/driver/ghci/ghc.mk @@ -0,0 +1,50 @@ +ifneq "$(Windows)" "YES" + +install: install_driver_ghci + +.PHONY: install_driver_ghci +install_driver_ghci: WRAPPER=$(DESTDIR)$(bindir)/ghci-$(ProjectVersion) +install_driver_ghci: + $(MKDIRHIER) $(DESTDIR)$(bindir) + $(RM) -f $(WRAPPER) + echo '#!$(SHELL)' >> $(WRAPPER) + echo 'exec $(bindir)/ghc-$(ProjectVersion) --interactive ${1+"$@"}' >> $(WRAPPER) + $(EXECUTABLE_FILE) $(WRAPPER) + $(RM) -f $(DESTDIR)$(bindir)/ghci + $(LN_S) ghci-$(ProjectVersion) $(DESTDIR)$(bindir)/ghci + +else # Windows... + +driver/ghci_dist_C_SRCS = ghci.c +driver/ghci_dist_PROG = ghci$(exeext) +driver/ghci_dist_INSTALL = YES +driver/ghci_dist_OTHER_OBJS = driver/ghci/ghci.res + +$(eval $(call build-prog,driver/ghci,dist,0)) + +driver/ghci_dist_PROG_VER = ghci-$(ProjectVersion)$(exeext) + +INSTALL_BINS += driver/ghci/dist/build/tmp/$(driver/ghci_dist_PROG_VER) + +driver/ghci/ghci.res : driver/ghci/ghci.rc driver/ghci/ghci.ico + windres --preprocessor="$(CPP) -xc -DRC_INVOKED" -o driver/ghci/ghci.res -i driver/ghci/ghci.rc -O coff + +driver/ghci/dist/build/tmp/$(driver/ghci_dist_PROG_VER) : driver/ghci/dist/build/tmp/$(driver/ghci_dist_PROG) + $(CP) $< $@ + +install : install_driver_ghcii + +.PHONY: install_driver_ghcii +install_driver_ghcii: GHCII_SCRIPT=$(DESTDIR)$(bindir)/ghcii.sh +install_driver_ghcii: GHCII_SCRIPT_VERSIONED = $(DESTDIR)$(bindir)/ghcii-$(ProjectVersion).sh +install_driver_ghcii: + $(MKDIRHIER) $(DESTDIR)$(bindir) + $(RM) -f $(GHCII_SCRIPT) + echo "#!$(SHELL)" >> $(GHCII_SCRIPT) + echo 'exec "$$0"/../ghc --interactive $${1+"$$@"}' >> $(GHCII_SCRIPT) + $(EXECUTABLE_FILE) $(GHCII_SCRIPT) + cp $(GHCII_SCRIPT) $(GHCII_SCRIPT_VERSIONED) + $(EXECUTABLE_FILE) $(GHCII_SCRIPT_VERSIONED) + +endif + diff --git a/driver/mangler/Makefile b/driver/mangler/Makefile index 1242d6c236..ff1a4a9ee8 100644 --- a/driver/mangler/Makefile +++ b/driver/mangler/Makefile @@ -1,26 +1,3 @@ -#----------------------------------------------------------------------------- -# $Id: Makefile,v 1.3 2001/03/23 16:36:21 simonmar Exp $ - -TOP=../.. -include $(TOP)/mk/boilerplate.mk - -PROG = ghc-asm -all:: $(PROG).prl - $(RM) -f $(PROG) - echo '#!$(PERL)' >> $(PROG) - echo '$$TARGETPLATFORM = "$(TARGETPLATFORM)";' >> $(PROG) - cat $< >> $(PROG) - $(EXECUTABLE_FILE) $(PROG) - -INSTALL_LIBEXEC_SCRIPTS += $(PROG) -CLEAN_FILES += $(PROG) $(PROG).prl - -# needed for bootstrapping with HC files -ifeq "$(BootingFromHc)" "YES" -boot :: all -endif - -BINDIST_EXTRAS += $(PROG) -include $(TOP)/mk/bindist.mk - -include $(TOP)/mk/target.mk +dir = driver/mangler +TOP = ../.. +include $(TOP)/mk/sub-makefile.mk diff --git a/driver/mangler/ghc.mk b/driver/mangler/ghc.mk new file mode 100644 index 0000000000..c5cb3d6b7f --- /dev/null +++ b/driver/mangler/ghc.mk @@ -0,0 +1,7 @@ +driver/mangler_PERL_SRC = ghc-asm.lprl +driver/mangler_dist_PROG = $(GHC_MANGLER_PGM) +driver/mangler_dist_LIBEXEC = YES + +$(eval $(call build-perl,driver/mangler,dist)) + +INSTALL_LIBEXEC_SCRIPTS += driver/mangler/dist/$(GHC_MANGLER_PGM) diff --git a/driver/runhaskell/Makefile b/driver/runhaskell/Makefile deleted file mode 100644 index 02df642571..0000000000 --- a/driver/runhaskell/Makefile +++ /dev/null @@ -1,14 +0,0 @@ -TOP=../.. -include $(TOP)/mk/boilerplate.mk - -ifeq "$(TARGETPLATFORM)" "i386-unknown-mingw32" -install:: - cp $(DESTDIR)$(bindir)/runghc.exe $(DESTDIR)$(bindir)/runhaskell.exe -else -install:: - ln -sf runghc $(DESTDIR)$(bindir)/runhaskell -endif - -include $(TOP)/mk/bindist.mk - -include $(TOP)/mk/target.mk diff --git a/driver/split/Makefile b/driver/split/Makefile index 404cb97c4d..a73eeeb05b 100644 --- a/driver/split/Makefile +++ b/driver/split/Makefile @@ -1,21 +1,3 @@ -#----------------------------------------------------------------------------- -# $Id: Makefile,v 1.2 2000/11/03 16:54:52 simonmar Exp $ - -TOP=../.. -include $(TOP)/mk/boilerplate.mk - -PROG = ghc-split -all:: $(PROG).prl - $(RM) -f $(PROG) - echo '#!$(PERL)' >> $(PROG) - echo '$$TARGETPLATFORM = "$(TARGETPLATFORM)";' >> $(PROG) - cat $< >> $(PROG) - $(EXECUTABLE_FILE) $(PROG) - -INSTALL_LIBEXEC_SCRIPTS += $(PROG) -CLEAN_FILES += $(PROG) $(PROG).prl - -BINDIST_EXTRAS += $(PROG) -include $(TOP)/mk/bindist.mk - -include $(TOP)/mk/target.mk +dir = driver/split +TOP = ../.. +include $(TOP)/mk/sub-makefile.mk diff --git a/driver/split/ghc.mk b/driver/split/ghc.mk new file mode 100644 index 0000000000..30382e090d --- /dev/null +++ b/driver/split/ghc.mk @@ -0,0 +1,7 @@ +driver/split_PERL_SRC = ghc-split.lprl +driver/split_dist_PROG = $(GHC_SPLIT_PGM) +driver/split_dist_LIBEXEC = YES + +$(eval $(call build-perl,driver/split,dist)) + +INSTALL_LIBEXEC_SCRIPTS += driver/split/dist/$(GHC_SPLIT_PGM) |