mirror of
https://github.com/Mercury-Language/mercury.git
synced 2026-05-01 09:14:08 +00:00
Estimated hours taken: 0.75 */Mmake: Make sure that the rules for `mmake clean' and `mmake realclean' remove a few files that we'd missed. Change the rules for making tags so that it uses the local version of `mtags' (i.e. ../scripts/mtags) rather than the installed one.
78 lines
2.8 KiB
Plaintext
78 lines
2.8 KiB
Plaintext
#---------------------------------------------------------------------------#
|
|
# Copyright (C) 1995 University of Melbourne.
|
|
# This file may only be copied under the terms of the GNU General
|
|
# Public License - see the file COPYING in the Mercury distribution.
|
|
#---------------------------------------------------------------------------#
|
|
|
|
# This Mmake file is used to build a binary distribution.
|
|
# You need to have already installed the Mercury compiler.
|
|
|
|
MERCURY_DIR=..
|
|
include $(MERCURY_DIR)/Mmake.common
|
|
|
|
MERCURY_VERSION = mercury-0.5.$(FULLARCH)
|
|
|
|
INSTALL_LIB_DIR = $(INSTALL_PREFIX)/lib
|
|
|
|
LIB_FILES = bin doc html inc ints lib modules $(NUPROLOG) $(SICSTUS)
|
|
|
|
UTILS = $(INSTALL_PREFIX)/bin/mkinit \
|
|
$(INSTALL_PREFIX)/bin/mdemangle \
|
|
$(INSTALL_PREFIX)/bin/mtags
|
|
|
|
README_ETC = ../COPYING ../COPYING.LIB ../HISTORY ../LIMITATIONS \
|
|
../NEWS ../RELEASE_NOTES
|
|
|
|
SCRIPT_FILES = ../scripts/*.in ../scripts/Mmake.rules
|
|
|
|
CONFIG_FILES = ../config.sub ../config.guess ../install-sh
|
|
|
|
MISC_FILES = INSTALL README build_vars Makefile.in configure configure.in
|
|
|
|
#-----------------------------------------------------------------------------#
|
|
|
|
DEFAULT_TARGET=bindist
|
|
|
|
.PHONY: bindist
|
|
bindist: binary_distribution
|
|
|
|
.PHONY: binary_distribution
|
|
binary_distribution: bindist.configure bindist.build_vars
|
|
# Make a quick check that there is a mercury installation in
|
|
# $(INSTALL_DIR) by looking for mc and mercury_compile.
|
|
test -x $(INSTALL_BINDIR)/mc
|
|
test -x $(INSTALL_MERC_BIN_DIR)/mercury_compile
|
|
# create a temporary directory in which to assemble the distribution
|
|
test -d $(MERCURY_VERSION) || mkdir $(MERCURY_VERSION)
|
|
(cd $(INSTALL_LIB_DIR)/mercury && tar -cf - $(LIB_FILES)) | \
|
|
gzip > $(MERCURY_VERSION)/lib.tar.gz
|
|
(cd $(INSTALL_INFO_DIR)/.. && tar -cf - info) | \
|
|
gzip > $(MERCURY_VERSION)/info.tar.gz
|
|
test -d $(MERCURY_VERSION)/scripts || mkdir $(MERCURY_VERSION)/scripts
|
|
cp $(SCRIPT_FILES) $(MERCURY_VERSION)/scripts
|
|
test -d $(MERCURY_VERSION)/util || mkdir $(MERCURY_VERSION)/util
|
|
cp $(UTILS) $(MERCURY_VERSION)/util
|
|
cp $(CONFIG_FILES) $(MERCURY_VERSION)
|
|
cp $(README_ETC) $(MERCURY_VERSION)
|
|
cd ../samples; mmake realclean; cd Diff; mmake realclean
|
|
cp -r ../samples $(MERCURY_VERSION)/samples
|
|
for file in $(MISC_FILES); do \
|
|
cp bindist.$$file $(MERCURY_VERSION)/$$file || exit 1; \
|
|
done
|
|
tar -cf - $(MERCURY_VERSION) | gzip > ../$(MERCURY_VERSION).tar.gz
|
|
rm -rf $(MERCURY_VERSION)
|
|
|
|
bindist.configure: bindist.configure.in
|
|
autoconf bindist.configure.in > bindist.configure
|
|
|
|
bindist.build_vars: bindist.build_vars.in
|
|
CONFIG_FILES=bindist.build_vars CONFIG_HEADERS= \
|
|
$(MERCURY_DIR)/config.status
|
|
|
|
#-----------------------------------------------------------------------------#
|
|
|
|
realclean:
|
|
rm -f bindist.configure bindist.build_vars
|
|
|
|
#-----------------------------------------------------------------------------#
|