~ubuntu-branches/ubuntu/precise/pmake/precise

« back to all changes in this revision

Viewing changes to debian/rules

  • Committer: Bazaar Package Importer
  • Author(s): Steve McIntyre
  • Date: 2002-03-12 21:59:55 UTC
  • Revision ID: james.westby@ubuntu.com-20020312215955-i183oxj3rpm464yh
Tags: 1.45-10
* Fixed broken '.Nm ""' directives in the man page. Closes: #137768
* Changed name from "make" to "pmake" in manpage.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/usr/bin/make -f
 
2
# Build rules for pmake (1.39)
 
3
# Based on Ian Jackson's sample rules file for GNU hello
 
4
# Copyright 1994,1995 by Ian Jackson.
 
5
# Copyright 1997,1998 by James Troup.
 
6
# Copyright 1999 by Edward Brocklesby.
 
7
# I hereby give you perpetual unlimited permission to copy,
 
8
# modify and relicense this file, provided that you do not remove
 
9
# my name from the file itself.  (I assert my moral right of
 
10
# paternity under the Copyright, Designs and Patents Act 1988.)
 
11
 
 
12
ARCH=$(shell dpkg --print-gnu-build-architecture)
 
13
CFLAGS="-O2  -g -Wall -D__COPYRIGHT\(x\)= -D__RCSID\(x\)= \
 
14
        -I. -DMACHINE=\\\"debian\\\" -DMACHINE_ARCH=\\\"${ARCH}\\\" \
 
15
        -D_GNU_SOURCE"
 
16
 
 
17
build:
 
18
        $(checkdir)
 
19
        $(MAKE) -f Makefile.boot CFLAGS=$(CFLAGS)
 
20
        touch build
 
21
 
 
22
clean:
 
23
        $(checkdir)
 
24
        $(MAKE) -f Makefile.boot clean
 
25
        -rm -rf build *~ debian/tmp debian/*~ debian/files* debian/substvar*
 
26
 
 
27
binary-indep:   checkroot build
 
28
        $(checkdir)
 
29
 
 
30
binary-arch:    checkroot build
 
31
        $(checkdir)
 
32
        -rm -rf debian/tmp/
 
33
        install -d -m 755 debian/tmp/DEBIAN/
 
34
        install -m 644 debian/control debian/tmp/DEBIAN/
 
35
 
 
36
        install -d -m 755 debian/tmp/usr/bin/
 
37
        install -s -m 755 bmake debian/tmp/usr/bin/pmake
 
38
        install -m 755 mkdep debian/tmp/usr/bin/
 
39
 
 
40
        install -d -m 755 debian/tmp/usr/share/man/man1/
 
41
        install -m 644 make.1 debian/tmp/usr/share/man/man1/pmake.1
 
42
        install -m 644 mkdep.1 debian/tmp/usr/share/man/man1/
 
43
        gzip -9v debian/tmp/usr/share/man/man1/*
 
44
 
 
45
        install -d -m 755 debian/tmp/usr/share/mk/
 
46
        for file in mk/*; \
 
47
        do \
 
48
          install -m 644 $$file debian/tmp/usr/share/$$file; \
 
49
        done
 
50
 
 
51
        install -d -m 755 debian/tmp/usr/share/doc/pmake/
 
52
        groff -Tascii -ms PSD.doc/tutorial.ms > \
 
53
              debian/tmp/usr/share/doc/pmake/tutorial.asc
 
54
        groff -Tps -ms PSD.doc/tutorial.ms > \
 
55
              debian/tmp/usr/share/doc/pmake/tutorial.ps
 
56
        cp debian/changelog debian/tmp/usr/share/doc/pmake/changelog.Debian
 
57
        gzip -9v debian/tmp/usr/share/doc/pmake/*
 
58
        install -m 644 debian/copyright  debian/tmp/usr/share/doc/pmake/
 
59
 
 
60
        -install -m 755 debian/preinst debian/tmp/DEBIAN/preinst
 
61
        -install -m 755 debian/postinst debian/tmp/DEBIAN/postinst
 
62
        -install -m 755 debian/prerm debian/tmp/DEBIAN/prerm
 
63
        -install -m 755 debian/postrm debian/tmp/DEBIAN/postrm
 
64
 
 
65
        dpkg-shlibdeps debian/tmp/usr/bin/pmake
 
66
        dpkg-gencontrol -isp
 
67
        chown -R root.root debian/tmp/
 
68
        chmod -R go=rX debian/tmp/
 
69
        dpkg --build debian/tmp/ ..
 
70
 
 
71
define checkdir
 
72
        test -f make.c -a -f debian/rules
 
73
endef
 
74
 
 
75
# Below here is fairly generic really
 
76
 
 
77
binary:         binary-indep binary-arch
 
78
 
 
79
source diff:
 
80
        @echo >&2 'source and diff are obsolete - use dpkg-source -b'; false
 
81
 
 
82
checkroot:
 
83
        $(checkdir)
 
84
        test root = "`whoami`"
 
85
 
 
86
.PHONY: binary binary-arch binary-indep clean checkroot