Commit graph

58 commits

Author SHA1 Message Date
rillig
7ee8a6b95a bsd.build-vars.mk: describe MAKE_FLAGS in details, rewrite and reformat 2020-09-12 06:51:15 +00:00
rillig
82d30f4f85 mk/build/build.mk: use SH for the shell in build-env
Providing a realistic build environment has priority over having a
convenient shell with auto-completion and all the likes.
2020-06-12 17:33:23 +00:00
rillig
ab30dd14be mk/build/build.mk: use the login shell by default for build-env 2020-04-25 21:36:17 +00:00
riastradh
89445637ce New target test-env, like build-env and configure-env. 2020-03-23 00:33:48 +00:00
rillig
75b71a024b mk/build: make the documentation for build-env more precise 2020-02-25 05:30:14 +00:00
maya
b1fd52c5a5 Make sure _MAKE_JOBS_N has a valid value even if MAKE_JOBS is unset. 2020-02-18 16:10:37 +00:00
maya
25acf4336b Rename EFFECTIVE_MAKE_JOBS -> _MAKE_JOBS_N, suggested by gdt.
I am under the impression we use _THING to mean "defined by the
implementation", which would be similar to the C meaning of __ prefix,
rather than "private to this file".
2020-01-19 18:20:45 +00:00
maya
55b59a0062 Add a visible EFFECTIVE_MAKE_JOBS, a tunable resembling _MAKE_JOBS,
but is defined as 1 in the case of no jobs.

No -j prefix for maximum usability.
(XXX: is _DEF_VARS the right place to add it?)
2020-01-19 16:51:47 +00:00
rillig
0d03a9a964 mk/build/test.mk: reorder the _VARGROUPS variables
The tests are only run if TEST_TARGET is defined. Therefore it should be
listed first.
2019-10-13 11:08:10 +00:00
rillig
34460df6b7 mk/build/test.mk: clean up line continuations 2019-10-13 10:34:37 +00:00
rillig
bd2ae3cf10 mk/build: in build-env, output BUILD_DIRS relative to WRKSRC 2019-09-02 02:59:47 +00:00
rillig
d54bc5b842 mk/build: for build-env, show the BUILD_DIRS 2019-09-02 02:54:57 +00:00
rillig
b88d952e81 mk: allow "bmake clean depends" as shortcut
When "bmake clean depends" was called for a package where the various
cookie files already existed, these would enable different rules than a
clean package directory.

Since "bmake clean" deletes all the cookie files before "bmake depends"
starts, in these combined command lines the cookie files must be treated
as absent.
2019-05-07 19:36:43 +00:00
dholland
c389701cbb Add support for MAKE_JOBS.pkgpath.
This allows setting MAKE_JOBS high and then setting e.g.
MAKE_JOBS.emulators/qemu=2 (or some such low value) to keep it from
thrashing during build.

Discussed/approved on tech-pkg two months ago and then I forgot to
actually commit it.
2019-03-17 03:59:11 +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
db16752718 mk/*: improve documentation for "make help" 2018-05-16 21:23:02 +00:00
joerg
e97fae9138 Introduce TEST_DEPENDS.
Place them in ALL_DEPENDS iff PKGSRC_RUN_TESTS is set, so that bulk
builds will pick them up.
2018-01-13 12:48:56 +00:00
maya
4ad12bcd40 Remove hack working around NetBSD 1.5's specfiles. 2017-08-07 23:54:09 +00:00
jlam
0a676f1f26 Provide switch to activate new frameworks to replace "pkginstall".
If ${_USE_NEW_PKGINSTALL} is "yes", then use the new "pkgtasks",
"init", and "pkgformat/pkg"-scripts frameworks instead of the
existing "pkginstall" framework.
2017-06-01 02:15:10 +00:00
joerg
639d5b402f Remove support for USE_DESTDIR=no. 2016-04-10 15:58:02 +00:00
jperkin
111893bb36 Remove _OPSYS_WHOLE_ARCHIVE_FLAG and _OPSYS_NO_WHOLE_ARCHIVE_FLAG, these
variables are unused and in at least one case were completely wrong anyway.
2016-03-10 16:58:19 +00:00
joerg
11d2712a27 Remove USE_X11BASE and X11PREFIX. 2015-07-04 16:18:28 +00:00
jperkin
c6fe57f401 Introduce PKGGNUDIR as a way to control gnu prefix.
By default pkgsrc uses LOCABASE/gnu as a prefix for packages to install
native versions of GNU tools, which are them symbolically linked back to
the 'g' versions of the files in LOCALBASE, and users can then add
LOCALBASE/gnu/bin to PATH to pick up those tools.

On systems where the GNU environment is desired, PKGGNUDIR now allows
users to install the non-'g' files directly into LOCALBASE, making them
the default without having to alter PATH, whilst retaining the 'g' files
in order to ensure dependencies and tool paths remain the same.
2012-12-06 11:36:30 +00:00
cheusov
c8f63d3d1e "rebuild" and "retest" targets were added (by analogy with "reinstall").
rebuild is a special target to re-run the build target.
retest is a special target to re-run the test target.
2012-05-27 14:32:28 +00:00
obache
1cd4052724 As described in comments, export ${TEST_ENV} instead of ${MAKE_ENV} to test
make process.
2012-05-02 13:44:27 +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
b678277405 Pass down PKGINFODIR just like PKGMANDIR is passed down. 2010-02-01 00:16:54 +00:00
tnn
9a055d30cf run ${_ULIMIT_CMD} in build-env target 2009-01-10 15:59:29 +00:00
rillig
2f986f5645 Added MAKE_ENV and MAKE_FLAGS to the list of important variables. 2008-12-04 00:05:33 +00:00
rillig
df3d3e18b2 Mentioned PKGSRC_RUN_TEST using the standard formatting. 2008-11-05 23:44:55 +00:00
rillig
9a302003c7 Added keywords for "bmake help". 2008-02-13 09:01:20 +00:00
rillig
66736dde43 Replaced _PKG_SILENT and _PKG_DEBUG with RUN. 2008-02-07 21:36:13 +00:00
rillig
d3624fdf10 Made the .include directives simpler, since the directory of the
including file is always the first in the search path.
2008-01-04 01:46:24 +00:00
rillig
9fab8079e7 Removed _INTERACTIVE_COOKIE, after asking on tech-pkg if anyone needs
it. It had only been used to change the "nerrors" variable in bulk
builds, but this variable is not used further anyway.
2007-12-01 11:11:53 +00:00
rillig
3db5643622 Since the "build" target is run inside the pkgsrc barrier, "build-env"
gets the same treatment.
2007-11-30 18:54:40 +00:00
rillig
11f5886a78 Fixed the definition and the documentation of MAKE_PROGRAM. 2007-08-13 12:03:10 +00:00
rillig
61b4964a9b Added the keyword "parallel" to the description of MAKE_JOBS_SAFE. 2007-06-13 20:34:48 +00:00
rillig
f1d5b6cf3f Documented MAKE_JOBS_SAFE. 2007-03-18 23:09:09 +00:00
rillig
66bf916302 For all those who are interested in the inner workings of pkgsrc, there
is a new target "show-all" that fits to the existing "debug",
"show-tools", "show-vars" targets. It prints a list of the variables
that make up the public interface to pkgsrc. Running this target is
especially useful if you want to do some things, you know that they must
have been implemented but you don't know what it is called. It also
shows the "class" of a variable (user-defined, package-defined,
system-defined).
2007-03-15 22:54:24 +00:00
rillig
33024986cb Moved the build-env target from bsd.pkg.debug.mk to build/build.mk. It
is no longer available to packages that set NO_BUILD.

Added the variable BUILD_ENV_SHELL, since I prefer a comfortable shell
over /bin/sh for interactive work.
2007-03-08 23:16:06 +00:00
rillig
ab106b40bd Documented NO_BUILD. 2007-02-06 20:48:07 +00:00
rillig
9ce0a959a1 More documentation for the purpose of this file and a tiny wording
improvement for TEST_DIRS.
2007-01-28 15:29:11 +00:00
uebayasi
8cc8e03813 Document TEST_TARGET with help from Alistair Crooks. 2007-01-27 08:14:07 +00:00
martti
2cc4216d5e Remove trailing spaces. 2006-12-15 12:46:23 +00:00
rillig
3911155e2f Moved the portability checks from the configure/ directory to checks/,
since according to the comment in check/bsd.check.mk, they belong there.

Added a new check for all C and C++ header files to make sure they don't
contain strings like ${prefix} or ${exec_prefix}, which is currently a
problem with sysutils/dbus and has been noticed in PR 35019. This check
is disabled by default since I don't know anything about possible false
positives, but I plan to enable it for PKG_DEVELOPERs after some
testing.

Added two names for hooks that are placed in the configure and in the
build phase. Now the checks look more like becoming something one could
call a framework, sharing a common structure and a documented interface.
2006-11-09 02:53:15 +00:00
rillig
b90067ade0 Changed BUILD_MAKE_FLAGS and TEST_MAKE_FLAGS to be appended to the
common MAKE_FLAGS instead of overriding them, to align with the new
definition of INSTALL_MAKE_FLAGS.

The packages that override BUILD_MAKE_FLAGS don't have to be changed,
since they prepended MAKE_FLAGS to BUILD_MAKE_FLAGS, except for less
than five cases. In those cases, it may well have been unknown to the
package author that MAKE_INSTALL_FLAGS had been an overriding variable
instead of one whose value is just appended to something else.

Some packages (postgresql, some compilers, Java environments, qcad) are
using code copied from build.mk. These packages will have to be adjusted
to the new variable definitions. To make this change easier, two new
variables BUILD_MAKE_CMD and TEST_MAKE_CMD have been introduced that
contain the complete command that makes up the call to make(1). This
prevents further code duplication.
2006-10-26 21:12:47 +00:00
reed
4777d2bf99 Add experimental support for -j jobs building in the build
target.

MAKE_JOBS is undefined by default. You can test this by setting
in mk.conf: MAKE_JOBS=5 for example.

Some package just won't build correctly with this -- these individual
packages can set MAKE_JOBS_SAFE=no to disable it.

This is based on discussion from last December 2005. Some pkgsrc
users are using ideas like this.

Note I have been using this since December 2005 on various single
processor and multiprocessor systems. (Once I kept some stats on
performance but have misplaced that now.) I haved tested this with
many packages (but not a bulk build) on Linux, NetBSD and DragonFly.

This commit doesn't include the commits for the MAKE_JOB_SAFE. As
this is experimental it needs more testing. Some examples of problems
are: comms/lrzsz, databases/gramps2, editors/vim, graphics/MesaLib,
graphics/netpbm, net/bind9, print/ghostscript-esp, textproc/libxml,
and www/lynx.
2006-10-05 23:35:23 +00:00
obache
33d4b2b7d2 Rename variable MAKEFILE to MAKE_FILE, as suggested in PR 28392. 2006-09-09 02:35:13 +00:00
jlam
77b719dae8 Modify the barrier so that we always invoke the recursive make process
when passing through the barrier.  This ensures the PATH (passed via
PKGSRC_MAKE_ENV) is correctly set for all phases after the barrier.

This fixes a bug in "interactive" pkgsrc use, where if you have no
work directory and type "make build && make install", then the "install"
step does not have a PATH set to include all the wrapper and tools
directories.
2006-07-22 16:31:35 +00:00
jlam
7d1f4cca8e "BUILD_ENV" was misnamed. It's actually the environment that is passed
to all internal recursive make processes.  As such, rename it to
"PKGSRC_MAKE_ENV".

XXX Note, some of the usage of this variable in package Makefiles seems
XXX incorrect.  They probably want "MAKE_ENV", which is the environment
XXX passed to the make process when running "make" within ${WRKSRC}.
2006-07-21 14:27:56 +00:00