File: rules

package info (click to toggle)
dosfstools 2.8-1
  • links: PTS
  • area: main
  • in suites: woody
  • size: 340 kB
  • ctags: 428
  • sloc: ansic: 3,719; makefile: 175
file content (74 lines) | stat: -rwxr-xr-x 2,013 bytes parent folder | download | duplicates (2)
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
#! /usr/bin/make -f

#   Copyright 1994-97   joey@infodrom.north.de (Martin Schulze)
#
#   This program is free software; you can redistribute it and/or modify
#   it under the terms of the GNU General Public License as published by
#   the Free Software Foundation; version 2 dated June, 1991.
#
#   This program is distributed in the hope that it will be useful,
#   but WITHOUT ANY WARRANTY; without even the implied warranty of
#   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#   GNU General Public License for more details.
#
#   You should have received a copy of the GNU General Public License
#   along with this program;  if not, write to the Free Software
#   Foundation, Inc., 675 Mass Ave., Cambridge, MA 02139, USA.

tmpdir=debian/tmp
docdir=$(tmpdir)/usr/share/doc/dosfstools
mandir=$(tmpdir)/usr/share/man
oldmandir=$(tmpdir)/usr/man
ARCH = $(shell dpkg --print-gnu-build-architecture)

ifeq ($(ARCH),alpha)
OPTFLAGS="-fomit-frame-pointer -fno-strict-aliasing"
else
OPTFLAGS="-O2 -fomit-frame-pointer"
endif

build:
	make DEBUGFLAGS=-g OPTFLAGS=$(OPTFLAGS)
	touch build

clean:
	make distclean
	rm -f `find -name '*~' -o -name '.#*' -o -name '.new*'`
	rm -rf build
	rm -rf debian/tmp
	rm -f debian/files debian/substvars

binary: binary-indep binary-arch

binary-indep:
# Nothing to be done here

binary-arch: build
	dh_testdir
	dh_testroot
	dh_clean
	dh_installdirs
	make install PREFIX=`pwd`/$(tmpdir)
	install -d $(mandir)/man8
	mv $(oldmandir)/man8/* $(mandir)/man8
	rm -rf $(oldmandir)
	dh_installdocs README.Atari TODO
	# dh_installdocs can't install two "README" files (same name)
	install -m 644 mkdosfs/README $(docdir)/README.mkdosfs
	install -m 644 dosfsck/README $(docdir)/README.dosfsck
	dh_installchangelogs CHANGES
	dh_strip
	dh_compress
	dh_fixperms
	dh_installdeb
	dh_shlibdeps
	dh_gencontrol
	dh_builddeb

source diff:
	@echo >&2 'source and diff are obsolete - use dpkg-source -b' or dsc; false

dist: binary dsc

.PHONY: binary binary-arch binary-indep clean