NetBSD Problem Report #28392
From tv@server.duh.org Tue Nov 23 05:58:08 2004
Return-Path: <tv@server.duh.org>
Received: from rs13.luxsci.com (rs13.luxsci.com [66.216.122.84])
by narn.netbsd.org (Postfix) with ESMTP id 304752520E9
for <gnats-bugs@gnats.NetBSD.org>; Tue, 23 Nov 2004 05:58:08 +0000 (UTC)
Message-Id: <200411230558.iAN5w6fJ002117@server.duh.org>
Date: Tue, 23 Nov 2004 00:58:06 -0500 (EST)
From: tv@duh.org
Reply-To: tv@duh.org
To: gnats-bugs@netbsd.org
Subject: pkgsrc should use a variable name other than MAKEFILE
X-Send-Pr-Version: 3.95
>Number: 28392
>Category: pkg
>Synopsis: pkgsrc should use a variable name other than MAKEFILE
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: obache
>State: closed
>Class: change-request
>Submitter-Id: net
>Arrival-Date: Tue Nov 23 05:59:00 +0000 2004
>Closed-Date: Fri Oct 20 14:02:37 +0000 2006
>Last-Modified: Fri Oct 20 14:02:37 +0000 2006
>Originator: Todd Vierling
>Release: Interix 3.5
>Organization:
DUH.ORG: Pointing out the obvious since 1994.
>Environment:
Partially case-insensitive environment:
Windows Services for Unix with bug in NFS Client that doesn't completely
provide case-sensitive file access to NFS shares. pkgsrc located on
NFS, but with WRKOBJDIR set to local case-sensitive filesystem.
>Description:
There is a corner case in Interix that is triggering a problem in pkgsrc's
reuse of variables set internally by bmake. In bmake/main.c, the variable
MAKEFILE is set to the last read makefile, per SysV make(1). Problem is,
pkgsrc also uses this variable name to indicate the name of the desired
makefile in the package's build directory.
Normally this would not be a problem, but it does illustrate bad reuse of
the MAKEFILE variable name and could cause problems in other case
insensitive environments (e.g., Darwin). pkgsrc should change the variable
name, probably to MAKE_FILE or MAKE_MAKEFILE following MAKE_ARGS and
MAKE_ENV, to differentiate it from the implicitly set MAKEFILE.
>How-To-Repeat:
>Fix:
>Release-Note:
>Audit-Trail:
From: Roland Illig <roland.illig@gmx.de>
To: gnats-bugs@netbsd.org
Cc:
Subject: Re: pkg/28392
Date: Mon, 06 Jun 2005 11:56:47 +0200
Instead of MAKEFILE I suggested BUILD_MAKEFILE, INSTALL_MAKEFILE,
TEST_MAKEFILE once ago.
Maybe a new class of reserved names COMMON_* should be established for
default values that apply to more than one pkgsrc phase.
COMMON_MAKEFILE?= Makefile
BUILD_MAKEFILE?= ${COMMON_MAKEFILE}
INSTALL_MAKEFILE?= ${COMMON_MAKEFILE}
TEST_MAKEFILE?= ${COMMON_MAKEFILE}
Currently, for the *_ENV variables, ${ALL_ENV} is the base definition. I
prefer the name COMMON over ALL.
Roland
From: Thomas Klausner <wiz@NetBSD.org>
To: gnats-bugs@netbsd.org
Cc:
Subject: Re: pkg/28392
Date: Mon, 6 Jun 2005 12:00:35 +0200
On Mon, Jun 06, 2005 at 09:57:01AM +0000, Roland Illig wrote:
> Instead of MAKEFILE I suggested BUILD_MAKEFILE, INSTALL_MAKEFILE,
> TEST_MAKEFILE once ago.
It's not usually the case that one package needs three different
Makefiles, dependin on the phase. I can't think of a single package
that would take advantage of this. So perhaps this is not the best
generalization :)
Thomas
From: Roland Illig <roland.illig@gmx.de>
To: gnats-bugs@netbsd.org
Cc:
Subject: Re: pkg/28392
Date: Mon, 06 Jun 2005 12:26:26 +0200
Thomas Klausner wrote:
> The following reply was made to PR pkg/28392; it has been noted by GNATS.
>
> From: Thomas Klausner <wiz@NetBSD.org>
> To: gnats-bugs@netbsd.org
> Cc:
> Subject: Re: pkg/28392
> Date: Mon, 6 Jun 2005 12:00:35 +0200
>
> On Mon, Jun 06, 2005 at 09:57:01AM +0000, Roland Illig wrote:
> > Instead of MAKEFILE I suggested BUILD_MAKEFILE, INSTALL_MAKEFILE,
> > TEST_MAKEFILE once ago.
>
> It's not usually the case that one package needs three different
> Makefiles, dependin on the phase. I can't think of a single package
> that would take advantage of this. So perhaps this is not the best
> generalization :)
The packages that use <bsd.prog.mk> often have a separate do-install
target defined in the package Makefile. But this is more a bug in
<bsd.prog.mk> than in the name of the MAKEFILE variable.
Roland
From: OBATA Akio <obata@lins.jp>
To: gnats-bugs@netbsd.org
Cc:
Subject: Re: pkg/28392 pkgsrc should use a variable name other than MAKEFILE
Date: Sat, 15 Apr 2006 22:29:23 +0900
It's for this reason that Interix's bmake don't set MAKEFILE now.
This may break to build packages using MAKEFILE as original purpose.
Interix's NFS problem is when open a file, became case
insensiveite for a while about that file.
`bmake' try to open `makefile' since then `Makefile' if `-f' option is
not specified.
It's for this NFS problem and bmake's specification that
first `bmake' in pkgsrc directry, open `Makefile' then MAKEFILE==Makefile
but subsequent next `bmake` open `makefile' then MAKEFILE==makefile.
Prior to install phase, it's may OK if having sufficient interval time.
But in install phase, calling oneself like this:
${_PKG_SILENT}${_PKG_DEBUG}cd ${.CURDIR} && ${MAKE} ${MAKEFLAGS} do-install
So, in `do-install', MAKEFILE==makefile.
`MAKEFILE' should not use as makafile in the pacages's build directory.
Make related values is now:
MAKE_ENV
MAKE_PROGRAM
MAKE_FLAGS
Why don't we change from `MAKEFILE' to `MAKE_FILE'?
If need makefile dependin on the phase, now there are some variables:
BUILD_MAKE_FLAGS
TEST_MAKE_FLAGS
INSTALL_MAKE_FLAGS
So, shall we use:
BUILD_MAKE_FILE
TEST_MAKE_FILE
INSTALL_MAKE_FILE
From: OBATA Akio <obache@netbsd.org>
To: gnats-bugs@NetBSD.org
Cc:
Subject: PR/28392 CVS commit: pkgsrc/mk
Date: Sat, 9 Sep 2006 02:35:13 +0000 (UTC)
Module Name: pkgsrc
Committed By: obache
Date: Sat Sep 9 02:35:13 UTC 2006
Modified Files:
pkgsrc/mk/build: bsd.build-vars.mk build.mk test.mk
pkgsrc/mk/install: install.mk
Log Message:
Rename variable MAKEFILE to MAKE_FILE, as suggested in PR 28392.
To generate a diff of this commit:
cvs rdiff -r1.2 -r1.3 pkgsrc/mk/build/bsd.build-vars.mk
cvs rdiff -r1.5 -r1.6 pkgsrc/mk/build/build.mk
cvs rdiff -r1.6 -r1.7 pkgsrc/mk/build/test.mk
cvs rdiff -r1.17 -r1.18 pkgsrc/mk/install/install.mk
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Responsible-Changed-From-To: pkg-manager->obache
Responsible-Changed-By: obache@netbsd.org
Responsible-Changed-When: Sat, 09 Sep 2006 03:16:20 +0000
Responsible-Changed-Why:
I take this.
State-Changed-From-To: open->feedback
State-Changed-By: obache@netbsd.org
State-Changed-When: Sat, 09 Sep 2006 03:16:20 +0000
State-Changed-Why:
I have renamed MAKEFILE to MAKE_FILE.
Is your problem fixed?
State-Changed-From-To: feedback->closed
State-Changed-By: tv@netbsd.org
State-Changed-When: Fri, 20 Oct 2006 14:02:37 +0000
State-Changed-Why:
This fixes the issue in the PR.
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.51 2026/08/10 02:28:17 riastradh Exp $
$NetBSD: gnats_config.sh,v 1.10 2026/05/13 22:00:09 riastradh Exp $
Copyright © 1994-2026
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.