Files
mercury/scripts/Mmake
Fergus Henderson 356f1abee6 Split up the rule for installing the scripts so that
scripts/Mmake:
	Split up the rule for installing the scripts so that
	the NU-Prolog and SICStus Prolog related scripts are
	only installed if configure detected NU-Prolog or
	SICStus Prolog respectively.
1995-05-22 03:58:30 +00:00

70 lines
2.2 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 mod2c c2init mgnuc ml mint \
sicstus_conv mtags vpath_find mercury_update_interface
NUPROLOG_SCRIPTS = mcn mnc mnl mnp
SICSTUS_SCRIPTS = mcs msc msl msp
#-----------------------------------------------------------------------------#
.PHONY: all
all: $(SCRIPTS) $(NUPROLOG_SCRIPTS) $(SICSTUS_SCRIPTS)
#-----------------------------------------------------------------------------#
.PHONY: install
install: install_mmake install_scripts $(INSTALL_NUPROLOG) $(INSTALL_SICSTUS)
.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)
for file in $(SCRIPTS); do \
chmod +w $(INSTALL_BINDIR)/$$file ;\
done
.PHONY: install_nuprolog
install_nuprolog: $(NUPROLOG_SCRIPTS)
[ -d $(INSTALL_BINDIR) ] || mkdir -p $(INSTALL_BINDIR)
cp $(NUPROLOG_SCRIPTS) $(INSTALL_BINDIR)
for file in $(NUPROLOG_SCRIPTS); do \
chmod +w $(INSTALL_BINDIR)/$$file ;\
done
.PHONY: install_sicstus
install_sicstus: $(SICSTUS_SCRIPTS)
[ -d $(INSTALL_BINDIR) ] || mkdir -p $(INSTALL_BINDIR)
cp $(SICSTUS_SCRIPTS) $(INSTALL_BINDIR)
for file in $(SICSTUS_SCRIPTS); do \
chmod +w $(INSTALL_BINDIR)/$$file ;\
done
#-----------------------------------------------------------------------------#
clean_progs: clean_scripts
.PHONY: clean_scripts
clean_scripts:
for file in *.in; do rm -f `basename $$file .in`; done
#-----------------------------------------------------------------------------#