Commit graph

86 commits

Author SHA1 Message Date
rillig
e6a3d9d52d mk/developer.mk: reorganize documentation for 'make cce'
In most cases, the command 'make cce' is all that is needed to add a
changes entry, so put it at the top of the documentation.  The smaller
steps are useful when updating multiple packages at once, which is less
often the case.

Make the possible values for CTYPE stand out, instead of hiding them in
the body text.
2022-06-16 04:56:49 +00:00
gutteridge
3fa020f93b developer.mk: improve a comment 2021-01-20 01:35:33 +00:00
gdt
6006036ac8 mk/misc/show.mk: Only advise changing user-settable variables
Before, it was easy for a user to misinterpret the message as
e.g. setting PYPACKAGE for gnome-doc-utils.
2021-01-13 18:01:49 +00:00
rillig
cb1ef433f4 show-all: explain how to show the values of tricky variables
In most cases, the output of "bmake show-all" is reliable, but in a few
edge cases there may still be surprises.
2020-12-14 00:14:48 +00:00
rillig
fb1dd6fb9d show-all: use descriptive variable names
The show-all code is mostly line noise, therefore it is all the more
important to provide at least a few hints to a potential reader, by
using descriptive variable names for the iteration variables:

	g => grp
	c => cat
	v => var
	w => width
	x => word
2020-09-12 21:27:15 +00:00
rillig
40c4b60f02 show-all: use separator for long rows of backslashes
I had been confused by the printf commands since some of them used '\n'
and some used '\\\n', which seemed as if there were some quoting issue
that would make it necessary to double the backslashes.

This assumption was wrong though.  The printf commands for the
single-valued variables use the normal '\n', while the lines for the
multi-valued variables end with a real backslash in the output, to
mimick the continuation lines in makefiles.

As a hint that the '\\\n' means backslash + newline, add single quotes
between the two characters.
2020-09-12 21:00:10 +00:00
rillig
b234c33c38 show-all: fix escaping of '$' in variable modifiers
The previous code relied on the exact implementation of Var_Parse in
bmake, and that it does not issue any error messages in case of $$ in
variable modifiers.

In variable modifiers, a $ is escaped using \$, not $$, as documented in
the manual page.

At the time when I wrote the previous version with the _SHOW_ALL.d4 and
_SHOW_ALL.d8 hacks, I did not know about the backslash escaping rule,
and I just added dollar signs until everything seemed to work.  I
couldn't explain why it worked though, which is not surprising since the
code was using an undocumented implementation flaw of bmake.
2020-09-12 20:48:13 +00:00
rillig
e806a92e54 mk/misc/show.mk: fix reference to further documentation 2020-07-04 18:08:35 +00:00
rillig
488f9fbd90 show-all: fix typo in variable name
The width only applies to a single group, not to several or even all
groups.
2020-07-01 09:13:12 +00:00
rillig
d10b39c41d mk/buildlink3: increase width of varnames in show-all-bl3
The buildlink3 variable names are quite long.  So long that using the
default column width of 24 characters, most of the variable values are
not aligned.  In this case, it makes sense to shift them all to the right
a bit.
2020-07-01 07:39:52 +00:00
rillig
026854da4d mk: move locking.mk from internal to misc
Locking is not really internal since it has user-settable variables.
2020-05-10 06:52:49 +00:00
rillig
363de64c50 mk/misc/can-be-built-here.mk: remove NOT_FOT_UNPRIVILEGED
It is unused, and its error message wrongly said "only for unprivileged",
which nobody complained about for 13 years.
2020-04-26 06:56:29 +00:00
rillig
d0c3b5301f mk/misc/show.mk: prevent unnecessary .for loop expansion
The .for loops are expanded by bmake as soon as they are parsed. Since
there are many variable groups, and since each of these groups has
several variables, this takes quite a bit of time.

The time for running "bmake clean" in pkgtools/pkglint went down from 1.0
second to 0.7 seconds. This may not seem much, but when multiplied with
23088 times 9, this little change may speed up a full bulk build by 62000
seconds, which is about 18 hours.

The side-effect is that the show-all-* targets can only be run from the
command line, not as a dependency of other targets. This restriction will
probably go unnoticed.
2020-03-30 22:49:30 +00:00
rillig
caf5567d50 show-all: fix output for list variables containing dollar characters
Before, variables containing dollar characters displayed so wrong that it
was hard to explain.

To fix the problem, I typed almost random characters into the code until
the output was exactly as expected. I still do not understand:

* why the list variables need 8 dollars to survive the @x@ loop,
* why the code only works if the dollars come from an external variable
  instead of being written inline,
* why the backslash in the :C modifier needs to be doubled.

Anyway, the output of "bmake show-all-extract" now contains the shell
variable $${extract_file}, just as it should. The dollars are now doubled
in the output and thereby match the source code from the Makefile
exactly.
2020-03-20 16:39:03 +00:00
rillig
f8efb25323 mk/misc/show.mk: document how to explicitly mark variables as ignored
An upcoming check in pkglint will require that if a file has a _VARGROUPS
section, it must contain the full truth, mentioning every variable that
is used or defined in the file.

Some variables may be so internal though that they are not interesting in
any scenario for understanding what goes on in the file. These variables
can be explicitly ignored. They will not be listed by "bmake show-all" and
pkglint will not complain about them.
2019-09-08 09:01:04 +00:00
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
rillig
f37f30c061 mk/misc: adjust layout of the show-all output to pkgsrc format
In Makefiles, the variable values are aligned vertically. This format is
now also used in the show-all target, which makes it easier readable.

Some more variables have been marked as multi-value, and single-valued
variables ending in space are clearly marked. Without the latter, the
regression test would have a line with significant trailing whitespace.
2018-11-11 19:07:12 +00:00
rillig
8f1611a664 mk/misc: in show-all, list values of *_ENV and *_ARGS in separate lines
The *_ENV and *_ARG values are typically very long, and reading them in
a single line is unnecessarily difficult. Therefore, each of their
values is listed on a separate line, for example:

fetch:
  usr   DIST_PATH (undefined)
  pkg   MASTER_SITES = \
                http://ftp.gnome.org/pub/GNOME/sources/glib/2.56/ \
                ftp://ftp.gnome.org/pub/GNOME/sources/glib/2.56/ \
                ftp://ftp.cse.buffalo.edu/pub/Gnome/sources/glib/2.56/ \
                https://download.gnome.org/sources/glib/2.56/ \
                # end of MASTER_SITES
  pkg   DIST_SUBDIR (undefined)
2018-11-10 10:40:55 +00:00
rillig
d578ca80ec Fix whitespace issues reported by pkglint 2018-10-08 20:35:00 +00:00
rillig
d01040b2f7 mk/misc/show.mk: improve wording of the help text 2018-05-28 22:34:47 +00:00
rillig
db16752718 mk/*: improve documentation for "make help" 2018-05-16 21:23:02 +00:00
rillig
d77131ac6a mk/misc/show.mk: document the show-all-* targets 2018-02-26 22:51:42 +00:00
rillig
06317929ae Improved documentation for "make help".
The check for target(help) prevents a warning when "make help" is run from
a category directory.
2018-01-07 11:23:37 +00:00
wiz
694ba19af5 mk: remove import target
While it would be useful, the current implementation has not been
updated even to use 'cvs add' instead of 'cvs import' (policy change
in 2012). Use the import-package.sh script currently residing in wip/
instead.
2017-09-16 09:34:25 +00:00
wiz
901afb5669 mk/misc/developer.mk: improve commit message
Commits to doc/ might also affect the TODO file, so use
"doc: " instead of "CHANGES-2017: " as default prefix.

Suggested by jperkin.
2017-09-13 09:06:34 +00:00
wiz
b24bc849af mk/bsd.pkg.mk: Adapt changes-entry target
Prefix package name to commit message.
2017-09-12 14:04:59 +00:00
wiz
ad3aa52d45 Run mk/scripts/mkreadme in quiet mode by default. 2016-07-11 22:53:48 +00:00
jperkin
7d86d7dff0 Uniq BUILD_DEFS and BUILD_DEFS_EFFECTS before printing. 2015-01-30 16:45:33 +00:00
dholland
de73f20ecb Add support for BROKEN_ON_PLATFORM and BROKEN_EXCEPT_ON_PLATFORM, as per
discussion on tech-pkg.

BROKEN_ON_PLATFORM and NOT_FOR_PLATFORM are the same, except that
(now) BROKEN_ON_PLATFORM sets PKG_FAIL_REASON and NOT_FOR_PLATFORM
sets PKG_SKIP_REASON. BROKEN_EXCEPT_FOR_PLATFORM and ONLY_FOR_PLATFORM
correspond in the same way.

The idea is that going forward we will distinguish unbuildable
packages that theoretically ought to be fixed (these are BROKEN) from
packages where it doesn't make sense to build (these are NOT_FOR)...
examples of the former include most non-64-bit-clean packges; examples
of the latter include OS-specific language bindings.

A general review of the uses of NOT_FOR_PLATFORM and ONLY_FOR_PLATFORM
(converting many of them to BROKEN...) is coming up.

Similarly, a general review of the uses of PKG_FAIL_REASON and
PKG_SKIP_REASON is coming up.

For this to become useful, pbulk needs to be taught to report failing
and skipped packages differently - the idea is that failing packages
should be reported up front and skipped packages don't need to be. This
has not been done yet, but one set of things at a time...
2015-01-01 06:06:06 +00:00
wiz
627d407a75 Remove pkg_views support, second part: infrastructure. 2014-12-30 15:13:19 +00:00
wiz
c9122e82ab Remove old bulk build code. Use pbulk. 2014-06-02 10:24:05 +00:00
obache
b95f24e41f Use ${NETBSD_LOGIN_NAME} for ssh. 2014-02-22 13:11:22 +00:00
obache
17f5e8a221 Add upload-distfiles target for PKG_DEVELOPER, for uploading missing distfiles
to our backup ftp server.
2014-02-20 10:12:22 +00:00
rillig
ba174d0c2f Small grammar fixes in the comment. 2013-08-31 20:54:07 +00:00
obache
8748a0d54c Move show-depends-options again, to be worked form non-option packages. 2013-06-07 00:41:39 +00:00
joerg
af3cbe2308 Allow running on systems where pkg_admin is not in PATH 2013-04-12 13:53:57 +00:00
obache
7072cb4ef3 Experimental support of manifest files for Windows UAC.
For Windows Vista or later, executable files including special keywords
(install, update, patch, and so on) in its name are expected as requireing
privileged permissions by default (UAC).
If not, it must be specified with manifest file, or it will be failed to
execute as "Permission denied".
2013-02-10 13:04:08 +00:00
joerg
80afa9e068 Use first entry of CATEGORIES as default CATEGORY. 2011-11-13 23:09:17 +00:00
joerg
3cf9355a88 If importing into an existing directory, remove the content first. 2011-11-13 23:04:41 +00:00
joerg
6795580ad6 Allow empty FROM to actually work. Allow importing from the target
location in pkgsrc, it is after all the natural place for testing new
imports. Don't try to remove a file named after the import message, it
won't exist.

XXX Needs more work for the second case to remove the files before
XXX running cvs up
2011-11-13 22:52:43 +00:00
joerg
8d92196f4e Don't bail out with parse error if _EXPERIMENTAL isn't set. 2011-11-13 22:28:03 +00:00
wiz
fd9723646f Update description for cce, from Snader_LB. 2011-09-15 21:45:52 +00:00
abs
fc3bada41a Introduce PKGSRC_SETENV, defaulting to SETENV. Can be set to ${SETENV} -i
to santise environment
2011-09-08 20:17:15 +00:00
joerg
d8f9a8b0ce Add USE_NETBSD_REPO option to force make cce and friends to use the
main repository. Very useful when using a local copy of the repository
for normal operation.
2009-08-23 18:09:45 +00:00
wiz
89131fecc2 Make cce depend on todo-entry-remove as well. 2009-08-21 23:34:42 +00:00
wiz
71c2cba0e6 When making an entry to the CHANGES-* file using 'make changes-entry',
the target now automatically also removes any TODO entries for the
package that was updated.

Script improved based on version by dholland; further suggestions
by gdt and joerg.
2009-08-21 12:51:07 +00:00
rillig
5d5d020850 Documented the trap into which I had just fallen. 2009-07-28 07:01:56 +00:00
rillig
99fbe40af6 Added an experimental target "import" that makes it easier to import
packages from pkgsrc-wip and other sources.
2009-07-26 21:36:38 +00:00
rillig
d04f057795 Documented BUILD_DEFS and BUILD_DEFS_EFFECTS. 2008-11-19 08:06:36 +00:00
rillig
5388235d5a typo 2008-11-05 08:24:23 +00:00