1
0
mirror of https://gitlab.gnome.org/GNOME/libxml2.git synced 2024-10-27 04:55:04 +03:00

Refactor the settings of $docdir

This is a completely noop change for this project, since before this
commit nothing was using $docdir nor PROGRAM_TARNAME.

Setting the fourth parameter of AC_INIT() makes it set PROGRAM_TARNAME,
which then used as the last path component of the default docdir,
effectively making $docdir be the same as the previous
$BASE_DIR/$DOC_MODULE.

Signed-off-by: Mattia Rizzolo <mattia@mapreri.org>
This commit is contained in:
Mattia Rizzolo 2021-07-29 12:11:08 +02:00 committed by Nick Wellnhofer
parent 51c88c6f8d
commit 7c0253aadf
2 changed files with 10 additions and 13 deletions

View File

@ -1273,13 +1273,11 @@ cmake_DATA = libxml2-config.cmake
#
# Install the tests program sources as examples
#
BASE_DIR=$(datadir)/doc
DOC_MODULE=libxml2-$(VERSION)
EXAMPLES_DIR=$(BASE_DIR)/$(DOC_MODULE)/examples
EXAMPLES_DIR=$(docdir)/examples
install-data-local:
$(MKDIR_P) $(DESTDIR)$(BASE_DIR)/$(DOC_MODULE)
-$(INSTALL) -m 0644 $(srcdir)/Copyright $(DESTDIR)$(BASE_DIR)/$(DOC_MODULE)
$(MKDIR_P) $(DESTDIR)$(docdir)
-$(INSTALL) -m 0644 $(srcdir)/Copyright $(DESTDIR)$(docdir)
$(MKDIR_P) $(DESTDIR)$(EXAMPLES_DIR)
-$(INSTALL) -m 0644 $(srcdir)/xmllint.c $(DESTDIR)$(EXAMPLES_DIR)
-$(INSTALL) -m 0644 $(srcdir)/testSAX.c $(DESTDIR)$(EXAMPLES_DIR)
@ -1292,8 +1290,8 @@ uninstall-local:
rm -f $(DESTDIR)$(EXAMPLES_DIR)/testSAX.c
rm -f $(DESTDIR)$(EXAMPLES_DIR)/xmllint.c
rm -rf $(DESTDIR)$(EXAMPLES_DIR)
rm -f $(DESTDIR)$(BASE_DIR)/$(DOC_MODULE)/Copyright
rm -rf $(DESTDIR)$(BASE_DIR)/$(DOC_MODULE)
rm -f $(DESTDIR)$(docdir)/Copyright
rm -rf $(DESTDIR)$(docdir)
tst: tst.c
$(CC) $(CFLAGS) -Iinclude -o tst tst.c .libs/libxml2.a -lpthread -lm -lz -llzma

View File

@ -5,7 +5,7 @@ m4_define([MAJOR_VERSION], 2)
m4_define([MINOR_VERSION], 9)
m4_define([MICRO_VERSION], 12)
AC_INIT([libxml2],[MAJOR_VERSION.MINOR_VERSION.MICRO_VERSION])
AC_INIT([libxml2],[MAJOR_VERSION.MINOR_VERSION.MICRO_VERSION],[],[libxml2-MAJOR_VERSION.MINOR_VERSION.MICRO_VERSION])
AC_CONFIG_SRCDIR([entities.c])
AC_CONFIG_HEADERS([config.h])
AM_MAINTAINER_MODE([enable])
@ -124,13 +124,12 @@ AC_ARG_WITH(html,
[ --with-html add the HTML support (on)])
dnl Specific dir for HTML output ?
AC_ARG_WITH(html-dir, AS_HELP_STRING([--with-html-dir=path],
[path to base html directory, default $datadir/doc/html]),
[HTML_DIR=$withval], [HTML_DIR='$(datadir)/doc'])
[path to base html directory, default $docdir/html]),
[HTML_DIR=$withval], [HTML_DIR='$(docdir)/html'])
AC_ARG_WITH(html-subdir, AS_HELP_STRING([--with-html-subdir=path],
[directory used under html-dir, default $PACKAGE-$VERSION/html]),
[test "x$withval" != "x" && HTML_DIR="$HTML_DIR/$withval"],
[HTML_DIR="$HTML_DIR/\$(PACKAGE)-\$(VERSION)/html"])
[directory used under html-dir, default '']),
[test "x$withval" != "x" && HTML_DIR="$HTML_DIR/$withval"])
AC_SUBST(HTML_DIR)
AC_ARG_WITH(http,
[ --with-http add the HTTP support (on)])