Commit graph

23 commits

Author SHA1 Message Date
rillig
858c6cfd69 mk/misc: make configuration for show-all targets more configurable
Up to now, there was a central list of variable name patterns that
defined whether a variable was printed as a sorted list, as a list or as
a single value.

Now each variable group decides on its own which of the variables are
printed in which way, using the usual glob patterns. This is more
flexible since different files sometimes differ in their naming
conventions.

Two variable groups are added: license (for everything related to
LICENSE) and go (for lang/go).
2018-11-30 18:38:19 +00:00
jlam
a27a11c331 mk/pkgtasks: Bump dependency on "pkgtasks" to 1.15.
This picks up the fix to updating system files correctly so that
ownership and permissions are preserved.
2017-08-23 17:53:32 +00:00
jlam
061d0f5c83 mk/pkgtasks: Fix name of variable for mkfontdir(1) tool. 2017-08-23 17:52:19 +00:00
jlam
9a3ba0d88e mk/pkgtasks: Fix postinstall check to not skip last set of files.
The postinstall check was improperly skipping the last N items
listed in CONF_FILES (and related) variables when verifying that
there is a multiple of N items listed.  Fix the bounds check.
2017-08-19 00:30:55 +00:00
jlam
d7766302ca mk/pkgtasks: Sometimes avoid error if source files don't exist.
The shell code used to check for the existence of the source files
listed in the various CONF_FILES (and related) variables has been
refactored out into a separate macro variable.  In addition, the
macro has been modified to only emit a warning if the source file
is not in ${PREFIX} and can't be found on the host system.

This supports using /dev/null as a source file, which is a common
idiom for creating an empty target file, even if ${DESTDIR} is
non-empty.
2017-08-19 00:30:42 +00:00
jlam
c9ebc4ab2d Bump dependency on pkgtasks to version that supports TASK_VERBOSE.
Pass TASK_VERBOSE=all to the install and deinstall scripts if
PKG_VERBOSE is defined by the user.
2017-08-19 00:30:31 +00:00
jlam
4142027296 mk/pkgtasks: Substitute for variables unconditionally in scripts.
Replace @VAR@ with ${VAR} unconditionally in scripts, even if they
values are empty.  This will allow for fall-through to using the
pkgtasks hard-coded defaults, usually found by searching the PATH
contents, and it avoids having ugly "@VAR@" in the generated
scripts.
2017-08-19 00:29:55 +00:00
jlam
ad2d4d8890 mk/pkgtasks: Failures in POST- stages of the scripts are non-fatal.
The return values of the postinstall and postremove meta-tasks are
ignored unless the user-settable variable ${PKG_FATAL_ERRORS} is
"yes".  ${PKG_FATAL_ERRORS} defaults to "no" to preserve the
existing behavior of install scripts by mk/pkginstall.
2017-08-10 05:41:52 +00:00
jlam
c7a1115c70 mk/pkgtasks: Fix bug in postinstall CONF_FILES assertion.
If ${DESTDIR} was non-empty and the source file was an absolute
path, the postinstall check target defined in mk/pkgtasks/files.mk
was improperly failing.  Fix the bug by only prepending ${PREFIX}
if the source path is relative, and always prepending ${DESTDIR}.
2017-08-10 05:41:23 +00:00
jlam
a8a45f8487 mk/pkgtasks: Add infrastructure to use "icon_themes" package task.
Add definitions for the gtk-update-icon-cache(1) command to the
script header template, and a makefile fragment that creates the
data file for the "icon_themes" package task if ${ICON_THEMES} is
"yes" in the package Makefile.

Also bump pkgtasks dependency to version 1.12 for the "icon_themes"
package task and compatibility with pkgsrc/mk/pkginstall.
2017-08-10 05:41:07 +00:00
jlam
063ad58e6c mk/pkgtasks: Make the assertion comments more obvious. 2017-08-10 05:37:44 +00:00
jlam
b08f5b23a2 mk/pkgtasks: Assert that directories for target files will exist.
For target files listed in CONF_FILES (and other config file
variables), assert that the containing directories are named in
MAKE_DIRS or one of the other directory variables.
2017-08-10 05:37:32 +00:00
jlam
23507fce19 Remove accidentally-committed temporary editor file. 2017-08-10 05:27:01 +00:00
jlam
dedd4c0b82 mk/pkgtasks: Rename some make(1) variables to be more descriptive. 2017-08-10 05:25:10 +00:00
jlam
a981d05eab Fix the value being substituted for TTMKFDIR in install scripts.
@TYPE1INST@ should be replaced with ${TOOLS_PATH.type1inst}.
Before this change, the sed(1) script being generated was not
replaced @TYPE1INST@ at all, and instead generating a no-op
substitution pattern for TTMKFDIR.
2017-06-07 20:24:27 +00:00
jlam
633861d271 Substitute for LDCONFIG_ADD_CMD and LDCONFIG_REMOVE_CMD in scripts.
LDCONFIG_ADD_CMD and LDCONFIG_REMOVE_CMD are set by emulator/*.mk
in order to update the library search paths in the emulated system
directories.  Substitute for those values, but default them to the
empty string so that the default action taken by the "shlibs" task
can be used.
2017-06-07 20:24:19 +00:00
jlam
3521014203 Bump pkgtasks dependency to latest version in pkgtools/pkgtasks. 2017-06-04 00:03:43 +00:00
jlam
3140840fab Be more flexible about adding dependency on pkgtasks.
Check the value of ${USE_PKGTASKS} at the time of reference for
the DEPENDS variable to see whether "pkgtasks" needs to be added
or not.
2017-06-02 19:13:34 +00:00
jlam
e697d677aa Fix typo in makefile comment. 2017-06-02 19:13:26 +00:00
jlam
b73b227f3b Create ${PKG_SYSCONFDIR} automatically in "pkgtasks" framework.
Add missing feature from "pkginstall" framework where the config
directory ${PKG_SYSCONFDIR} was automatically created if one of
the following conditions were true:

* PKG_SYSCONFSUBDIR was defined and non-empty.
* Any configuration files were copied into ${PKG_SYSCONFDIR}.
2017-06-02 16:12:25 +00:00
jlam
c57069d38e Fix check for the proper number of words in config files variables.
Remove unnecessary check for ${_VALID.files} in pkgtasks/files.mk
that was a leftover from old, unused code.
2017-06-02 16:11:47 +00:00
jlam
b86c91739a Remove unused variable definition _PKGTASKS_NEEDARGS from test.mk. 2017-06-02 16:11:24 +00:00
jlam
8e334ba0ec Add "pkgtasks" framework to generate data files used by pkgtasks.
A full dependency on the "pkgtasks" package will be added if a
non-empty data file is generated by the framework.

This framework is not yet hooked into bsd.pkg.mk, pending some
other changes.
2017-06-01 02:06:04 +00:00