Tue Aug 15 15:54:06 2017 UTC ()
Fix a problem with MAKE_VERSION being undefined on case-insentive filesystems.
On case-insensitive filesystems such as MacOS, two files (Makefile and makefile,
which is created by configure from makefile.in) collide. Only the former
defines MAKE_VERSION, but it is replaced by the latter. Consequently,
MAKE_VERSION is defined as an empty string on these systems. This patch is
the result of a discussion on tech-pkg (see the thread following
http://mail-index.netbsd.org/tech-pkg/2017/08/13/msg018629.html) and is
based upon code incorporated into bmake v20170812.
(brook)
diff -r1.7 -r1.8 pkgsrc/devel/bmake/files/FILES
diff -r1.2 -r1.3 pkgsrc/devel/bmake/files/Makefile
diff -r1.2 -r1.3 pkgsrc/devel/bmake/files/bsd.after-import.mk
diff -r1.1.1.1 -r1.2 pkgsrc/devel/bmake/files/Makefile.config.in
diff -r0 -r1.1 pkgsrc/devel/bmake/files/VERSION
diff -r1.15 -r1.16 pkgsrc/devel/bmake/files/configure
diff -r1.13 -r1.14 pkgsrc/devel/bmake/files/configure.in
diff -r1.5 -r1.6 pkgsrc/devel/bmake/files/make-bootstrap.sh.in
--- pkgsrc/devel/bmake/files/FILES 2015/05/19 22:01:19 1.7
+++ pkgsrc/devel/bmake/files/FILES 2017/08/15 15:54:06 1.8
@@ -5,6 +5,7 @@
PSD.doc/Makefile
PSD.doc/tutorial.ms
README
+VERSION
aclocal.m4
arch.c
bmake.1
--- pkgsrc/devel/bmake/files/Makefile 2015/05/19 22:01:19 1.2
+++ pkgsrc/devel/bmake/files/Makefile 2017/08/15 15:54:06 1.3
@@ -1,8 +1,5 @@
-# $Id: Makefile,v 1.2 2015/05/19 22:01:19 joerg Exp $
+# $Id: Makefile,v 1.3 2017/08/15 15:54:06 brook Exp $
-# Base version on src date
-MAKE_VERSION= 20150505
-
PROG= bmake
SRCS= \
@@ -56,6 +53,8 @@
lstRemove.c \
lstReplace.c \
lstSucc.c
+
+.-include "VERSION"
# this file gets generated by configure
.-include "Makefile.config"
--- pkgsrc/devel/bmake/files/bsd.after-import.mk 2015/05/19 22:01:19 1.2
+++ pkgsrc/devel/bmake/files/bsd.after-import.mk 2017/08/15 15:54:06 1.3
@@ -1,4 +1,4 @@
-# $Id: bsd.after-import.mk,v 1.2 2015/05/19 22:01:19 joerg Exp $
+# $Id: bsd.after-import.mk,v 1.3 2017/08/15 15:54:06 brook Exp $
# This makefile is for use when integrating bmake into a BSD build
# system. Use this makefile after importing bmake.
@@ -56,6 +56,7 @@
# Makefiles need a little more tweaking than say config.h
MAKEFILE_SED = sed -e '/^MACHINE/d' \
+ -e '/include.*VERSION/d' \
-e '/^PROG/ { s,=,?=,;s,bmake,$${.CURDIR:T},; }' \
-e 's,^.-include,.sinclude,' \
-e '/^\..*include *</ { s,<,<bsd.,;/autoconf/d; }' \
--- pkgsrc/devel/bmake/files/Makefile.config.in 2015/05/19 21:36:43 1.1.1.1
+++ pkgsrc/devel/bmake/files/Makefile.config.in 2017/08/15 15:54:06 1.2
@@ -1,5 +1,7 @@
# things set by configure
+_MAKE_VERSION=@_MAKE_VERSION@
+
prefix= @prefix@
srcdir= @srcdir@
CC?= @CC@
# keep this compatible with sh and make
_MAKE_VERSION=20150505
--- pkgsrc/devel/bmake/files/configure 2015/05/19 22:01:19 1.15
+++ pkgsrc/devel/bmake/files/configure 2017/08/15 15:54:06 1.16
--- pkgsrc/devel/bmake/files/configure.in 2015/05/19 22:01:19 1.13
+++ pkgsrc/devel/bmake/files/configure.in 2017/08/15 15:54:06 1.14
--- pkgsrc/devel/bmake/files/make-bootstrap.sh.in 2016/01/24 16:14:44 1.5
+++ pkgsrc/devel/bmake/files/make-bootstrap.sh.in 2017/08/15 15:54:06 1.6
@@ -13,7 +13,7 @@
CC="@CC@"
CFLAGS="@CFLAGS@ -I. -I${srcdir} @DEFS@ @CPPFLAGS@ -DMAKE_NATIVE ${XDEFS} -DBMAKE_PATH_MAX=@bmake_path_max@"
-MAKE_VERSION=`sed -n '/^MAKE_VERSION=/s,.*=[^0-9]*,,p' $srcdir/Makefile`
+MAKE_VERSION=@_MAKE_VERSION@
MDEFS="-DMAKE_VERSION=\"$MAKE_VERSION\" \
-D@force_machine@MACHINE=\"@machine@\" -DPKGSRC_MACHINE_ARCH=\"@machine_arch@\" \