-
Notifications
You must be signed in to change notification settings - Fork 380
/
Makefile.am
42 lines (33 loc) · 1.45 KB
/
Makefile.am
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
SUBDIRS = completions doc helpers test
pkgdata_DATA = bash_completion
# Empty, but here just to get the compat dir created with install
compatdir = $(sysconfdir)/bash_completion.d
compat_DATA = bash_completion.d/000_bash_completion_compat.bash
profiledir = $(sysconfdir)/profile.d
profile_DATA = bash_completion.sh
pkgconfigdir = $(datadir)/pkgconfig
pkgconfig_DATA = bash-completion.pc
cmakeconfigdir = $(datadir)/cmake/$(PACKAGE)/
cmakeconfig_DATA = bash-completion-config.cmake \
bash-completion-config-version.cmake
%: %.in Makefile
$(SED) \
-e 's|@prefix[@]|$(prefix)|' \
-e 's|@datadir[@]|$(datadir)|' \
-e 's|@sysconfdir[@]|$(sysconfdir)|' \
-e 's|@PACKAGE[@]|$(PACKAGE)|' \
-e 's|@VERSION[@]|$(VERSION)|' \
<$(srcdir)/[email protected] >$@
CLEANFILES = bash_completion.sh bash-completion.pc \
bash-completion-config.cmake bash-completion-config-version.cmake
EXTRA_DIST = CHANGELOG.md $(pkgdata_DATA) bash_completion.sh.in .dir-locals.el \
.editorconfig README.md CONTRIBUTING.md pyproject.toml .perltidyrc \
.shellcheckrc bash-completion.pc.in bash-completion-config.cmake.in \
bash-completion-config-version.cmake.in setup-symlinks.sh \
$(compat_DATA)
install-data-hook:
tmpfile=`mktemp $${TMPDIR:-/tmp}/bash_completion.XXXXXX` && \
$(SED) -e 's|-/etc/bash_completion\.d|-$(compatdir)|' \
$(DESTDIR)$(datadir)/$(PACKAGE)/bash_completion >$$tmpfile && \
cat $$tmpfile >$(DESTDIR)$(datadir)/$(PACKAGE)/bash_completion && \
rm $$tmpfile