File: Makefile

package info (click to toggle)
dlocate 1.18
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 144 kB
  • sloc: sh: 641; perl: 181; makefile: 37
file content (48 lines) | stat: -rw-r--r-- 1,096 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
#!/usr/bin/make -f

MANS = \
	dlocate.1 \
	update-dlocatedb.8 \
	# EOL

PACKAGE_VERSION = $(shell dpkg-parsechangelog -SVersion)
SOURCE_DATE_EPOCH = $(shell dpkg-parsechangelog -STimestamp)
PACKAGE_RELEASE_DATE = $(shell date --date="@$(SOURCE_DATE_EPOCH)" -I)

POD2MAN = pod2man
POD2MAN_OPTS = \
	--utf \
	--center='dpkg suite' \
	--release='$(PACKAGE_VERSION)' \
	--date='$(PACKAGE_RELEASE_DATE)' \
	# EOL

all: man

clean:
	$(RM) $(MANS)

install:
	install -m 755 dlocate $(DESTDIR)/usr/bin/
	install -m 755 update-dlocatedb $(DESTDIR)/usr/sbin/
	install -m 755 updatedb $(DESTDIR)/usr/share/dlocate/
	install -m 755 update-dpkg-list $(DESTDIR)/usr/share/dlocate/
	install -m 644 spcrc-* $(DESTDIR)/usr/share/dlocate/
	install -m 644 completion/bash/* $(DESTDIR)/usr/share/bash-completion/completions/

%.1 %.8: %.pod
	filename='$@'; \
	$(POD2MAN) $(POD2MAN_OPTS) \
		--name="$$(basename $${filename%.*})" \
		--section="$${filename##*.}" \
		$< >$@

man: $(MANS)

update-test:
	./test-dlocate.sh > test.output 2>&1

test:
	./test-dlocate.sh > new.output 2>&1
	diff -u test.output new.output