-SUBDIRS = include src tools tests doc
+SUBDIRS = include src tools tests doc bash-completion
ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS}
headers = config.h
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = libabigail.pc
+#bashcompletiondir = $(datadir)/bash-completion/completions
+#dist_bashcompletion_DATA =
+
EXTRA_DIST = \
README COPYING ChangeLog \
COPYING-LGPLV2 COPYING-LGPLV3 \
--- /dev/null
+#if ENABLE_BASH_COMPLETION
+EXTRA_DIST = \
+abicompat \
+abidiff \
+abidw \
+abilint \
+abinilint \
+abipkgdiff \
+abisym
+#endif
--- /dev/null
+_abicompat_module()
+{
+ local cur prev OPTS
+ COMPREPLY=()
+ cur="${COMP_WORDS[COMP_CWORD]}"
+ prev="${COMP_WORDS[COMP_CWORD-1]}"
+ case $prev in
+ '--app-debug-info-dir'|'--lib-debug-info-dir1'|'--lib-debug-info-dir2')
+ local IFS=$'\n'
+ compopt -o dirnames
+ COMPREPLY=( $(compgen -d -- $cur) )
+ return 0
+ ;;
+ '--suppressions')
+ local IFS=$'\n'
+ compopt -o filenames
+ COMPREPLY=( $(compgen -f -- $cur) )
+ return 0
+ ;;
+ '--drop' | '--drop-fn' | '--drop-var' | '--keep' | '--keep-fn' | '--keep-var')
+ #'--{drop,keep}{,-fn,-var}')
+ COMPREPLY=( $(compgen -W "string" -- $cur) )
+ return 0
+ ;;
+ esac
+ case $cur in
+ -*)
+ #TODO: not done, short options missing etc..
+ OPTS=" --app-debug-info-dir1
+ --help
+ --lib-debug-info-dir1
+ --lib-debug-info-dir2
+ --list-undefined-symbols
+ --no-redundant
+ --redundant
+ --show-base-names
+ --suppressions
+ --weak-mode"
+ COMPREPLY=( $(compgen -W "${OPTS[*]}" -- $cur) )
+ return 0
+ ;;
+ esac
+ local IFS=$'\n'
+ compopt -o filenames
+ COMPREPLY=( $(compgen -f -- $cur) )
+ return 0
+}
+complete -F _abicompat_module abicompat
--- /dev/null
+_abidiff_module()
+{
+ local cur prev OPTS
+ COMPREPLY=()
+ cur="${COMP_WORDS[COMP_CWORD]}"
+ prev="${COMP_WORDS[COMP_CWORD-1]}"
+ case $prev in
+ '--d1'|'--d2'|'--debug-info-dir1'|'--debug-info-dir2')
+ local IFS=$'\n'
+ compopt -o dirnames
+ COMPREPLY=( $(compgen -d -- $cur) )
+ return 0
+ ;;
+ '--suppressions'|'--suppr')
+ local IFS=$'\n'
+ compopt -o filenames
+ COMPREPLY=( $(compgen -f -- $cur) )
+ return 0
+ ;;
+ '--drop' | '--drop-fn' | '--drop-var' | '--keep' | '--keep-fn' | '--keep-var')
+ #'--{drop,keep}{,-fn,-var}')
+ COMPREPLY=( $(compgen -W "string" -- $cur) )
+ return 0
+ ;;
+ esac
+ case $cur in
+ -*)
+ OPTS=" --added-fns
+ --added-vars
+ --changed-fns
+ --changed-vars
+ --d1
+ --d2
+ --debug-info-dir1
+ --debug-info-dir2
+ --deleted-fns
+ --deleted-vars
+ --drop
+ --drop-fn
+ --drop-var
+ --dump-diff-tree
+ --harmless
+ --help
+ --keep
+ --keep-fn
+ --keep-var
+ --no-harmful
+ --no-linkage-name
+ --no-redundant
+ --no-unreferenced-symbols
+ --redundant
+ --stat
+ --symtabs"
+ COMPREPLY=( $(compgen -W "${OPTS[*]}" -- $cur) )
+ return 0
+ ;;
+ esac
+ local IFS=$'\n'
+ compopt -o filenames
+ COMPREPLY=( $(compgen -f -- $cur) )
+ return 0
+}
+complete -F _abidiff_module abidiff
--- /dev/null
+_abidw_module()
+{
+ local cur prev OPTS
+ COMPREPLY=()
+ cur="${COMP_WORDS[COMP_CWORD]}"
+ prev="${COMP_WORDS[COMP_CWORD-1]}"
+ case $prev in
+ '-d'|'--debug-info-dir')
+ local IFS=$'\n'
+ compopt -o dirnames
+ COMPREPLY=( $(compgen -d -- $cur) )
+ return 0
+ ;;
+ '--check-alternative-debug-info' | '--check-alternative-debug-info-base-name')
+ # TODO: perhaps limit this to ar-s and elf-s
+ local IFS=$'\n'
+ compopt -o filenames
+ COMPREPLY=( $(compgen -f -- $cur) )
+ return 0
+ ;;
+ '--out-file')
+ local IFS=$'\n'
+ compopt -o filenames
+ COMPREPLY=( $(compgen -f -- $cur) )
+ return 0
+ ;;
+ esac
+ case $cur in
+ -*)
+ OPTS=" --abidiff
+ --debug-info-dir
+ --check-alternative-debug-info
+ --check-alternative-debug-info-base-name
+ --help
+ --load-all-types
+ --no-architecture
+ --noout
+ --out-file
+ --stats"
+ COMPREPLY=( $(compgen -W "${OPTS[*]}" -- $cur) )
+ return 0
+ ;;
+ esac
+ local IFS=$'\n'
+ compopt -o filenames
+ COMPREPLY=( $(compgen -f -- $cur) )
+ return 0
+}
+complete -F _abidw_module abidw
--- /dev/null
+_abilint_module()
+{
+ local cur prev OPTS
+ COMPREPLY=()
+ cur="${COMP_WORDS[COMP_CWORD]}"
+ prev="${COMP_WORDS[COMP_CWORD-1]}"
+ case $prev in
+ '-d'|'--debug-info-dir')
+ local IFS=$'\n'
+ compopt -o dirnames
+ COMPREPLY=( $(compgen -d -- $cur) )
+ return 0
+ ;;
+ esac
+ case $cur in
+ -*)
+ OPTS=" --idiff
+ --debug-info-dir
+ --help
+ --noout
+ --stdin
+ --tu"
+ COMPREPLY=( $(compgen -W "${OPTS[*]}" -- $cur) )
+ return 0
+ ;;
+ esac
+ local IFS=$'\n'
+ compopt -o filenames
+ COMPREPLY=( $(compgen -f -- $cur) )
+ return 0
+}
+complete -F _abilint_module abilint
--- /dev/null
+_abinilint_module()
+{
+ local cur prev OPTS
+ COMPREPLY=()
+ cur="${COMP_WORDS[COMP_CWORD]}"
+ prev="${COMP_WORDS[COMP_CWORD-1]}"
+ case $cur in
+ -*)
+ OPTS=" --help
+ --noout
+ --from-stdin"
+ COMPREPLY=( $(compgen -W "${OPTS[*]}" -- $cur) )
+ return 0
+ ;;
+ esac
+ local IFS=$'\n'
+ compopt -o filenames
+ COMPREPLY=( $(compgen -f -- $cur) )
+ return 0
+}
+complete -F _abinilint_module abinilint
--- /dev/null
+_abipkgdiff_module()
+{
+ local cur prev OPTS
+ COMPREPLY=()
+ cur="${COMP_WORDS[COMP_CWORD]}"
+ prev="${COMP_WORDS[COMP_CWORD-1]}"
+ case $prev in
+ '--d1'|'--d2'|'--debug-info-dir1'|'--debug-info-dir2')
+ local IFS=$'\n'
+ compopt -o dirnames
+ COMPREPLY=( $(compgen -d -- $cur) )
+ return 0
+ ;;
+ '--suppressions'|'--suppr')
+ local IFS=$'\n'
+ compopt -o filenames
+ COMPREPLY=( $(compgen -f -- $cur) )
+ return 0
+ ;;
+ esac
+ case $cur in
+ -*)
+ OPTS=" --d1
+ --d2
+ --debug-info-dir1
+ --debug-info-dir2
+ --dso-only
+ --help
+ --keep-tmp-files
+ --no-added-binaries
+ --no-linkage-name
+ --redundant
+ --suppr
+ --suppressions
+ --verbose"
+ COMPREPLY=( $(compgen -W "${OPTS[*]}" -- $cur) )
+ return 0
+ ;;
+ esac
+ local IFS=$'\n'
+ compopt -o filenames
+ COMPREPLY=( $(compgen -f -- $cur) )
+ return 0
+}
+complete -F _abipkgdiff_module abipkgdiff
--- /dev/null
+_abisym_module()
+{
+ local cur prev OPTS
+ COMPREPLY=()
+ cur="${COMP_WORDS[COMP_CWORD]}"
+ prev="${COMP_WORDS[COMP_CWORD-1]}"
+ case $cur in
+ -*)
+ OPTS=" --help
+ --demangle
+ --no-absolute-path"
+ COMPREPLY=( $(compgen -W "${OPTS[*]}" -- $cur) )
+ return 0
+ ;;
+ esac
+ local IFS=$'\n'
+ compopt -o filenames
+ COMPREPLY=( $(compgen -f -- $cur) )
+ return 0
+}
+complete -F _abisym_module abisym
ENABLE_MANUAL=$enableval,
ENABLE_MANUAL=auto)
+AC_ARG_ENABLE([bash-completion],
+ AS_HELP_STRING([--enable-bash-completion=yes|no|auto],
+ [enable using completion files for tools]),
+ ENABLE_BASH_COMPLETION=$enableval,
+ ENABLE_BASH_COMPLETION=auto)
+
dnl *************************************************
dnl check for dependencies
dnl *************************************************
AM_CONDITIONAL(ENABLE_TAR, test x$ENABLE_TAR = xyes)
+dnl Check for the bash-completion package
+if test x$ENABLE_BASH_COMPLETION = xauto -o x$ENABLE_BASH_COMPLETION = xyes; then
+ AC_CHECK_PROG(HAS_BASH_COMPLETION, bash-completion, yes, no)
+
+ if test x$ENABLE_BASH_COMPLETION = xauto; then
+ if test x$HAS_BASH_COMPLETION = xyes; then
+ ENABLE_BASH_COMPLETION=yes
+ fi
+ fi
+fi
+
+if test x$ENABLE_BASH_COMPLETION = xyes; then
+ AC_MSG_NOTICE(bash-completion support in libabigail is enabled);
+else
+ AC_MSG_NOTICE(bash-completion support in libabigail is disabled);
+fi
+
+AM_CONDITIONAL(ENABLE_BASH_COMPLETION, test x$ENABLE_BASH_COMPLETION = xyes)
+
dnl Check for dependency: libzip
LIBZIP_VERSION=0.10.1
src/Makefile
tools/Makefile
tests/Makefile
- tests/data/Makefile])
+ tests/data/Makefile
+ bash-completion/Makefile])
dnl Some test scripts are generated by autofoo.
AC_CONFIG_FILES([tests/runtestcanonicalizetypes.sh], [chmod +x tests/runtestcanonicalizetypes.sh])
Enable rpm support in abipkgdiff : ${ENABLE_RPM}
Enable deb support in abipkgdiff : ${ENABLE_DEB}
Enable GNU tar archive support in abipkgdiff : ${ENABLE_TAR}
+ Enable bash completion : ${ENABLE_BASH_COMPLETION}
Generate html apidoc : ${ENABLE_APIDOC}
Generate html manual : ${ENABLE_MANUAL}
])
The upstream code repository of Libabigail contains several tools
written using the library. They are maintained and released as part
-of the project.
+of the project. All tools come with a bash-completion script.
Tools manuals
=============