-
Notifications
You must be signed in to change notification settings - Fork 124
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #332 from alerque/autoconf-cleanup
- Loading branch information
Showing
15 changed files
with
275 additions
and
209 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
AC_DEFUN([AX_GIT_VERSION], [ | ||
AC_PROG_AWK | ||
AC_PROG_GREP | ||
AX_PROGVAR([cmp]) | ||
AX_TRANSFORM_PACKAGE_NAME | ||
]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
AC_DEFUN([AX_PROGVAR], [ | ||
test -n "$m4_toupper($1)" || { AC_PATH_PROG(m4_toupper($1), m4_default($2,$1)) } | ||
test -n "$m4_toupper($1)" || AC_MSG_ERROR([m4_default($2,$1) is required]) | ||
]) | ||
test -n "$m4_toupper($1)" || { AC_PATH_PROG(m4_toupper($1), m4_default($2,$1)) } | ||
test -n "$m4_toupper($1)" || AC_MSG_ERROR([m4_default($2,$1) is required]) | ||
]) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
AC_DEFUN_ONCE([AX_SHELL_COMPLETION_DIRS], [ | ||
AX_TRANSFORM_PACKAGE_NAME | ||
AC_ARG_WITH([bash-completion-dir], | ||
AS_HELP_STRING([--with-bash-completion-dir[=PATH]], | ||
[Install the bash auto-completion script in this directory. @<:@default=yes@:>@]), | ||
[], | ||
[with_bash_completion_dir=yes]) | ||
AM_CONDITIONAL([ENABLE_BASH_COMPLETION], | ||
[test "x$with_bash_completion_dir" != "xno"]) | ||
AM_COND_IF([ENABLE_BASH_COMPLETION], | ||
[PKG_CHECK_MODULES([BASH_COMPLETION], [bash-completion >= 2.0], | ||
[BASH_COMPLETION_DIR="$(pkg-config --define-variable=datadir=$datadir --variable=completionsdir bash-completion)"], | ||
[BASH_COMPLETION_DIR="$datadir/bash-completion/completions"])], | ||
[BASH_COMPLETION_DIR="$with_bash_completion_dir"]) | ||
AC_SUBST([BASH_COMPLETION_DIR]) | ||
AC_ARG_WITH([zsh-completion-dir], | ||
AS_HELP_STRING([--with-zsh-completion-dir[=PATH]], | ||
[Install the zsh auto-completion script in this directory. @<:@default=yes@:>@]), | ||
[], | ||
[with_zsh_completion_dir=yes]) | ||
AM_CONDITIONAL([ENABLE_ZSH_COMPLETION], | ||
[test "x$with_zsh_completion_dir" != "xno"]) | ||
AM_COND_IF([ENABLE_ZSH_COMPLETION], | ||
[ZSH_COMPLETION_DIR="$datadir/zsh/site-functions"], | ||
[ZSH_COMPLETION_DIR="$with_zsh_completion_dir"]) | ||
AC_SUBST([ZSH_COMPLETION_DIR]) | ||
]) |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# The autotools supplied AC_ARG_PROGRAM enables renaming operations, but it | ||
# supplies them as a sed operation that can be applied to multiple binaries. | ||
# This isn't convenient to use if we're just renaming the top level package, so | ||
# we go ahead and *do* the transformation and save for use as a substitution. | ||
|
||
AC_DEFUN_ONCE([AX_TRANSFORM_PACKAGE_NAME], [ | ||
AC_PROG_SED | ||
TRANSFORMED_PACKAGE_NAME="$(printf "$PACKAGE_NAME" | $SED -e "$(printf "$program_transform_name" | $SED -e 's/\$\$/\$/')")" | ||
AC_SUBST([TRANSFORMED_PACKAGE_NAME]) | ||
PACKAGE_VAR="$(printf "$PACKAGE_NAME" | $SED -e "s/-/_/g")" | ||
AC_SUBST([PACKAGE_VAR]) | ||
AC_ARG_PROGRAM | ||
]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
.SECONDEXPANSION: | ||
|
||
# EXTRA_@PACKAGE_VAR@_SOURCES += .version | ||
EXTRA_DIST += build-aux/git-version-gen | ||
BUILT_SOURCES += .version | ||
CLEANFILES += .version .version-prev | ||
|
||
_BRANCH_REF != $(AWK) '{print ".git/" $$2}' .git/HEAD 2>/dev/null ||: | ||
.version: $(_BRANCH_REF) | ||
@if [ -e "$(srcdir)/.tarball-version" ]; then \ | ||
printf "$(VERSION)" > $@; \ | ||
else \ | ||
touch "$@-prev"; \ | ||
if [ -e "$@" ]; then \ | ||
cp "$@" "$@-prev"; \ | ||
fi; \ | ||
./build-aux/git-version-gen "$(srcdir)/.tarball-version" > $@; \ | ||
$(CMP) -s "$@" "$@-prev" || autoreconf configure.ac --force; \ | ||
fi | ||
|
||
check-version: check-git-version | ||
|
||
.PHONY: check-git-version | ||
check-git-version: $(PACKAGE_NAME)$(EXEEXT) | .version | ||
$(GREP) -Fx '$(VERSION)' $| | ||
./$< --version | $(GREP) -Ff $| | ||
|
||
installcheck-local-version: | ||
./$(TRANSFORMED_PACKAGE_NAME)$(EXEEXT) --version | ||
|
||
dist-hook: dist-tarball-version | ||
|
||
.PHONY: dist-tarball-version | ||
dist-tarball-version: | ||
printf "$(VERSION)" > "$(distdir)/.tarball-version" | ||
|
||
# vim: ft=automake |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
COMPLETIONS_OUT_DIR = completions | ||
|
||
if ENABLE_BASH_COMPLETION | ||
bashcompletiondir = $(BASH_COMPLETION_DIR) | ||
nodist_bashcompletion_DATA = $(COMPLETIONS_OUT_DIR)/$(TRANSFORMED_PACKAGE_NAME) | ||
CLEANFILES += $(nodist_bashcompletion_DATA) | ||
endif | ||
|
||
# if ENABLE_FISH_COMPLETION | ||
# fishcompletiondir = $(FISH_COMPLETION_DIR) | ||
# nodist_fishcompletion_DATA = $(COMPLETIONS_OUT_DIR)/$(TRANSFORMED_PACKAGE_NAME).fish | ||
# CLEANFILES += $(nodist_fishcompletion_DATA) | ||
# endif | ||
|
||
if ENABLE_ZSH_COMPLETION | ||
zshcompletiondir = $(ZSH_COMPLETION_DIR) | ||
nodist_zshcompletion_DATA = $(COMPLETIONS_OUT_DIR)/_$(TRANSFORMED_PACKAGE_NAME) | ||
CLEANFILES += $(nodist_zshcompletion_DATA) | ||
endif | ||
|
||
# vim: ft=automake |
Oops, something went wrong.