bgarrigues pushed a commit to branch automake3 in repository groff. commit aee29f71a59dd309d430dd74414188749d5fc7be Author: Bertrand Garrigues <bertrand.garrig...@laposte.net> Date: Mon Aug 18 22:34:01 2014 +0200
* src/libs/libgroff/libgroff.am: Add custom rules to install/uninstall charset.alias. Distribute files in src/libs/libgroff that are not compiled (thus not automatically added by automake). --- TESTS | 17 +++++++++---- src/libs/libgroff/libgroff.am | 51 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 63 insertions(+), 5 deletions(-) diff --git a/TESTS b/TESTS index de00a45..fb78922 100644 --- a/TESTS +++ b/TESTS @@ -113,15 +113,21 @@ The following files remains (this is expected): 2.6 make install - To be checked + mkdir -p ~/tmp/automake + make install DESTDIR=~/tmp/automake + + - If file charset.alias is always present in + $(DESTDIR)/usr/local/lib, make install update it by adding 'groff' + to the list of programs using it. Otherwise nothing is installed. 2.7 make uninstall - To be checked + - Removes $(DESTDIR)/usr/local/lib/charset.alias if exists 2.8 make dist - groff-1.22.3.tar.gz is generated + groff-1.22.3.tar.gz is generated. src/libs .c, .cpp and .am files + are present. - Files/directories that are not distributed on purpose: .gitignore @@ -138,7 +144,7 @@ The following files remains (this is expected): doc/ font/ man/ - src/* (except include): src/libs .c .cpp are missing + src/include (except config.hin and include.am) tmac test-groff.in @@ -155,7 +161,8 @@ The following files remains (this is expected): 2.9 make distcheck - - fails (src/libs sources are missing) + - configure fails: src/roff/groff/groff.cpp is missing (passed to + AC_CONFIG_SRCDIR macro) Notes ----- diff --git a/src/libs/libgroff/libgroff.am b/src/libs/libgroff/libgroff.am index 2fcc9bd..76cb609 100644 --- a/src/libs/libgroff/libgroff.am +++ b/src/libs/libgroff/libgroff.am @@ -76,6 +76,23 @@ libgroff_a_SOURCES = \ src/libs/libgroff/relocatable.h nodist_libgroff_a_SOURCES = src/libs/libgroff/version.cpp +# TODO: these .c files could be removed (use gnulib instead), same +# thing for snprintf. +EXTRA_DIST += \ + src/libs/libgroff/mkstemp.cpp \ + src/libs/libgroff/fmod.c \ + src/libs/libgroff/getcwd.c \ + src/libs/libgroff/putenv.c \ + src/libs/libgroff/strcasecmp.c \ + src/libs/libgroff/strerror.c \ + src/libs/libgroff/strncasecmp.c \ + src/libs/libgroff/strtol.c \ + src/libs/libgroff/config.charset \ + src/libs/libgroff/ref-add.sin \ + src/libs/libgroff/ref-del.sin \ + src/libs/libgroff/make-uniuni \ + src/libs/snprintf/snprintf.c + src_version=`cat $(top_srcdir)/VERSION` src_revision=`cat $(top_srcdir)/REVISION` @@ -119,3 +136,37 @@ ref-del.sed : $(libgroff_srcdir)/ref-del.sin sed -e '/^#/d' \ -e 's/@''PACKAGE''@/$(LIBGROFF_PACKAGE)/g' $(libgroff_srcdir)/ref-del.sin > t-$@ mv t-$@ $@ + +install-data-local: install_charset_data +install_charset_data: + -test $(GLIBC21) != no || $(mkinstalldirs) $(DESTDIR)$(libdir) + if test -f $(DESTDIR)$(libdir)/charset.alias; then \ + sed -f ref-add.sed $(DESTDIR)$(libdir)/charset.alias \ + > $(DESTDIR)$(libdir)/t-charset.alias; \ + $(INSTALL_DATA) $(DESTDIR)$(libdir)/t-charset.alias \ + $(DESTDIR)$(libdir)/charset.alias; \ + rm -f $(DESTDIR)$(libdir)/t-charset.alias; \ + else \ + if test $(GLIBC21) = no; then \ + sed -f ref-add.sed charset.alias \ + > $(DESTDIR)$(libdir)/t-charset.alias; \ + $(INSTALL_DATA) $(DESTDIR)$(libdir)/t-charset.alias \ + $(DESTDIR)$(libdir)/charset.alias; \ + rm -f $(DESTDIR)$(libdir)/t-charset.alias; \ + fi; \ + fi + +uninstall-local: uninstall_charset_data +uninstall_charset_data: + -if test -f $(DESTDIR)$(libdir)/charset.alias; then \ + sed -f ref-del.sed $(DESTDIR)$(libdir)/charset.alias \ + > $(DESTDIR)$(libdir)/t-charset.alias; \ + if grep '^# Packages using this file: $$' \ + $(DESTDIR)$(libdir)/t-charset.alias > /dev/null; then \ + rm -f $(DESTDIR)$(libdir)/charset.alias; \ + else \ + $(INSTALL_DATA) $(DESTDIR)$(libdir)/t-charset.alias \ + $(DESTDIR)$(libdir)/charset.alias; \ + fi; \ + rm -f $(DESTDIR)$(libdir)/t-charset.alias; \ + fi _______________________________________________ Groff-commit mailing list Groff-commit@gnu.org https://lists.gnu.org/mailman/listinfo/groff-commit