When the pipeline just copies the file, prepend a LINE pragma
[ghc-hetmet.git] / Makefile
index b8c1498..d4b93cc 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -383,8 +383,8 @@ binary-dist ::
 ifneq "$(PublishLocation)" ""
 binary-dist ::
        @for i in 0 1 2 3 4 5 6 7 8 9; do \
-               echo "Try $$i: $(PublishCp) $(SRC_DIST_EXTRALIBS_TARBALL) $(PublishLocation)"; \
-               if $(PublishCp) $(SRC_DIST_EXTRALIBS_TARBALL) $(PublishLocation); then break; fi\
+               echo "Try $$i: $(PublishCp) $(BIN_DIST_TARBALL) $(PublishLocation)"; \
+               if $(PublishCp) $(BIN_DIST_TARBALL) $(PublishLocation); then break; fi\
        done
 endif
 
@@ -417,7 +417,7 @@ SRC_DIST_DIRS += mk docs distrib $(filter-out docs distrib,$(SUBDIRS))
 SRC_DIST_FILES += \
        configure.ac config.guess config.sub configure \
        aclocal.m4 README ANNOUNCE HACKING LICENSE Makefile install-sh \
-       ghc.spec.in
+       ghc.spec.in VERSION
 
 # -----------------------------------------------------------------------------
 # Source distributions
@@ -437,6 +437,11 @@ EXTRA_LIBS=$(patsubst %, $(SRC_DIST_NAME)/libraries/%, $(shell cat libraries/ext
 SRC_DIST_TARBALL = ghc-$(ProjectVersion)-src.tar.bz2
 SRC_DIST_EXTRALIBS_TARBALL = ghc-$(ProjectVersion)-src-extralibs.tar.bz2
 
+VERSION :
+       echo $(ProjectVersion) >VERSION
+
+dist :: VERSION
+
 dist ::
        $(RM) -rf $(SRC_DIST_DIR)
        $(RM) $(SRC_DIST_NAME).tar.gz
@@ -506,6 +511,9 @@ DIST_CLEAN_FILES += config.cache config.status mk/config.h mk/stamp-h \
 # don't clean config.mk: it's needed when cleaning stuff later on
 LATE_DIST_CLEAN_FILES += mk/config.mk 
 
+# VERSION is shipped in a source dist
+MAINTAINER_CLEAN_FILES += VERSION
+
 extraclean::
        $(RM) -rf autom4te.cache