Revert "jam: Fix build/run on Windows."

This reverts commit 148cc99040.
It broke the build on Linux.
This commit is contained in:
Jérôme Duval 2015-08-07 17:22:32 +02:00
parent 7c3622a5de
commit f625dd9f94
4 changed files with 138 additions and 130 deletions

View File

@ -197,9 +197,12 @@ if $(NT)
CCFLAGS ?= /D \"WIN\" ;
C++ ?= $(CC) ;
C++FLAGS ?= $(CCFLAGS) ;
LINK ?= link /nologo ;
LINKFLAGS ?= ;
LINKLIBS ?= ;
LINK ?= $(CC) ;
LINKFLAGS ?= $(CCFLAGS) ;
LINKLIBS ?=
$(MSVC)\\lib\\mlibce.lib
$(MSVC)\\lib\\oldnames.lib
;
LINKLIBS ?= ;
NOARSCAN ?= true ;
OPTIM ?= ;
@ -226,6 +229,7 @@ if $(NT)
LINKFLAGS ?= "" ;
LINKLIBS ?=
$(MSVCNT)\\lib\\$(I)libc.lib
$(MSVCNT)\\lib\\$(I)oldnames.lib
$(MSVCNT)\\lib\\$(I)kernel32.lib ;
OPTIM ?= "" ;
STDHDRS ?= $(MSVCNT)\\include ;
@ -2008,7 +2012,7 @@ else if $(NT) && $(MSVC)
{
actions updated together piecemeal Archive
{
$(AR) $(<) $(>)
$(AR) $(<) -+$(>)
}
actions Cc

View File

@ -29,7 +29,7 @@ HOST_SYSTEM=$(shell uname)
# NT (with Microsoft compiler)
# People with DevStudio settings already in shell environment.
#CC = cl /nologo
#CFLAGS = -DNT -D_CRT_SECURE_NO_WARNINGS -DWIN32_LEAN_AND_MEAN
#CFLAGS = -DNT
#TARGET = /Fejam0
#EXENAME = .\jam0.exe
@ -67,6 +67,7 @@ SOURCES = \
rules.c scan.c search.c timestamp.c variable.c
all: $(EXENAME)
LINKLIBS=$(LINKLIBS) $(EXENAME)
$(EXENAME):
$(CC) $(TARGET) $(CFLAGS) $(SOURCES) $(LINKLIBS)

View File

@ -94,7 +94,6 @@
# define OS_NT
# define SPLITPATH ';'
# define MAXLINE 996 /* longest 'together' actions */
# define PATH_MAX _MAX_PATH
# define USE_EXECUNIX
# define USE_PATHUNIX
# define PATH_DELIM '\\'

View File

@ -32,9 +32,12 @@ const char *jambase[] = {
"CCFLAGS ?= /D \\\"WIN\\\" ;\n",
"C++ ?= $(CC) ;\n",
"C++FLAGS ?= $(CCFLAGS) ;\n",
"LINK ?= link /nologo ;\n",
"LINKFLAGS ?= ;\n",
"LINKLIBS ?= ;\n",
"LINK ?= $(CC) ;\n",
"LINKFLAGS ?= $(CCFLAGS) ;\n",
"LINKLIBS ?= \n",
"$(MSVC)\\\\lib\\\\mlibce.lib\n",
"$(MSVC)\\\\lib\\\\oldnames.lib\n",
";\n",
"LINKLIBS ?= ;\n",
"NOARSCAN ?= true ;\n",
"OPTIM ?= ;\n",
@ -43,7 +46,7 @@ const char *jambase[] = {
"}\n",
"else if $(MSVCNT) || $(MSVCDIR)\n",
"{\n",
"MSVCNT ?= $(MSVCDIR) ;\n",
"MSVCNT ?= $(MSVCDIR) ; \n",
"local I ; if $(OSPLAT) = IA64 { I = ia64\\\\ ; } else { I = \"\" ; }\n",
"AR ?= lib ;\n",
"AS ?= masm386 ;\n",
@ -53,8 +56,9 @@ const char *jambase[] = {
"C++FLAGS ?= $(CCFLAGS) ;\n",
"LINK ?= link /nologo ;\n",
"LINKFLAGS ?= \"\" ;\n",
"LINKLIBS ?=\n",
"LINKLIBS ?= \n",
"$(MSVCNT)\\\\lib\\\\$(I)libc.lib\n",
"$(MSVCNT)\\\\lib\\\\$(I)oldnames.lib\n",
"$(MSVCNT)\\\\lib\\\\$(I)kernel32.lib ;\n",
"OPTIM ?= \"\" ;\n",
"STDHDRS ?= $(MSVCNT)\\\\include ;\n",
@ -133,7 +137,7 @@ const char *jambase[] = {
"SUFEXE ?= .exe ;\n",
"SUFLIB ?= .olb ;\n",
"SUFOBJ ?= .obj ;\n",
"switch $(OS)\n",
"switch $(OS) \n",
"{\n",
"case OPENVMS : CCFLAGS ?= /stand=vaxc ;\n",
"case VMS : LINKLIBS ?= sys$library:vaxcrtl.olb/lib ;\n",
@ -150,16 +154,16 @@ const char *jambase[] = {
"MACLIBS ?=\n",
"\"$(CW):MacOS Support:Universal:Libraries:StubLibraries:Interfacelib\"\n",
"\"$(CW):MacOS Support:Universal:Libraries:StubLibraries:Mathlib\" ;\n",
"MPWLIBS ?=\n",
"MPWLIBS ?= \n",
"\"$(CW):MacOS Support:Libraries:Runtime:Libs:MSL_MPWCRuntime_PPC.lib\"\n",
"\"$(CW):MSL:MSL_C:MSL_MacOS:Lib:PPC:MSL_C_PPC_MPW.Lib\" ;\n",
"MPWNLLIBS ?=\n",
"MPWNLLIBS ?= \n",
"\"$(CW):MacOS Support:Libraries:Runtime:Libs:MSL_MPWCRuntime_PPC.lib\"\n",
"\"$(CW):MSL:MSL_C:MSL_MacOS:Lib:PPC:MSL_C_PPC_MPW(NL).Lib\" ;\n",
"SIOUXHDRS ?= ;\n",
"SIOUXLIBS ?=\n",
"SIOUXLIBS ?= \n",
"\"$(CW):MacOS Support:Libraries:Runtime:Libs:MSL_Runtime_PPC.lib\"\n",
"\"$(CW):MSL:MSL_C:MSL_MacOS:Lib:PPC:MSL_SIOUX_PPC.Lib\"\n",
"\"$(CW):MSL:MSL_C:MSL_MacOS:Lib:PPC:MSL_SIOUX_PPC.Lib\" \n",
"\"$(CW):MSL:MSL_C:MSL_MacOS:Lib:PPC:MSL_C_PPC.Lib\" ;\n",
"C++ ?= mwcppc ;\n",
"C++FLAGS ?= -w off ;\n",
@ -170,15 +174,15 @@ const char *jambase[] = {
"DOTDOT ?= \"::\" ;\n",
"HDRS ?= $(MACHDRS) $(MPWHDRS) ;\n",
"LINK ?= mwlinkppc ;\n",
"LINKFLAGS ?= -mpwtool -warn ;\n",
"LINKLIBS ?= $(MACLIBS) $(MPWLIBS) ;\n",
"LINKFLAGS ?= -mpwtool -warn ; \n",
"LINKLIBS ?= $(MACLIBS) $(MPWLIBS) ; \n",
"MKDIR ?= newfolder ;\n",
"MV ?= rename -y ;\n",
"NOARSCAN ?= true ;\n",
"OPTIM ?= ;\n",
"RM ?= delete -y ;\n",
"SLASH ?= \":\" ;\n",
"STDHDRS ?= ;\n",
"STDHDRS ?= ; \n",
"SUFLIB ?= .lib ;\n",
"SUFOBJ ?= .o ;\n",
"}\n",
@ -258,7 +262,7 @@ const char *jambase[] = {
"case AMIGA :\n",
"CC ?= gcc ;\n",
"YACC ?= bison -y ;\n",
"case CYGWIN :\n",
"case CYGWIN : \n",
"CC ?= gcc ;\n",
"CCFLAGS += -D__cygwin__ ;\n",
"LEX ?= flex ;\n",
@ -282,11 +286,11 @@ const char *jambase[] = {
"C++ ?= gcc ;\n",
"CCFLAGS += -D_POSIX_SOURCE ;\n",
"HDRS += /usr/include ;\n",
"RANLIB ?= \"\" ;\n",
"RANLIB ?= \"\" ; \n",
"NOARSCAN ?= true ;\n",
"NOARUPDATE ?= true ;\n",
"case MVS :\n",
"RANLIB ?= \"\" ;\n",
"RANLIB ?= \"\" ; \n",
"case NEXT :\n",
"AR ?= libtool -o ;\n",
"RANLIB ?= \"\" ;\n",
@ -330,7 +334,7 @@ const char *jambase[] = {
"LEX ?= lex ;\n",
"LINKFLAGS ?= $(CCFLAGS) ;\n",
"LINKLIBS ?= ;\n",
"OPTIM ?= ;\n",
"OPTIM ?= -O ;\n",
"RANLIB ?= ranlib ;\n",
"YACC ?= yacc ;\n",
"YACCGEN ?= .c ;\n",
@ -387,7 +391,7 @@ const char *jambase[] = {
"YACCGEN ?= ;\n",
"YACCFILES ?= ;\n",
"YACCFLAGS ?= ;\n",
"HDRPATTERN =\n",
"HDRPATTERN = \n",
"\"^[ ]*#[ ]*include[ ]*[<\\\"]([^\\\">]*)[\\\">].*$\" ;\n",
"OSFULL = $(OS)$(OSVER)$(OSPLAT) $(OS)$(OSPLAT) $(OS)$(OSVER) $(OS) ;\n",
"Depends all : shell files lib exe obj ;\n",
@ -446,7 +450,7 @@ const char *jambase[] = {
"{\n",
"Depends $(<) : $(>) ;\n",
"}\n",
"rule GenFile\n",
"rule GenFile \n",
"{\n",
"local _t = [ FGristSourceFiles $(<) ] ;\n",
"local _s = [ FAppendSuffix $(>[1]) : $(SUFEXE) ] ;\n",
@ -490,13 +494,13 @@ const char *jambase[] = {
"Depends $(tt) : $(i) ;\n",
"Install $(tt) : $(i) ;\n",
"Chmod $(tt) ;\n",
"if $(OWNER) && $(CHOWN)\n",
"{\n",
"if $(OWNER) && $(CHOWN) \n",
"{ \n",
"Chown $(tt) ;\n",
"OWNER on $(tt) = $(OWNER) ;\n",
"}\n",
"if $(GROUP) && $(CHGRP)\n",
"{\n",
"if $(GROUP) && $(CHGRP) \n",
"{ \n",
"Chgrp $(tt) ;\n",
"GROUP on $(tt) = $(GROUP) ;\n",
"}\n",
@ -569,8 +573,8 @@ const char *jambase[] = {
"{\n",
"MakeLocate $(_l) $(_l)($(_s:BS)) : $(LOCATE_TARGET) ;\n",
"}\n",
"if $(NOARSCAN)\n",
"{\n",
"if $(NOARSCAN) \n",
"{ \n",
"Depends $(_l) : $(_s) ;\n",
"}\n",
"else\n",
@ -643,7 +647,7 @@ const char *jambase[] = {
"rule MkDir\n",
"{\n",
"NoUpdate $(<) ;\n",
"if $(<:G=) != $(DOT) && ! $($(<)-mkdir)\n",
"if $(<:G=) != $(DOT) && ! $($(<)-mkdir) \n",
"{\n",
"$(<)-mkdir = true ;\n",
"LocalDepends dirs : $(<) ;\n",
@ -676,7 +680,7 @@ const char *jambase[] = {
"HDRS on $(<) = $(SEARCH_SOURCE) $(SUBDIRHDRS) $(HDRS) ;\n",
"HDRRULE on $(>) = HdrRule ;\n",
"HDRSCAN on $(>) = $(HDRPATTERN) ;\n",
"HDRSEARCH on $(>) =\n",
"HDRSEARCH on $(>) = \n",
"$(SEARCH_SOURCE:E) $(SUBDIRHDRS) $(HDRS) $(STDHDRS) ;\n",
"HDRGRIST on $(>) = $(HDRGRIST) ;\n",
"DEFINES on $(<) += $(DEFINES) ;\n",
@ -774,9 +778,9 @@ const char *jambase[] = {
"FStripCommon _tokens : SUBDIR_DOWN ;\n",
"SUBDIR_DOWN = [ FReverse $(SUBDIR_DOWN) ] ;\n",
"_tokens = [ FReverse $(_tokens) ] ;\n",
"if $(SUBDIR_DOWN) && $(_tokens)\n",
"{\n",
"Echo Warning: SubDir $(<) misplaced! ;\n",
"if $(SUBDIR_DOWN) && $(_tokens) \n",
"{ \n",
"Echo Warning: SubDir $(<) misplaced! ; \n",
"}\n",
"$(_top)-UP = $(SUBDIR_UP) $(_tokens) ;\n",
"$(_top)-DOWN = $(SUBDIR_DOWN) ;\n",
@ -799,9 +803,9 @@ const char *jambase[] = {
"jumptoeof ;\n",
"}\n",
"}\n",
"if $($(_top)RULES) {\n",
"if $($(_top)RULES) { \n",
"include $($(_top)RULES) ;\n",
"} else {\n",
"} else { \n",
"NoCare $(JAMRULES:R=$($(_top)):G=$(_top)) ;\n",
"include $(JAMRULES:R=$($(_top)):G=$(_top)) ;\n",
"}\n",
@ -880,7 +884,7 @@ const char *jambase[] = {
"{\n",
"return $(<:J=!) ;\n",
"}\n",
"rule FGristFiles\n",
"rule FGristFiles \n",
"{\n",
"return $(<:G=$(SOURCE_GRIST:E)) ;\n",
"}\n",
@ -902,16 +906,16 @@ const char *jambase[] = {
"return true ;\n",
"}\n",
"}\n",
"rule FReverse\n",
"rule FReverse \n",
"{\n",
"if $(1) { return [ FReverse $(1[2-]) ] $(1[1]) ; }\n",
"}\n",
"rule FSubDir\n",
"{\n",
"if ! $(<[1])\n",
"if ! $(<[1]) \n",
"{\n",
"return $(DOT) ;\n",
"}\n",
"} \n",
"else\n",
"{\n",
"local _i _d ;\n",
@ -1010,7 +1014,7 @@ const char *jambase[] = {
"{\n",
"_s = $(DOT) ;\n",
"}\n",
"else\n",
"else \n",
"{\n",
"switch $(<[1])\n",
"{\n",
@ -1076,7 +1080,7 @@ const char *jambase[] = {
"}\n",
"actions Install\n",
"{\n",
"$(CP) $(>) $(<)\n",
"$(CP) $(>) $(<) \n",
"}\n",
"actions Lex\n",
"{\n",
@ -1088,7 +1092,7 @@ const char *jambase[] = {
"}\n",
"actions Link bind NEEDLIBS\n",
"{\n",
"$(LINK) $(LINKFLAGS) -o $(<) $(UNDEFS) $(>) $(NEEDLIBS) $(LINKLIBS)\n",
"$(LINK) $(LINKFLAGS) -o $(<) $(UNDEFS) $(>) $(NEEDLIBS) $(LINKLIBS) \n",
"}\n",
"actions MkDir1\n",
"{\n",
@ -1182,7 +1186,7 @@ const char *jambase[] = {
"{\n",
"actions updated together piecemeal Archive\n",
"{\n",
"$(AR) $(<) $(>)\n",
"$(AR) $(<) -+$(>)\n",
"}\n",
"actions Cc\n",
"{\n",
@ -1220,7 +1224,7 @@ const char *jambase[] = {
"{\n",
"actions together piecemeal Archive\n",
"{\n",
"$(AR) $(<) +-$(>)\n",
"$(AR) $(<) +-$(>) \n",
"}\n",
"actions Cc\n",
"{\n",
@ -1241,17 +1245,17 @@ const char *jambase[] = {
"}\n",
"else if $(VMS)\n",
"{\n",
"actions updated together piecemeal Archive\n",
"actions updated together piecemeal Archive \n",
"{\n",
"lib/replace $(<) $(>[1]) ,$(>[2-])\n",
"}\n",
"actions Cc\n",
"{\n",
"$(CC)/obj=$(<) $(CCFLAGS) $(CCDEFS) $(CCHDRS) $(>)\n",
"{ \n",
"$(CC)/obj=$(<) $(CCFLAGS) $(CCDEFS) $(CCHDRS) $(>) \n",
"}\n",
"actions C++\n",
"{\n",
"$(C++)/obj=$(<) $(C++FLAGS) $(CCDEFS) $(CCHDRS) $(>)\n",
"{ \n",
"$(C++)/obj=$(<) $(C++FLAGS) $(CCDEFS) $(CCHDRS) $(>) \n",
"}\n",
"actions piecemeal together existing Clean\n",
"{\n",
@ -1280,19 +1284,19 @@ const char *jambase[] = {
"}\n",
"else if $(MAC)\n",
"{\n",
"actions together Archive\n",
"actions together Archive \n",
"{\n",
"$(LINK) -library -o $(<) $(>)\n",
"}\n",
"actions Cc\n",
"{\n",
"set -e MWCincludes $(CCHDRS)\n",
"$(CC) -o $(<) $(CCFLAGS) $(CCDEFS) $(>)\n",
"$(CC) -o $(<) $(CCFLAGS) $(CCDEFS) $(>) \n",
"}\n",
"actions C++\n",
"{\n",
"set -e MWCincludes $(CCHDRS)\n",
"$(CC) -o $(<) $(C++FLAGS) $(CCDEFS) $(>)\n",
"$(CC) -o $(<) $(C++FLAGS) $(CCDEFS) $(>) \n",
"}\n",
"actions Link bind NEEDLIBS\n",
"{\n",