X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=Makefile;h=35ade8b4f4a596607292d1f55f9118a9fafd4148;hb=8db5c9818937c1f952e4cdd58451ea6b25975441;hp=3ce1f8212850a0dc8116721c1c0ea1b8da0afda4;hpb=67fe852eb2e9b3a489b62cbf9259b5a868db5468;p=ghc-hetmet.git diff --git a/Makefile b/Makefile index 3ce1f82..35ade8b 100644 --- a/Makefile +++ b/Makefile @@ -28,6 +28,16 @@ SRC_DIST_DIRS += mk docs distrib $(ProjectsToBuild) SRC_DIST_FILES += configure.in config.guess config.sub configure aclocal.m4 acconfig.h README INSTALL Makefile install-sh # ----------------------------------------------------------------------------- +# Make sure configure is up-to-date + +all boot :: configure +configure :: configure.in + @echo "WARNING: configure needs to be regenerated. Type" + @echo " make -f Makefile.config ./configure" + @echo "and rerun make." + @exit 16 + +# ----------------------------------------------------------------------------- # Making a binary distribution # # To make a particular binary distribution: @@ -49,7 +59,7 @@ BIN_DIST_TOP= distrib/Makefile-bin.in \ README \ distrib/INSTALL \ $(BIN_DIST_MAIN_DIR)/ANNOUNCE \ - $(BIN_DIST_MAIN_DIR)/PATCHLEVEL \ + $(BIN_DIST_MAIN_DIR)/VERSION \ $(BIN_DIST_MAIN_DIR)/RELEASE \ $(BIN_DIST_MAIN_DIR)/LICENSE \ glafp-utils/mkdirhier/mkdirhier \ @@ -122,19 +132,26 @@ binary-dist:: # BINDIST_DOCS = $($(Project)BinDistDocs) -BINDIST_DOCS_WAYS = html info dvi +BINDIST_DOCS_WAYS = html ps binary-dist :: @for way in $(BINDIST_DOCS_WAYS); do \ - $(MKDIRHIER) $(BIN_DIST_TMPDIR)/$(BIN_DIST_NAME)/$$way/$(ProjectNameShort)-$(ProjectVersion); \ + $(MKDIRHIER) $(BIN_DIST_TMPDIR)/$(BIN_DIST_NAME)/$$way; \ for dir in $(BINDIST_DOCS); do \ echo Making $$way documentation in $$dir && \ - $(MAKE) -C $$dir --no-print-directory $(MFLAGS) $$way && \ - echo cp -f $$dir/*.$$way $(BIN_DIST_TMPDIR)/$(BIN_DIST_NAME)/$$way/$(ProjectNameShort)-$(ProjectVersion) && \ - cp -f $$dir/*.$$way $(BIN_DIST_TMPDIR)/$(BIN_DIST_NAME)/$$way/$(ProjectNameShort)-$(ProjectVersion) && \ + $(MAKE) -C $$dir --no-print-directory $(MFLAGS) $$way >.doclog 2>&1 && \ + if [ "$$way" = "html" ]; then \ + for subdir in `perl -n -e '/output will be in ([_A-Za-z0-9]*)/ && do { print $$1; };' <.doclog`; do \ + echo Copying HTML docs from $$subdir...; \ + cp -Rf $$dir/$$subdir $(BIN_DIST_TMPDIR)/$(BIN_DIST_NAME)/$$way; \ + done \ + else \ + cp -f $$dir/*.$$way $(BIN_DIST_TMPDIR)/$(BIN_DIST_NAME)/$$way; \ + fi && \ echo "Done."; \ done; \ done + @rm -f .doclog # Rename scripts to $i.prl and $i.sh where necessary. # ToDo: do this in a cleaner way...