Files
mercury/Makefile
Fergus Henderson 40f7fad627 Fix some code rot in the rules for `make clean';
Estimated hours taken: 0.5

Makefile:
tests/valid/Mmakefile:
tests/invalid/Mmakefile:
	Fix some code rot in the rules for `make clean';
	amoung other things, change them so that they
	handle `--use-subdirs' correctly.
1998-04-09 03:59:12 +00:00

74 lines
2.3 KiB
Makefile

#-----------------------------------------------------------------------------#
# Copyright (C) 1995-1998 The University of Melbourne.
# This file may only be copied under the terms of the GNU General
# Public Licence - see the file COPYING in the Mercury distribution.
#-----------------------------------------------------------------------------#
#
# This Makefile just invokes `mmake' to do the real work.
# Standard targets include `all', `install', and `clean'.
#
# If you want to do a parallel make, invoke make as
# make PARALLEL=-j2
# or
# make PARALLEL=-j2 install
# (`-j2' is for 2 jobs; you can use `-j3' for 3, etc.)
#
#-----------------------------------------------------------------------------#
SHELL= /bin/sh
MMAKE= MMAKE_DIR=`pwd`/scripts scripts/mmake
MMAKE_SUBDIR= MMAKE_DIR=`pwd`/../scripts ../scripts/mmake $(PARALLEL)
# PARALLEL=-j2
#-----------------------------------------------------------------------------#
.PHONY: all
all:
$(MMAKE) MMAKEFLAGS=$(PARALLEL) all 2>&1 | tee make_all.log
.PHONY: install
install:
$(MMAKE) MMAKEFLAGS=$(PARALLEL) install 2>&1 | tee make_install.log
# `mmake clean' has a different meaning to the usual GNU standard `make clean':
# it removes the .c files, which makes bootstrapping impossible unless you
# have already installed a working Mercury compiler.
# Hence we don't just use `$(MMAKE) clean' here.
.PHONY: clean
clean:
-rm -f */*.o */*.pic_o */*.a */*.so */*.no */*.ql */*.pl
-rm -rf */Mercury/os */Mercury/pic_os */Mercury/libs
-rm -rf */Mercury/qls */Mercury/nos
-rm -f compiler/mercury_compile profiler/mercury_profile
-rm -f library/library.nu* library/library.sicstus*
-rm -f library/sicstus_compile library/sicstus_saved_state
-rm -f util/mdemangle util/mkinit
cd boehm_gc; $(MMAKE_SUBDIR) clean
.PHONY: distclean
distclean: clean
cd scripts; for file in *.in; do rm -f `basename $file .in`; done
-rm -f Mmake.common runtime/mercury_conf.h
-rm -f boehm_gc/mercury_boehm_gc_conf.h bindist/bindist.build_vars
-rm -f config.cache config.status config.log
.PHONY: maintainer-clean
maintainer-clean:
$(MMAKE) clean
.PHONY: realclean
realclean:
$(MMAKE) realclean
.PHONY: uninstall
uninstall:
$(MMAKE) uninstall
.DEFAULT:
$(MMAKE) $@
#-----------------------------------------------------------------------------#