File: rules

package info (click to toggle)
9wm 1.2-4
  • links: PTS
  • area: main
  • in suites: hamm, slink
  • size: 128 kB
  • ctags: 215
  • sloc: ansic: 2,569; makefile: 55
file content (78 lines) | stat: -rwxr-xr-x 1,737 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
#! /usr/bin/make -f
#

CC = gcc
CFLAGS = -O2 -g -Wall
LDFLAGS =

SHELL = /bin/sh
srcdir = .

INSTALL = /usr/bin/install
INSTALL_PROGRAM = $(INSTALL) -m 755 -o root -g root
INSTALL_DATA = $(INSTALL) -m 644 -o root -g root
INSTALL_DIR = $(INSTALL) -d -m 755 -o root -g root

config:
	$(checkdir)
	xmkmf
	touch stamp-config

build:
	$(checkdir)
	test -f stamp-config || make -f debian/rules config
	make CC="$(CC)" CFLAGS="$(CFLAGS)"
	touch stamp-build

clean:
	$(checkdir)
	test -f stamp-config || make -f debian/rules config
	-make clean
	-rm -f Makefile Makefile.bak
	-rm -f stamp-config stamp-build
	-rm -rf debian/tmp debian/files* debian/substvars

binary-indep: checkroot
	$(checkdir)

binary-arch: checkroot
	$(checkdir)
	-rm -rf debian/tmp
	test -f stamp-build || make -f debian/rules build
#
#
# debian/tmp
	$(INSTALL_DIR) debian/tmp
	$(INSTALL_DIR) debian/tmp/DEBIAN
# binaries
	$(INSTALL_DIR) debian/tmp/usr/X11R6/bin
	$(INSTALL_PROGRAM) -s 9wm debian/tmp/usr/X11R6/bin
# man pages
	$(INSTALL_DIR) debian/tmp/usr/X11R6/man/man1
	$(INSTALL_DATA)	9wm.man debian/tmp/usr/X11R6/man/man1/9wm.1
	-gzip -9fr debian/tmp/usr/X11R6/man
# documentation
	$(INSTALL_DIR) debian/tmp/usr/doc/9wm
	$(INSTALL_DATA) debian/copyright debian/tmp/usr/doc/9wm
	$(INSTALL_DATA) debian/changelog \
	  debian/tmp/usr/doc/9wm/changelog.Debian
	gzip -9 debian/tmp/usr/doc/9wm/changelog.Debian
#
	$(INSTALL_DATA) README debian/tmp/usr/doc/9wm
#
# build the package
	dpkg-shlibdeps 9wm
	dpkg-gencontrol  -isp -p9wm -Pdebian/tmp
	dpkg --build debian/tmp ..

define checkdir
	test -f main.c -a -f debian/rules
endef

binary: binary-indep binary-arch

checkroot:
	$(checkdir)
	test root = "`whoami`"

.PHONY: config build clean binary binary-arch binary-indep