Commit graph

247 commits

Author SHA1 Message Date
joerg
453a72a147 Use the correct variable names. 2009-10-06 13:34:53 +00:00
joerg
ed25fdba32 Fix syntax. Mea culpra 2009-09-20 10:44:33 +00:00
joerg
d515df3aab Deal with strip idiosyncracies:
- sometimes creates the temporary file, but fails
- sometimes it is successful, but still keeps the temporary file
- sometimes it crashes when called with more than one argument
Bite the bullet and call it individually with explicit output file
and clean up after it.
2009-09-18 10:11:48 +00:00
joerg
2793535127 Use filtered plist for install-strip-debug and install-man-handling,
simplifying the latter.
2009-09-02 22:05:42 +00:00
joerg
e58a7789d9 Add STRIP_DEBUG option, which removes debug information from all files,
leaving basic symbol tables intact. Document that INSTALL_UNSTRIPPED
doesn't work for all packages.
2009-09-02 14:40:40 +00:00
joerg
5fc98f11b5 Make sure that _UPDATE_RUNNING=YES is passed down to su-deinstall for
PKG_PRESERVE packages (e.g. pkg_install). Otherwise an old version of
pkg_install is not removed from pkgdb.
2009-06-17 12:54:57 +00:00
joerg
4e1bd80afd Add support for using USE_DESTDIR=yes and replace together.
Based on the patch send to tech-pkg in 2008, but less intrusive.
2009-06-09 08:40:27 +00:00
rillig
4c49bb28b8 Documented INSTALL_UNSTRIPPED. 2008-11-18 22:03:56 +00:00
obache
a73dc64b7e Honor PKGLOCALEDIR for AUTO_MKDIRS. 2008-06-11 07:30:33 +00:00
wiz
e1411f898a Add colon in comment to aid "make help" in finding help
for the bin-install target.
2008-02-20 09:58:04 +00:00
rillig
decac331e0 Eliminated some code duplication, provided a default definition for
PKGNAME_REQD and documented it a little bit.
2008-02-19 22:53:34 +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
4290fb40eb Added compatibility code for INSTALLATION_DIRS_FROM_PLIST. I had
intended that all the time, but didn't test enough. :(

Thanks to wiz for catching this one.
2007-12-10 22:49:19 +00:00
rillig
a2f9aae352 Added AUTO_MKDIRS as an alias for INSTALLATION_DIRS_FROM_PLIST. The
variable is much more comfortable than specifying all the directories in
INSTALLATION_DIRS that using such a long name for it feels like a
punishment. It also doesn't look nice in the package Makefiles, for
example:

old:
INSTALLATION_DIRS=	bin ${PKGMANDIR}/man1 ${PKGMANDIR}/man8

new:
AUTO_MKDIRS=		yes

The variable INSTALLATION_DIRS_FROM_PLIST will be deprecated slowly.
2007-12-07 05:25:25 +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
2db8b70075 Moved common commands into a variable. This saves 15 lines. 2007-11-03 10:25:33 +00:00
rillig
5fa3759ae6 Simpler includes. 2007-11-03 09:12:46 +00:00
rillig
9993d0aa30 BINPKG_SITES may be empty, and most shells don't like syntactically
empty for loops.
2007-09-21 23:59:30 +00:00
rillig
7c0cf0016c Renamed pkgpath to pkg_path, since there exists a completely independent
variable PKGPATH. I hope this will avoid some confusion.
2007-09-19 13:32:59 +00:00
rillig
93100472de When using bin-install, the version of the installed package was checked
twice: First against the required package pattern (PKGNAME_REQD), and
then against the current version (PKGNAME). When only a binary package
for an old (but sufficient) version of a package was available, that
version had been installed and the current version been built
afterwards, which was unnecessary.

This problem was mentioned in PR 36146, and is hereby fixed.

By the way, the code was really ugly: The messages that had been printed
didn't reflect what the code was actually doing. This is fixed, too.
2007-09-19 13:26:19 +00:00
rillig
c7873e00e2 It has always annoyed be that package authors had to write ${PKGMANDIR}/
in the definition of INSTALLATION_DIRS, where a short man/ would be much
shorter. Since we already have that man-transforming magic in some other
places of pkgsrc, it's also here.

While here, documented INSTALLATION_DIRS and
INSTALLATION_DIRS_FROM_PLIST so they are found by "bmake help".
2007-09-13 09:44:58 +00:00
joerg
0f838e964b pkg_add can figure out the suffix itself, thanks. 2007-08-23 08:59:24 +00:00
joerg
651f00f91e Add cross-compiling support for bin-install and deinstall targets. 2007-08-20 10:59:05 +00:00
joerg
4a33463b76 Remove bootstrap-register, bootstrap was changed a while ago to use
normal building and installation.
2007-08-14 23:59:25 +00:00
joerg
8eae292c51 Fix a number of bugs in the DESTDIR support:
- check-perms.mk was not DESTDIR aware, prefix files before passing it
  to the directory extraction
- PKG_FILELIST_CMD was calling pkg_info, which is fine for normal
  installation, but fails of course for DESTDIR. Just drop the @ lines
  from ${_DEPENDS_PLIST} and use that.
- To make he former work, ensure that _flavor-generate-metadata is part
  of _INSTALL_ALL_TARGETS. It was normally a dependency of
  _flavor-register, but that is skipped for DESTDIR.
- Remove ${_DEPENDS_PLIST} when running install-clean.
2007-08-14 23:58:24 +00:00
jlam
6ea0c2868e Remove ${WRKDIR}/.pkgdb during "install-clean" as that directory
contains files that are generated during the "install" phase.  This
should fix the problem where PLIST modifications were ignored if the
PLIST was modified between a "make deinstall" and a "make reinstall".
2007-08-10 04:00:43 +00:00
joerg
005620851f Add core of the infrastructure support for cross-compilation.
- USE_CROSS_COMPILATION activates it, CROSS_DESTDIR specifies root of
  the target filesystem
- derive _CROSS_DESTDIR from CROSS_DESTDIR or MAKEOBJDIR
- buildlink3.mk prefixes the files to symlink with _CROSS_DESTDIR
- compiler/gcc.mk knows about the target prefix (e.g. i386--netbsdelf)
- PKG_DBDIR is prefixed with _CROSS_DESTDIR
- package-install and bin-install are not called with su
- install and strip are redirected to the tool version
- links for the target specific ar, as, ld, nm, objdump, ranlib and
  strip are added
- compiler wrapper detect if linking is requested or not
- special command sinks for CPP and CC/CXX add the cross-compile magic:
  - modify include dirs to get the target /usr/include
  - modify linker dirs and runpath to use target /usr/lib at link time,
    but keep correct rpath entries

Supported-by: Google SoC 2007
Basic tests by he@ on Sparc. Review from jlam@.
2007-08-02 18:19:31 +00:00
joerg
409b183fc0 Remove USE_MTREE support. Keep one copy (the NetBSD version) for
the purpose of print-PLIST in plist/common-dirs.mtree.

Discussed with wiz@, no objections on tech-pkg@.
2007-07-02 14:54:09 +00:00
xtraeme
74128fcaf3 Check if INSTALLATION_DIRS_FROM_PLIST is defined before using .if
!empty...

Reported by Mihai Chelaru.
2007-04-19 18:16:36 +00:00
joerg
5ca4038017 Drop NO_MTREE by making it the default. Introduce USE_MTREE to get the
old behaviour back. Discussed on tech-pkg@.
2007-04-19 16:52:03 +00:00
rillig
c66cd8fa30 Fixed pkglint warnings. 2007-03-09 03:28:58 +00:00
rillig
a22ded7626 Replaced PKG_SILENT/PKG_DEBUG with RUN. 2007-03-09 03:15:33 +00:00
rillig
feeac72e9a Replaced the remaining PKG_SILENT/PKG_DEBUG pairs with RUN. 2007-03-09 03:05:38 +00:00
rillig
3b97228894 Fixed the quoting in INSTALLATION_DIRS and install-dirs-from-PLIST.
In install-dirs-from-PLIST, all directories that don't contain an '@' or
'$' character are automatically installed.
2007-03-09 02:51:45 +00:00
rillig
836ffbe9b9 Added MAKEFLAGS to the RECURSIVE_MAKE call. Almost all other calls
already have it.
2007-03-09 00:45:54 +00:00
rillig
8dd9cf3d41 Renamed some more flavor-specific targets to have the form _flavor-*.
Split check-vulnerable into a general an a flavor-specific part, for
consistence with all the other targets.
2007-03-09 00:39:54 +00:00
rillig
dc31efeb7a Renamed replace-pkg to _flavor-replace and undo-replace-pkg to
_flavor-undo-replace. The leading underscore makes it obvious that these
targets are private, which saves redundant comments.
2007-03-08 23:06:37 +00:00
wiz
5dce6c7d9d Make MTREE_FILE and MTREE_ARGS internal by prefixing them with '_'.
They are not supposed to be set by the user.
2007-03-02 09:08:33 +00:00
wiz
1520ab35d5 Desupport unused FORCE_PKG_REGISTER. 2007-03-02 08:49:40 +00:00
wiz
fc3f7b9811 Remove support for obsolete and unused NO_PKG_REGISTER. 2007-03-02 05:54:18 +00:00
rillig
a856ec03a1 Cleaned up the code:
- Targets that are not intended to be defined here (replace-pkg and
  undo-replace-pkg) are not defined here. (Sounds obvious, but apparently
  isn't.)

- Targets that are intended to be defined here and only here (replace
  and undo-replace) do not need a multiple-definition protection.

- Moved all comments to the top of the file.
2007-02-20 11:17:03 +00:00
rillig
06e2f03ee1 Moved the code that installs check-files on the hook from install.mk to
check-files.mk, for two reasons:

1. It belongs there.
2. Now check-files is run before check-perms and check-interpreter.
2007-01-06 20:15:26 +00:00
joerg
72e97d6f60 Set NO_MTREE for packages flagged as allowing DESTDIR. They are supposed
to work without precreated directories anyway.
2006-12-15 20:54:47 +00:00
joerg
90db16ee98 Only set BINPKG_SITES to ftp.netbsd.org, if the OS is actually NetBSD. 2006-11-21 13:54:26 +00:00
rillig
0ba86a9a56 Removed the tests for CHECK_INTERPRETER and CHECK_PERMS. They are now in
../checks/*.mk.
2006-11-12 00:51:00 +00:00
rillig
5644aacf25 Moved the check for whether check-wrkref should be run from
install/install.mk to check/check-wrkref.mk.

Renamed the check-wrkref target to _check-wrkref.
2006-11-12 00:13:26 +00:00
rillig
8f9b2f0817 Added some documentation.
Since hooks should not be overwritten, removed the !target() check. That
way, one gets a warning when attempting to add some code to the hook.
2006-11-11 23:51:30 +00:00
rillig
06e3596610 Moved the check whether check-shlibs should be run from
install/install.mk to check/check-shlibs.mk.

Renamed check-shlibs to _check-shlibs. Since it had been declared as
"private" before, this will not break anything.
2006-11-11 23:31:38 +00:00
joerg
6500d1b655 Just make the PREFIX with INSTALL_DATA_DIR. Drop the conditional and
don't use mkdir, as the latter uses the group permissions of the
parent directory under BSDs, resulting in group leaks for
USE_DESTDIR=yes. Discussed with agc@.
2006-11-07 18:16:19 +00:00
rillig
9dfb6ae2ac When a package sets INSTALLATION_DIRS_FROM_PLIST to "yes", it does not
need to specify INSTALLATION_DIRS itself. Instead, the list is generated
from the static PLIST files. Like for INSTALLATION_DIRS, mtree is
disabled when this variable is set.
2006-11-04 07:42:51 +00:00