Files
mercury/Makefile
Paul Bone fd1459eccc Compatibility with Debian packaging.
Packaging Mercury for Debian requires creating some patches to make sure that
Mercury can be built under the control of dpkg-buildpackage.  It's recommended
that these patches are pushed upstream (into Mercury) so that everyone can
benefit from them, not just Debian packagers.

Mmake.common.in:
scripts/Mmake.vars.in:
    Install Mercury at $DESTDIR/@prefix@, $DESTDIR helps someone setup Mercury
    to run from @prefix@ while putting it in $DESTDIR.  $DESTDIR/* can easily
    be tared up and then deployed on other systems.

Mmakefile:
Makefile:
    Pass the $DESTDIR variable to make sub-processes.

scripts/Mercury.config.in:
scripts/Mercury.config.bootstrap.in:
    Remove the hash-bang line from these scripts since they are not executable.

    This change improves conformance with Debian packaging standards.
2010-12-14 07:01:55 +00:00

75 lines
2.2 KiB
Makefile

#-----------------------------------------------------------------------------#
# Copyright (C) 1995-1998, 2000, 2002, 2004-2005, 2010 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
.PHONY: libmmc
libmmc:
$(MMAKE) MMAKEFLAGS=$(PARALLEL) libmmc
.PHONY: install
install:
$(MMAKE) MMAKEFLAGS=$(PARALLEL) DESTDIR=$(DESTDIR) install
# `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 */*.dylib
-rm -rf */Mercury/os */Mercury/pic_os */Mercury/libs
-rm -f compiler/mercury_compile profiler/mercury_profile
-rm -f util/mdemangle util/mfiltercc 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) $@
#-----------------------------------------------------------------------------#