Files
mercury/scripts/Mmake
Fergus Henderson 5df40b0d26 Add copyright notices.
scripts/*:
	Add copyright notices.
1995-03-28 15:35:15 +00:00

58 lines
1.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.
#---------------------------------------------------------------------------#
# Mmake - Mmake file for the Mercury scripts
MAIN_TARGET=all
MERCURY_DIR=..
include ../Mmake.common
#-----------------------------------------------------------------------------#
SCRIPTS = mmake mc mcn mcs mod2c mod2init mgnuc ml mint mnc mnl mnp msc msl \
msp sicstus_conv mtags vpath_find mercury_update_interface
#-----------------------------------------------------------------------------#
.SUFFIXES: .sh
.sh:
sed -e "s^@LIBDIR@^$(INSTALL_LIBDIR)^g" \
-e "s^@FULLARCH@^$(FULLARCH)^g" \
$< > $@
chmod +x $@
#-----------------------------------------------------------------------------#
.PHONY: all
all: $(SCRIPTS)
#-----------------------------------------------------------------------------#
.PHONY: install
install: install_mmake install_scripts
.PHONY: install_mmake
install_mmake: Mmake.vars Mmake.rules
[ -d $(INSTALL_LIBDIR)/mmake ] || mkdir -p $(INSTALL_LIBDIR)/mmake
cp `vpath_find Mmake.vars Mmake.rules` $(INSTALL_LIBDIR)/mmake
.PHONY: install_scripts
install_scripts: $(SCRIPTS)
[ -d $(INSTALL_BINDIR) ] || mkdir -p $(INSTALL_BINDIR)
cp $(SCRIPTS) $(INSTALL_BINDIR)
#-----------------------------------------------------------------------------#
clean_progs: clean_scripts
.PHONY: clean_scripts
clean_scripts:
for file in *.sh; do rm -f `basename $$file .sh`; done
#-----------------------------------------------------------------------------#