X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=Makefile;h=bd759ee06bd95d8bb69ed3952287159c8f1df6fd;hb=8b2dda501ed0bbf61d2ac31fbc4e0cfa6cc3aa31;hp=1a6c7f5de3eb425bd1f8c6ca7f6504b94cf0bd68;hpb=f8b78fd2506328885be10cf7736a74b5233e3230;p=ghc-hetmet.git diff --git a/Makefile b/Makefile index 1a6c7f5..bd759ee 100644 --- a/Makefile +++ b/Makefile @@ -9,12 +9,6 @@ TOP=. include $(TOP)/mk/boilerplate.mk -# -# Totally evil hack to make the setting of SUBDIRS be dependent -# on whether we do `make install' or not. Having a $(ifeq ... ) would -# be preferable.. -CURRENT_TARGET = $(MAKECMDGOALS) - # find the projects that actually exist... SUBDIRS = $(filter $(patsubst %/, %, $(wildcard */)), $(AllProjects)) @@ -29,6 +23,10 @@ ifneq "$(Project)" "" include $(shell echo $(Project) | tr A-Z a-z)/mk/config.mk endif +# ----------------------------------------------------------------------------- +# Certain targets require that Project is set from the command line. + +CURRENT_TARGET = $(MAKECMDGOALS) project-check : @if [ "$(Project)" = "" ]; then \ echo " You need to set \"Project\" in order to make $(CURRENT_TARGET)"; \ @@ -152,11 +150,12 @@ binary-dist:: echo "PACKAGE_PRL_SCRIPTS = $($(Project)BinDistPrlScripts)" >> $(BIN_DIST_TMPDIR)/$(BIN_DIST_NAME)/Makefile.in echo "PACKAGE_LIB_PRL_SCRIPTS = $($(Project)BinDistLibPrlScripts)" >> $(BIN_DIST_TMPDIR)/$(BIN_DIST_NAME)/Makefile.in echo "PACKAGE_BINS = $($(Project)BinDistBins)" >> $(BIN_DIST_TMPDIR)/$(BIN_DIST_NAME)/Makefile.in + echo "PACKAGE_LINKS = $($(Project)BinDistLinks)" >> $(BIN_DIST_TMPDIR)/$(BIN_DIST_NAME)/Makefile.in cat $(BIN_DIST_TMPDIR)/$(BIN_DIST_NAME)/Makefile-bin.in >> $(BIN_DIST_TMPDIR)/$(BIN_DIST_NAME)/Makefile.in @echo "Generating a shippable configure script.." $(MV) $(BIN_DIST_TMPDIR)/$(BIN_DIST_NAME)/configure-bin.in $(BIN_DIST_TMPDIR)/$(BIN_DIST_NAME)/configure.in ( cd $(BIN_DIST_TMPDIR)/$(BIN_DIST_NAME); autoconf ) - + cp $(BIN_DIST_MAIN_DIR)/mk/post-install-script $(BIN_DIST_TMPDIR)/$(BIN_DIST_NAME) # # binary dist'ing the documentation. # Which documentation to build/install is hardcoded below. @@ -275,7 +274,7 @@ dist :: # Automatic generation of a MANIFEST file for a source distribution # tree that is ready to go. dist-manifest :: - cd $(SRC_DIST_DIR); $(FIND) . \( -type l -o -type f \) -exec ls -lLG {} \; | sed -e 's/\.\///' > /tmp/MANIFEST ; mv /tmp/MANIFEST MANIFEST + cd $(SRC_DIST_DIR); $(FIND) . \( -type l -o -type f \) -exec ls -lLG {} \; | sed -e 's/\.\///' > MANIFEST.tmp ; mv MANIFEST.tmp MANIFEST dist-package :: dist-package-tar-gz