summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBertrand Garrigues <bertrand.garrigues@laposte.net>2014-08-18 22:34:01 +0200
committerBertrand Garrigues <bertrand.garrigues@laposte.net>2014-08-18 22:34:01 +0200
commit29d0f55c74030f3be6a48fec2d4ab4374b408b6e (patch)
tree2972aa734c224e4332266a89d06f3a7c399640af
parenta848608d8a36294e73634c575eb46730cbbed45a (diff)
downloadgroff-git-29d0f55c74030f3be6a48fec2d4ab4374b408b6e.tar.gz
src/libs install/uninstall and dist:
- add custom rules to install/uninstall charset.alias - distribute files in src/libs/libgroff that are not compiled (thus not automatically added by automake)
-rw-r--r--TESTS17
-rw-r--r--src/libs/libgroff/libgroff.am51
2 files changed, 63 insertions, 5 deletions
diff --git a/TESTS b/TESTS
index 3cfcd626a..61ab8608c 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.2.tar.gz is generated
+ groff-1.22.2.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 2fcc9bdd4..76cb60995 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