pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/pkgtools/lintpkgsrc lintpkgsrc: fix location of mk.conf



details:   https://anonhg.NetBSD.org/pkgsrc/rev/f0c3a0b60de3
branches:  trunk
changeset: 383508:f0c3a0b60de3
user:      rillig <rillig%pkgsrc.org@localhost>
date:      Fri Aug 19 18:23:41 2022 +0000

description:
lintpkgsrc: fix location of mk.conf

The effective location of mk.conf is not stored in a variable, and there
are several locations where it could be. Noticed by adam@.

diffstat:

 pkgtools/lintpkgsrc/Makefile            |  20 ++++++++++++++++++--
 pkgtools/lintpkgsrc/files/lintpkgsrc.pl |   4 ++--
 2 files changed, 20 insertions(+), 4 deletions(-)

diffs (57 lines):

diff -r 168698e3e5b5 -r f0c3a0b60de3 pkgtools/lintpkgsrc/Makefile
--- a/pkgtools/lintpkgsrc/Makefile      Fri Aug 19 17:35:56 2022 +0000
+++ b/pkgtools/lintpkgsrc/Makefile      Fri Aug 19 18:23:41 2022 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.53 2022/08/14 13:13:52 rillig Exp $
+# $NetBSD: Makefile,v 1.54 2022/08/19 18:23:41 rillig Exp $
 
 PKGNAME=       lintpkgsrc-2022.08.13
 CATEGORIES=    pkgtools
@@ -18,11 +18,27 @@
 USE_LANGUAGES= # none
 AUTO_MKDIRS=   yes
 
+.include "../../mk/bsd.prefs.mk"
+
+# See bootstrap/bootstrap.
+# See pkgtools/bootstrap-mk-files/files/bsd.own.mk.in.
+# Another guess would be '${.MAKE.MAKEFILES:M*/mk.conf:[1]}'.
+.for conf in \
+    ${MAKECONF} \
+    ${PKG_SYSCONFBASE:=/mk.conf} \
+    ${SYSCONFBASE:=/mk.conf} \
+    ${LOCALBASE:=/etc/mk.conf}
+.  if exists(${conf})
+LINTPKGSRC_MAKECONF=   ${conf}
+.  endif
+.endfor
+LINTPKGSRC_MAKECONF?=  /etc/mk.conf
+
 SUBST_CLASSES+=                lp
 SUBST_STAGE.lp=                post-configure
 SUBST_FILES.lp+=       lintpkgsrc.1 lintpkgsrc.pl
+SUBST_VARS.lp+=                LINTPKGSRC_MAKECONF
 SUBST_VARS.lp+=                MAKE
-SUBST_VARS.lp+=                MAKECONF
 SUBST_VARS.lp+=                PERL5
 SUBST_VARS.lp+=                PKGSRCDIR
 SUBST_VARS.lp+=                PKG_INFO
diff -r 168698e3e5b5 -r f0c3a0b60de3 pkgtools/lintpkgsrc/files/lintpkgsrc.pl
--- a/pkgtools/lintpkgsrc/files/lintpkgsrc.pl   Fri Aug 19 17:35:56 2022 +0000
+++ b/pkgtools/lintpkgsrc/files/lintpkgsrc.pl   Fri Aug 19 18:23:41 2022 +0000
@@ -1,5 +1,5 @@
 #!@PERL5@
-# $NetBSD: lintpkgsrc.pl,v 1.127 2022/08/19 05:20:27 rillig Exp $
+# $NetBSD: lintpkgsrc.pl,v 1.128 2022/08/19 18:23:41 rillig Exp $
 
 # Written by David Brownlee <abs%netbsd.org@localhost>.
 #
@@ -185,7 +185,7 @@
 
 # Buildtime configuration
 my $conf_make = '@MAKE@';
-my $conf_makeconf = '@MAKECONF@';
+my $conf_makeconf = '@LINTPKGSRC_MAKECONF@';
 my $conf_pkg_info = '@PKG_INFO@';
 my $conf_pkgsrcdir = '@PKGSRCDIR@';
 my $conf_prefix = '@PREFIX@';



Home | Main Index | Thread Index | Old Index