Commit graph

5 commits

Author SHA1 Message Date
Kelvin M. Klann
891fd02701 build: add new TARNAME variable
That expands to `@PACKAGE_TARNAME@`, similar to the existing
PACKAGE_TARNAME variable.

To make it easier to use (and read) and to be more consistent with the
surrounding variables (NAME and VERSION).

Note that the original PACKAGE_TARNAME is still needed, as by default
(on autoconf v2.69) `docdir=@docdir@` in config.mk.in expands to the
following in config.mk:

    docdir=${datarootdir}/doc/${PACKAGE_TARNAME}
2022-08-14 02:17:39 -03:00
Kelvin M. Klann
f08c378d5a config.sh.in: fix all issues reported by shellcheck
Fix the following error and warnings:

    $ shellcheck --version | grep ^version:
    version: 0.8.0
    $ shellcheck config.sh.in

    In config.sh.in line 1:
    # @configure_input@
    ^-- SC2148 (error): Tips depend on target shell and yours is unknown. Add a shebang or a 'shell' directive.

    In config.sh.in line 3:
    NAME=@PACKAGE_NAME@
    ^--^ SC2034 (warning): NAME appears unused. Verify use (or export if used externally).

    In config.sh.in line 4:
    VERSION=@PACKAGE_VERSION@
    ^-----^ SC2034 (warning): VERSION appears unused. Verify use (or export if used externally).

    For more information:
      https://www.shellcheck.net/wiki/SC2148 -- Tips depend on target shell and y...
      https://www.shellcheck.net/wiki/SC2034 -- NAME appears unused. Verify use (...

Relates to #5140.
2022-08-01 20:33:10 -03:00
Kelvin M. Klann
f1f40cbaa3 config.sh.in: quote all variables
Output variables in general may contain values with spaces in them.
Example: `CC=gcc -foo`.

Relates to #5140.
2022-08-01 20:31:39 -03:00
Kelvin M. Klann
8fc604f5f0 build: add autoconf auto-generation comment to input files
To note on the output files that they are generated and to clarify how
they are generated.

From the manual of GNU Autoconf (version 2.69):

>  -- Variable: configure_input
>      A comment saying that the file was generated automatically by
>      'configure' and giving the name of the input file.  'AC_OUTPUT'
>      adds a comment line containing this variable to the top of every
>      makefile it creates.  For other files, you should reference this
>      variable in a comment at the top of each input file.  For
>      example, an input shell script should begin like this:
>
>           #!/bin/sh
>           # @configure_input@
>
>      The presence of that line also reminds people editing the file
>      that it needs to be processed by 'configure' in order to be used.

Resulting output on config.mk:

    # config.mk.  Generated from config.mk.in by configure.

Relates to #5140.
2022-07-16 01:07:40 -03:00
Kelvin M. Klann
95bfe7d71b mkdeb.sh.in: move configure-time vars into new config.sh.in
For better organization and so that they can be used by other shell
scripts by just sourcing config.sh.
2022-06-12 16:08:47 -03:00