diff --git a/Build.sh b/Build.sh index 98673e5..a75abd2 100644 --- a/Build.sh +++ b/Build.sh @@ -1,5 +1,5 @@ #!/bin/sh -srcversion='$MirOS: src/bin/mksh/Build.sh,v 1.516 2012/03/27 21:01:55 tg Exp $' +srcversion='$MirOS: src/bin/mksh/Build.sh,v 1.517 2012/03/27 21:23:50 tg Exp $' #- # Copyright (c) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, # 2011, 2012 @@ -1335,7 +1335,7 @@ else #define EXTERN #define MKSH_INCLUDES_ONLY #include "sh.h" - __RCSID("$MirOS: src/bin/mksh/Build.sh,v 1.516 2012/03/27 21:01:55 tg Exp $"); + __RCSID("$MirOS: src/bin/mksh/Build.sh,v 1.517 2012/03/27 21:23:50 tg Exp $"); int main(void) { printf("Hello, World!\n"); return (0); } EOF case $cm in @@ -1752,6 +1752,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 $e $bi$me: Finished configuration testing, now producing output.$ao diff --git a/Makefile b/Makefile index 8a54669..78c4d7c 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -# $MirOS: src/bin/mksh/Makefile,v 1.93 2012/03/23 19:38:11 tg Exp $ +# $MirOS: src/bin/mksh/Makefile,v 1.94 2012/03/27 21:23:51 tg Exp $ #- # Copyright (c) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 # Thorsten Glaser @@ -48,6 +48,7 @@ CPPFLAGS+= -DMKSH_ASSUME_UTF8 -DMKSH_DISABLE_DEPRECATED \ -DHAVE_PERSISTENT_HISTORY=1 # probably differs between i386 and sparc CPPFLAGS+= -DHAVE_SILENT_IDIVWRAPV=0 +CPPFLAGS+= -D${${PROG:L}_tf:C/(Mir${MAN:E}{0,1}){2}/4/:S/x/mksh_BUILD/:U} COPTS+= -std=gnu99 -Wall .endif @@ -95,6 +96,7 @@ cleandir: clean-extra clean-extra: .PHONY -rm -rf build-dir regress-dir printf.o printf.ln +mksh_tf=xMakefile${OStype:S/${MACHINE_OS}/1/1g}${OSNAME} distribution: sed 's!\$$I''d\([:$$]\)!$$M''irSecuCron\1!g' \ ${.CURDIR}/dot.mkshrc >${DESTDIR}/etc/skel/.mkshrc diff --git a/sh.h b/sh.h index 1bfca86..8e517c9 100644 --- a/sh.h +++ b/sh.h @@ -152,7 +152,7 @@ #endif #ifdef EXTERN -__RCSID("$MirOS: src/bin/mksh/sh.h,v 1.529 2012/03/26 21:10:44 tg Exp $"); +__RCSID("$MirOS: src/bin/mksh/sh.h,v 1.530 2012/03/27 21:23:52 tg Exp $"); #endif #define MKSH_VERSION "R40 2012/03/26" @@ -429,6 +429,11 @@ 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. +#error Must run Build.sh to compile this. +#endif + /* use this ipv strchr(s, 0) but no side effects in s! */ #define strnul(s) ((s) + strlen(s))