Debian Codegraph @

Makefile

raw
1 # Copyright © 2018 Rafael Laboissière <[email protected]>
2 #
3 # This program is free software; you can redistribute it and/or modify
4 # it under the terms of the GNU General Public License as published by
5 # the Free Software Foundation; either version 3 of the License, or
6 # (at your option) any later version.
7 #
8 # This program is distributed in the hope that it will be useful,
9 # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 # GNU General Public License for more details.
12 #
13 # You should have received a copy of the GNU General Public License along
14 # with this program; if not, see <https://www.gnu.org/licenses/>.
15
16 PERL_SCRIPTS = dh_octave_substvar \
17 dh_octave_clean \
18 dh_octave_make \
19 dh_octave_changelogs \
20 dh_octave_examples
21
22 SCRIPTS = $(PERL_SCRIPTS) \
23 dh_octave_check \
24 dh_octave_version
25
26 MANPAGES = $(patsubst %,%.1,$(SCRIPTS))
27
28 VERSION := $(shell dpkg-parsechangelog -S Version)
29
30 .PHONY: all
31 all: manpages chmod critic
32
33 .PHONY: manpages
34 manpages: $(MANPAGES)
35
36 %.1: %
37 pod2man --center="dh-octave" --release="$(VERSION)" --utf8 $< > $@
38
39 dh_octave_make: dh_octave_make.in
40 perl substitute.pl
41
42 .PHONY: chmod
43 chmod: $(SCRIPTS)
44 chmod +x $(SCRIPTS)
45
46 .PHONY: check
47 check:
48 PREFIX=$(shell pwd)/ ./test_dh_octave.sh
49
50 .PHONY: critic
51 critic: $(PERL_SCRIPTS)
52 perlcritic \
53 buildsystem.pm \
54 substitute.pl \
55 $(PERL_SCRIPTS)
56
57 .PHONY: clean
58 clean:
59 rm -f $(MANPAGES) dh_octave_make