File: Makefile.am

package info (click to toggle)
vcsh 2.0.10-0.2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 396 kB
  • sloc: sh: 869; perl: 175; makefile: 72
file content (104 lines) | stat: -rw-r--r-- 2,811 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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
ACLOCAL_AMFLAGS = -I build-aux
AM_DISTCHECK_CONFIGURE_FLAGS = --enable-developer-mode

.ONESHELL:
.SECONDARY:
.SECONDEXPANSION:
.DELETE_ON_ERROR:

docdir = $(datarootdir)/doc/$(TRANSFORMED_PACKAGE_NAME)
licensedir = $(datarootdir)/licenses/$(TRANSFORMED_PACKAGE_NAME)

bin_SCRIPTS = vcsh
dist_doc_DATA = changelog doc/README.md doc/error_codes.md
samplehooksdir = $(docdir)/sample_hooks
dist_samplehooks_DATA = doc/sample_hooks/post-init-add-origin doc/sample_hooks/post-init-setup-mr doc/sample_hooks/post-merge-unclobber doc/sample_hooks/pre-merge-unclobber
dist_license_DATA = CONTRIBUTORS
if ENABLE_MAN_PAGE
dist_man_MANS = doc/vcsh.1
endif

EXTRA_DIST  = completions/vcsh.bash completions/vcsh.zsh build-aux/ax_prog_perl_modules.m4
EXTRA_DIST += t/000-tear-env.t t/001-setup-env.t t/100-init.t t/300-add.t t/950-delete.t t/999-tear-env.t

BUILT_SOURCES =
CLEANFILES = $(dist_man_MANS) $(bin_SCRIPTS)

# A classical use of the autoconf-archive include macro would expand
# INC_AMINCLUDE here, but the perl script that inlines include statements
# runs before the automake that organizes logic and performs substitution.
# Consequentially with a substitution here it becomes impossible to use
# automake conditionals and substitutions in the included Makefile fragments.
# By entering the expanded value directly we are ready in time for the inlining
# functionality and hence can use conditionals in included makefile fragments.
include $(top_srcdir)/aminclude.am

DISTCLEANFILES = @AMINCLUDE@

if !SOURCE_IS_DIST

doc/vcsh.1: doc/vcsh.1.ronn
	$(RONN) < $< > $@

endif

$(COMPLETIONS_OUT_DIR)/$(TRANSFORMED_PACKAGE_NAME): completions/vcsh.bash
	mkdir -p $(dir $@)
	install $< $@

$(COMPLETIONS_OUT_DIR)/_$(TRANSFORMED_PACKAGE_NAME): completions/vcsh.zsh
	mkdir -p $(dir $@)
	install $< $@

if ENABLE_TESTS
_CHECKDEPS = $(PROVE)
endif

check-local: $(_CHECKDEPS)

check-version: check-dep-versions

.PHONY: check-dep-versions
check-dep-version: $(PACKAGE_NAME) | .version
	./$< version | $(GREP) -Ff <($(GIT) version)

.PHONY: prove
prove:
	prove

.PHONY: test
test: prove

PHONY_DEVELOPER_TARGETS = lint lint-editor-config lint-shellheck
.PHONY: $(PHONY_DEVELOPER_TARGETS)

if DEVELOPER_MODE

lint: lint-editor-config lint-shellcheck

lint-editor-config:
	ec

lint-shellcheck: $(PACKAGE_NAME)
	shellcheck $<

else !DEVELOPER_MODE

$(PHONY_DEVELOPER_TARGETS):
	@: $(error "Please reconfigure using --enable-developer-mode to use developer tooling")

endif !DEVELOPER_MODE

if SOURCE_IS_GIT

CONTRIBUTORS:
	exec > $@
	echo 'Alphabetical list of names of everyone who ever committed to this repository.'
	echo 'Auto-generated using `make -B CONTRIBUTORS`'
	echo
	$(GIT) shortlog -se --all | cut -f1 --complement | sort -u

changelog-HEAD: changelog
	sed -nEe '2d;s/^\t//p;/^$$/q;' $< > $@

endif SOURCE_IS_GIT