From: Alexey Sokolov Date: Sun, 22 Mar 2026 17:41:53 +0000 (+0000) Subject: Use standard autoconf's --docdir (#45) X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=HEAD;p=thirdparty%2Ffcron.git Use standard autoconf's --docdir (#45) This removes the version from the doc directory name. * Use standard autoconf's --docdir * Initialize autoconf's package name and version They are used as defaults for --docdir * Pass PACKAGE_TARNAME to Makefile No idea why it uses this var instead of PACKAGE * Cleaned up VERSION variables. * Fixed VERSION_QUOTED. --------- Co-authored-by: Thibault Godouet --- diff --git a/Makefile.in b/Makefile.in index fefd090..429c2f4 100644 --- a/Makefile.in +++ b/Makefile.in @@ -71,7 +71,7 @@ OPTION := # Should not be changed under this # #################################### -VERSION := @VERSION@ +VERSION := @PACKAGE_VERSION@ CFLAGS += $(OPTIM) $(OPTION) $(DEFS) $(CPPFLAGS) $(LDFLAGS) ifeq ($(FCRONDYN), 1) LIBOBJS := $(LIBOBJS) diff --git a/configure.in b/configure.in index 7971c98..80445de 100644 --- a/configure.in +++ b/configure.in @@ -5,18 +5,13 @@ dnl --------------------------------------------------------------------- dnl Initial settings dnl --------------------------------------------------------------------- -AC_INIT +AC_INIT([fcron], [3.4.1pre]) AC_CONFIG_SRCDIR([allow.c]) AC_CONFIG_HEADERS([config.h]) AC_PREREQ([2.71]) m4_include([m4/ax_lib_readline.m4]) -vers="3.4.1pre" -vers_quoted="\"$vers\"" -AC_DEFINE_UNQUOTED(VERSION, $vers) -AC_DEFINE_UNQUOTED(VERSION_QUOTED, $vers_quoted) -VERSION="$vers" -AC_SUBST(VERSION) +AC_DEFINE_UNQUOTED(VERSION_QUOTED, "${PACKAGE_VERSION}") copyright_quoted="\"2000-2025\"" AC_DEFINE_UNQUOTED(COPYRIGHT_QUOTED, $copyright_quoted) @@ -398,26 +393,6 @@ PROC=$proc AC_DEFINE_UNQUOTED(PROC, "$proc") fi -docdir="${datadir}/doc" -AC_MSG_CHECKING(location of doc directory) -AC_ARG_WITH(docdir, -[ --with-docdir=PATH Directory containing documentation.], -[ case "$withval" in - no) - AC_MSG_ERROR(Need DOCDIR.) - ;; - yes) - ;; - *) - docdir="$withval" - ;; - esac ]) - -AC_MSG_RESULT($docdir) -DOCDIR="$docdir" -AC_SUBST(DOCDIR) - - dnl systemd init system SYSTEMD_DIR="no" diff --git a/doc/Makefile.in b/doc/Makefile.in index bd053c7..c5d20e8 100644 --- a/doc/Makefile.in +++ b/doc/Makefile.in @@ -13,10 +13,11 @@ SRCDIR = @srcdir@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ prefix = @prefix@ datarootdir = @datarootdir@ DESTMAN = @mandir@ -DESTDOC = @DOCDIR@ +DESTDOC = @docdir@ INSTALL = @INSTALL@ JADE = @JADE@ @@ -33,7 +34,7 @@ ANSWERALL = @ANSWERALL@ #################################### STYLESHEET = stylesheets/fcron-doc.dsl MODFILE = fcron-doc.mod -VERSION = @VERSION@ +VERSION = @PACKAGE_VERSION@ SGMLFILES = fcron-doc.sgml readme.sgml relnotes.sgml changes.sgml faq.sgml thanks.sgml todo.sgml fcron.8.sgml fcrontab.1.sgml install.sgml fcron.conf.5.sgml fcrontab.5.sgml fcrondyn.1.sgml fdl.sgml gpl.sgml TXTFILES = readme install thanks faq gpl todo relnotes changes MANPAGES = fcron.8 fcron.conf.5 fcrontab.1 fcrontab.5 fcrondyn.1 @@ -61,10 +62,10 @@ doc-if-none: # and not a tarball) # The reason we don't try to generate the doc everytime is that we want the user # to be able to compile and install fcron without needing all the tools required -# to generate the documentations. +# to generate the documentations. # # "make doc" will be called once at max, as all the tests will -# succeed after the first time "make doc" is called +# succeed after the first time "make doc" is called @(for i in $(LANGUAGES); \ do \ test -f $(SRCDIR)/$$i/HTML/index.html || $(MAKE) doc ; \ @@ -134,11 +135,11 @@ install-staged: doc-if-none clean done ; \ done ) - @(echo "Installing documentation files in $(DESTDIR)$(DESTDOC)/fcron-$(VERSION)...") - @(if test ! -d $(DESTDIR)$(DESTDOC)/fcron-$(VERSION); then $(INSTALL) -m 755 -d $(DESTDIR)$(DESTDOC)/fcron-$(VERSION) ; fi) + @(echo "Installing documentation files in $(DESTDIR)$(DESTDOC)...") + @(if test ! -d $(DESTDIR)$(DESTDOC); then $(INSTALL) -m 755 -d $(DESTDIR)$(DESTDOC) ; fi) @(for l in $(LANGUAGES); do \ - DIR=$(DESTDIR)$(DESTDOC)/fcron-$(VERSION) ; \ + DIR=$(DESTDIR)$(DESTDOC) ; \ if test ! -d $$DIR/$$l; then \ $(INSTALL) -m 755 -d $$DIR/$$l ; \ fi ; \ @@ -173,10 +174,8 @@ perms: done chown $(ROOTNAME) $(DESTDIR)$(DESTDOC) chgrp $(ROOTGROUP) $(DESTDIR)$(DESTDOC) - chown $(ROOTNAME) $(DESTDIR)$(DESTDOC)/fcron-$(VERSION) - chgrp $(ROOTGROUP) $(DESTDIR)$(DESTDOC)/fcron-$(VERSION) for l in $(LANGUAGES); do \ - DIR=$(DESTDIR)$(DESTDOC)/fcron-$(VERSION)/$$l ; \ + DIR=$(DESTDIR)$(DESTDOC)/$$l ; \ chown $(ROOTNAME) $$DIR ; \ chgrp $(ROOTGROUP) $$DIR ; \ for i in txt HTML; do \ @@ -189,7 +188,7 @@ perms: uninstall: - rm -fR $(DESTDOC)/fcron-$(VERSION) + rm -fR $(DESTDOC) @(echo "Removing man pages ...") @(for l in $(LANGUAGES); do \ if test "x$$l" = "xen"; then \