From: Ian Lynagh Date: Mon, 25 Aug 2008 19:09:12 +0000 (+0000) Subject: When making bindists, check that we know where we are X-Git-Url: http://git.megacz.com/?p=ghc-hetmet.git;a=commitdiff_plain;h=0e5f01904f7df065547e1558df8917c11f676f77 When making bindists, check that we know where we are --- diff --git a/docs/Makefile b/docs/Makefile index 9b51adb..74eb955 100644 --- a/docs/Makefile +++ b/docs/Makefile @@ -15,6 +15,10 @@ install-docs :: $(PAGE) .PHONY: binary-dist binary-dist.doc.% binary-dist: $(foreach SUBDIR,$(SUBDIRS),binary-dist.doc.$(SUBDIR)) +ifeq "$(WHERE_AM_I)" "" + echo "I don't know where I am" >&2 + exit 1 +endif echo $(WHERE_AM_I)/Makefile >> $(BIN_DIST_LIST) echo $(WHERE_AM_I)/$(PAGE) >> $(BIN_DIST_LIST) diff --git a/driver/Makefile b/driver/Makefile index ca3504c..3fcb4be 100644 --- a/driver/Makefile +++ b/driver/Makefile @@ -26,6 +26,10 @@ INSTALL_DATAS += ghc-usage.txt ghci-usage.txt CLEAN_FILES += stamp-pkg-conf-rts binary-dist: +ifeq "$(WHERE_AM_I)" "" + echo "I don't know where I am" >&2 + exit 1 +endif for FILE in Makefile $(INSTALL_DATAS); do echo $(WHERE_AM_I)/$$FILE >> $(BIN_DIST_LIST); done set -e; for d in $(SUBDIRS); do $(MAKE) -C $$d binary-dist WHERE_AM_I=$(WHERE_AM_I)/$$d; done diff --git a/libraries/Makefile b/libraries/Makefile index 43216ba..55c3180 100644 --- a/libraries/Makefile +++ b/libraries/Makefile @@ -387,6 +387,10 @@ BIN_DIST_LIBDIR=$(BIN_DIST_DIR)/libraries BINDIST_EXTRAS += ifBuildable/ifBuildable binary-dist: $(foreach SUBDIR,$(SUBDIRS),binary-dist.library.$(SUBDIR)) +ifeq "$(WHERE_AM_I)" "" + echo "I don't know where I am" >&2 + exit 1 +endif echo $(WHERE_AM_I)/Makefile >> $(BIN_DIST_LIST) # XXX This needs to be changed: This ifBuildable is built with the # bootstrapping compiler, so isn't OS X friendly. It should be made into diff --git a/mk/bindist.mk b/mk/bindist.mk index 00421cd..3018f51 100644 --- a/mk/bindist.mk +++ b/mk/bindist.mk @@ -5,6 +5,10 @@ EXE_DIST_DIR = dist-install # XXX This is a bit of a mess. Really we should be just asking Cabal # what it would install and putting those files in the bindist. binary-dist: +ifeq "$(WHERE_AM_I)" "" + echo "I don't know where I am" >&2 + exit 1 +endif # General bits -find . -name Makefile -exec echo $(WHERE_AM_I)/{} \; >> $(BIN_DIST_LIST) 2> /dev/null -find . -name LICENSE -exec echo $(WHERE_AM_I)/{} \; >> $(BIN_DIST_LIST) 2> /dev/null diff --git a/utils/Makefile b/utils/Makefile index c75e670..4bbeb35 100644 --- a/utils/Makefile +++ b/utils/Makefile @@ -61,6 +61,10 @@ endif WITH_EITHER = $(sort $(WITH_BOOTSTRAPPING_COMPILER) $(WITH_STAGE1)) binary-dist: $(foreach P,$(WITH_STAGE1),binary-dist.$P) +ifeq "$(WHERE_AM_I)" "" + echo "I don't know where I am" >&2 + exit 1 +endif echo $(WHERE_AM_I)/Makefile >> $(BIN_DIST_LIST) set -e; for d in $(SUBDIRS); do $(MAKE) -C $$d binary-dist WHERE_AM_I=$(WHERE_AM_I)/$$d; done