mirror of
https://github.com/Mercury-Language/mercury.git
synced 2026-04-21 20:33:55 +00:00
Estimated hours taken: 0.5
debian/README.debian:
debian/changelog:
debian/control:
debian/dirs:
debian/rules:
Add the latest changes from the debian build rules.
110 lines
3.0 KiB
Makefile
Executable File
110 lines
3.0 KiB
Makefile
Executable File
#!/usr/bin/make -f
|
|
# Sample debian.rules file - for GNU Hello (1.3).
|
|
# Copyright 1994,1995 by Ian Jackson.
|
|
# I hereby give you perpetual unlimited permission to copy,
|
|
# modify and relicense this file, provided that you do not remove
|
|
# my name from the file itself. (I assert my moral right of
|
|
# paternity under the Copyright, Designs and Patents Act 1988.)
|
|
# This file may have to be extensively modified
|
|
|
|
package=mercury
|
|
|
|
MERCURY_MANS = doc/c2init.1 doc/mmc.1 doc/mgnuc.1 doc/ml.1 \
|
|
doc/mprof.1
|
|
#DEBIAN_DOCS = debian/README.debian debian/copyright
|
|
|
|
# A local installation of Mercury. You might want to override
|
|
# this to be where you installed a Mercury compiler to bootstrap
|
|
# with. If you are building from an installed binary package in
|
|
# /usr/bin it shouldn't be a problem
|
|
LOCAL_MERCURY_INSTALL = /home/tyson/install/bin
|
|
|
|
PATH := $(PATH):/usr/local/mercury-DEV/bin:$(LOCAL_MERCURY_INSTALL)
|
|
|
|
# To build, configure as if we are going to install in /usr,
|
|
# then build the compiler.
|
|
build:
|
|
$(checkdir)
|
|
echo $(PATH)
|
|
autoconf
|
|
./configure --prefix=/usr
|
|
make
|
|
touch build
|
|
|
|
clean:
|
|
$(checkdir)
|
|
echo $(PATH)
|
|
-rm -f build
|
|
autoconf
|
|
./configure
|
|
-mmake realclean
|
|
-rm -f config.status config.cache config.log configure.log
|
|
-rm -f runtime/mercury_conf.h boehm_gc/mercury_boehm_gc_conf.h
|
|
-rm -f bindist/bindist.build_vars
|
|
-rm -f make_all.log make_install.log mercury-compiler.spec
|
|
-rm -f Mmake.common configure
|
|
-rm -f `find . -name "*~"`
|
|
-rm -rf debian/tmp debian/files* core debian/substvars
|
|
|
|
binary-indep: checkroot build
|
|
$(checkdir)
|
|
# There are no architecture-independent files to be uploaded
|
|
# generated by this package. If there were any they would be
|
|
# made here.
|
|
# XXX This isn't entirely true - all the .int files (and such)
|
|
# are architecture independent. But that's not really worth worrying
|
|
# about.
|
|
|
|
|
|
# To build the binary package, we install into ./debian/tmp/usr
|
|
# However, we have configured as if we are going to install into
|
|
# /usr, so we need to convince the "make install" target to
|
|
# install elsewhere.
|
|
# We override INSTALL_PREFIX to tell it to install to ./debian/tmp/usr.
|
|
# Hardcoded paths should be depending on FINAL_INSTALL_PREFIX instead,
|
|
# which we leave configured for /usr.
|
|
install: build
|
|
dh_testdir
|
|
dh_testroot
|
|
dh_clean -k
|
|
dh_installdirs
|
|
make install INSTALL_PREFIX=`pwd`/debian/tmp/usr ;\
|
|
|
|
binary-arch: install
|
|
# cp boehm_gc/README debian/tmp/usr/share/doc/mercury/README.boehm_gc
|
|
# We are probably going to have to override the installation directories
|
|
# to put the documents into /usr/share/doc
|
|
dh_installdocs
|
|
dh_installexamples samples/*
|
|
dh_installmanpages
|
|
|
|
# dh_undocumented undocumented commands
|
|
|
|
dh_strip
|
|
dh_compress
|
|
dh_fixperms
|
|
dh_suidregister
|
|
dh_installdeb
|
|
dh_shlibdeps
|
|
dh_gencontrol
|
|
|
|
dh_md5sums
|
|
dh_builddeb
|
|
|
|
define checkdir
|
|
test -f debian/rules
|
|
endef
|
|
|
|
# Below here is fairly generic really
|
|
|
|
binary: binary-indep binary-arch
|
|
|
|
source diff:
|
|
@echo >&2 'source and diff are obsolete - use dpkg-source -b'; false
|
|
|
|
checkroot:
|
|
$(checkdir)
|
|
test root = "`whoami`"
|
|
|
|
.PHONY: binary binary-arch binary-indep clean checkroot
|