Subject: pkg/19181: pkgsrc "install" target dependencies should be fixed....
To: None <>
From: Greg A. Woods <>
List: netbsd-bugs
Date: 11/26/2002 14:36:00
>Number:         19181
>Category:       pkg
>Synopsis:       pkgsrc "install" target dependencies should be fixed....
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Nov 26 11:37:00 PST 2002
>Originator:     Greg A. Woods
>Release:        pkgsrc-current 2002/11/25
Planix, Inc.; Toronto, Ontario; Canada
System: NetBSD

	the 'install' target should depend on either either the 'test'
	target, if PKGSRC_RUN_TEST is set, _OR_ the 'build' target, and
	in both cases it should come before the 'uptodate-pkgtools'

	This is because 'test' already depends on 'build' and thus if
	we're depending on it then we don't also have to depend on

	Also, neither 'build' nor 'test' rules can ever legitimately
	require 'uptodate-pkgtools'.

	Someone should also probably consider undoing the .if target()
	stuff that allows an outer makefile to redefine these
	fundamental/primary targets.  There's lots more than enough
	mechanism available to wrap them with the pre-* and post-*
	targets, etc., and there's already more than enough of a hard
	requirement for these targets to be implemented in exactly one
	way with their fixed inter-dependencies.



	make the following change to mk/

*** 2541,2549 ****
  .if !target(install)
  .  if ${PKGSRC_RUN_TEST} == "YES" || ${PKGSRC_RUN_TEST} == "yes"
! install: uptodate-pkgtools build test ${INSTALL_COOKIE}
  .  else
! install: uptodate-pkgtools build ${INSTALL_COOKIE}
  .  endif
--- 2695,2703 ----
  .if !target(install)
  .  if ${PKGSRC_RUN_TEST} == "YES" || ${PKGSRC_RUN_TEST} == "yes"
! install: test uptodate-pkgtools ${INSTALL_COOKIE}
  .  else
! install: build uptodate-pkgtools ${INSTALL_COOKIE}
  .  endif