]> git.ipfire.org Git - thirdparty/fcron.git/commitdiff
Use standard autoconf's --docdir (#45) master
authorAlexey Sokolov <alexey+github@asokolov.org>
Sun, 22 Mar 2026 17:41:53 +0000 (17:41 +0000)
committerGitHub <noreply@github.com>
Sun, 22 Mar 2026 17:41:53 +0000 (17:41 +0000)
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 <yo8192@users.noreply.github.com>
Makefile.in
configure.in
doc/Makefile.in

index fefd090ecb5a205102b7dd48005640c5c2d1d590..429c2f4182115b468dc2fde67e081b846b8959c6 100644 (file)
@@ -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)
index 7971c9889efd313cc81ca2be7bf59b3c145060fa..80445de3bd3694c8618b11de4fec37ac6e9adfa7 100644 (file)
@@ -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"
 
index bd053c77c8cd4b667299756cb2c3b169b5b677f9..c5d20e865d09ef6957de9fd064898850049642e5 100644 (file)
 
 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 \