pass the version to avoid stale Makefile.inc files

This commit is contained in:
tg 2012-03-27 23:13:42 +00:00
parent ed28f9fd24
commit 6dd03ddfad
3 changed files with 12 additions and 12 deletions

View File

@ -1,5 +1,5 @@
#!/bin/sh
srcversion='$MirOS: src/bin/mksh/Build.sh,v 1.520 2012/03/27 23:01:51 tg Exp $'
srcversion='$MirOS: src/bin/mksh/Build.sh,v 1.521 2012/03/27 23:13:40 tg Exp $'
#-
# Copyright (c) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
# 2011, 2012
@ -299,6 +299,7 @@ rmf a.exe* a.out* conftest.c *core core.* lft mksh* no *.bc *.ll *.o \
curdir=`pwd` srcdir=`dirname "$0"` check_categories=
test -n "$srcdir" || srcdir=.
dstversion=`sed -n '/define MKSH_VERSION/s/^.*"\(.*\)".*$/\1/p' $srcdir/sh.h`
add_cppflags -DMKSH_BUILDSH
e=echo
r=0
@ -582,8 +583,8 @@ SCO_SV)
: ${HAVE_SYS_SIGLIST=0} ${HAVE__SYS_SIGLIST=0}
;;
*)
oswarn='; this is an unknown version'
oswarn="$oswarn${nl}of ${TARGET_OS} ${TARGET_OSREV}, please tell me"
oswarn='; this is an unknown version of'
oswarn="$oswarn$nl$TARGET_OS ${TARGET_OSREV}, please tell me what to do"
;;
esac
;;
@ -1339,7 +1340,7 @@ else
#define EXTERN
#define MKSH_INCLUDES_ONLY
#include "sh.h"
__RCSID("$MirOS: src/bin/mksh/Build.sh,v 1.520 2012/03/27 23:01:51 tg Exp $");
__RCSID("$MirOS: src/bin/mksh/Build.sh,v 1.521 2012/03/27 23:13:40 tg Exp $");
int main(void) { printf("Hello, World!\n"); return (0); }
EOF
case $cm in
@ -1773,7 +1774,7 @@ addsrcs '!' HAVE_STRLCPY strlcpy.c
addsrcs USE_PRINTF_BUILTIN printf.c
test 1 = "$USE_PRINTF_BUILTIN" && add_cppflags -DMKSH_PRINTF_BUILTIN
test 1 = "$HAVE_CAN_VERB" && CFLAGS="$CFLAGS -verbose"
add_cppflags -DMKSH_BUILDSH
add_cppflags -DMKSH_BUILD_R=409
$e $bi$me: Finished configuration testing, now producing output.$ao

View File

@ -1,4 +1,4 @@
# $MirOS: src/bin/mksh/Makefile,v 1.95 2012/03/27 22:36:49 tg Exp $
# $MirOS: src/bin/mksh/Makefile,v 1.96 2012/03/27 23:13:41 tg Exp $
#-
# Copyright (c) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
# 2011, 2012
@ -47,9 +47,8 @@ CPPFLAGS+= -DMKSH_ASSUME_UTF8 -DMKSH_DISABLE_DEPRECATED \
-DHAVE_SELECT=1 -DHAVE_SETRESUGID=1 -DHAVE_SETGROUPS=1 \
-DHAVE_STRCASESTR=1 -DHAVE_STRLCPY=1 -DHAVE_FLOCK_DECL=1 \
-DHAVE_REVOKE_DECL=1 -DHAVE_SYS_SIGLIST_DECL=1 \
-DHAVE_PERSISTENT_HISTORY=1
# probably differs between i386 and sparc
CPPFLAGS+= -DHAVE_SILENT_IDIVWRAPV=0
-DHAVE_PERSISTENT_HISTORY=1 -DHAVE_SILENT_IDIVWRAPV=0 \
-DMKSH_BUILD_R=409
CPPFLAGS+= -D${${PROG:L}_tf:C/(Mir${MAN:E}{0,1}){2}/4/:S/x/mksh_BUILD/:U}
COPTS+= -std=c99 -Wall
.endif

6
sh.h
View File

@ -152,7 +152,7 @@
#endif
#ifdef EXTERN
__RCSID("$MirOS: src/bin/mksh/sh.h,v 1.534 2012/03/27 22:58:39 tg Exp $");
__RCSID("$MirOS: src/bin/mksh/sh.h,v 1.535 2012/03/27 23:13:42 tg Exp $");
#endif
#define MKSH_VERSION "R40 2012/03/27"
@ -442,9 +442,9 @@ char *ucstrstr(char *, const char *);
#define mkssert(e) ((void)0)
#endif
#if !defined(MKSH_BUILDMAKEFILE4BSD) && !defined(MKSH_BUILDSH)
I'm sorry, Dave. I'm afraid I can't do that.
#if (!defined(MKSH_BUILDMAKEFILE4BSD) && !defined(MKSH_BUILDSH)) || (MKSH_BUILD_R != 409)
#error Must run Build.sh to compile this.
I'm sorry, Dave. I'm afraid I can't do that.
#endif
/* use this ipv strchr(s, 0) but no side effects in s! */