jam: Fix build/run on Windows.

Only works when compiled in 32-bit mode, as there's a whole bunch
of pointer arithmetic that depends on "int" being 32bit, not 64bit.
This commit is contained in:
Augustin Cavalier 2015-07-23 16:42:47 -04:00
parent 52fa22bd84
commit 148cc99040
4 changed files with 130 additions and 138 deletions

View File

@ -26,7 +26,7 @@
# 01/08/95 (seiwald) - Shell now handled with awk, not sed
# 01/09/95 (seiwald) - Install* now take dest directory as target
# 01/10/95 (seiwald) - All entries sorted.
# 01/10/95 (seiwald) - NT support moved in, with LauraW's help.
# 01/10/95 (seiwald) - NT support moved in, with LauraW's help.
# 01/10/95 (seiwald) - VMS support moved in.
# 02/06/95 (seiwald) - ObjectC++Flags and SubDirC++Flags added.
# 02/07/95 (seiwald) - Iron out when HDRSEARCH uses "" or SEARCH_SOURCE.
@ -42,14 +42,14 @@
#
# all - parent of first, shell, files, lib, exe
# first - first dependent of 'all', for potential initialization
# shell - parent of all Shell targets
# shell - parent of all Shell targets
# files - parent of all File targets
# lib - parent of all Library targets
# exe - parent of all Main targets
# dirs - parent of all MkDir targets
# clean - removes all Shell, File, Library, and Main targets
# uninstall - removes all Install targets
#
#
# Rules defined by this file:
#
@ -105,7 +105,7 @@
# FGristSourceFiles value ; return $(value:G=$(SOURCE_GRIST))
# FIsPrefix a : b ; return whether or not a is a prefix of b
# FStripCommon v1 : v2 ; strip common initial parts of v1 v2
# FReverse a1 a2 ... ; return ... a2 a1
# FReverse a1 a2 ... ; return ... a2 a1
# FRelPath d1 : d2 ; return rel path from d1 to d2
# FSubDir d1 d2 ... ; return path to root
#
@ -134,7 +134,7 @@
# Exit - blurt out targets and exit
# Includes - marks sources as headers for target (a codependency)
# NoCare - don't panic if the target can't be built
# NoUpdate - create the target if needed but never update it
# NoUpdate - create the target if needed but never update it
# NotFile - ignore the timestamp of the target (it's not a file)
# Temporary - target need not be present if sources haven't changed
#
@ -176,7 +176,7 @@ if $(NT)
SUFLIB ?= .lib ;
SUFOBJ ?= .obj ;
SUFEXE ?= .exe ;
if $(BCCROOT)
{
AR ?= tlib /C /P64 ;
@ -197,12 +197,9 @@ if $(NT)
CCFLAGS ?= /D \"WIN\" ;
C++ ?= $(CC) ;
C++FLAGS ?= $(CCFLAGS) ;
LINK ?= $(CC) ;
LINKFLAGS ?= $(CCFLAGS) ;
LINKLIBS ?=
$(MSVC)\\lib\\mlibce.lib
$(MSVC)\\lib\\oldnames.lib
;
LINK ?= link /nologo ;
LINKFLAGS ?= ;
LINKLIBS ?= ;
LINKLIBS ?= ;
NOARSCAN ?= true ;
OPTIM ?= ;
@ -213,7 +210,7 @@ if $(NT)
{
# Visual C++ 6.0 uses MSVCDIR
MSVCNT ?= $(MSVCDIR) ;
MSVCNT ?= $(MSVCDIR) ;
# bury IA64 in the path for the SDK
@ -227,9 +224,8 @@ if $(NT)
C++FLAGS ?= $(CCFLAGS) ;
LINK ?= link /nologo ;
LINKFLAGS ?= "" ;
LINKLIBS ?=
LINKLIBS ?=
$(MSVCNT)\\lib\\$(I)libc.lib
$(MSVCNT)\\lib\\$(I)oldnames.lib
$(MSVCNT)\\lib\\$(I)kernel32.lib ;
OPTIM ?= "" ;
STDHDRS ?= $(MSVCNT)\\include ;
@ -255,7 +251,7 @@ else if $(MINGW)
else if $(OS2)
{
WATCOM ?= $(watcom) ;
if ! $(WATCOM)
{
Exit On OS2, set WATCOM to the root of the Watcom directory. ;
@ -314,7 +310,7 @@ else if $(VMS)
SUFLIB ?= .olb ;
SUFOBJ ?= .obj ;
switch $(OS)
switch $(OS)
{
case OPENVMS : CCFLAGS ?= /stand=vaxc ;
case VMS : LINKLIBS ?= sys$library:vaxcrtl.olb/lib ;
@ -323,7 +319,7 @@ else if $(VMS)
else if $(MAC)
{
local OPT ;
CW ?= "{CW}" ;
MACHDRS ?=
@ -335,19 +331,19 @@ else if $(MAC)
"$(CW):MacOS Support:Universal:Libraries:StubLibraries:Interfacelib"
"$(CW):MacOS Support:Universal:Libraries:StubLibraries:Mathlib" ;
MPWLIBS ?=
MPWLIBS ?=
"$(CW):MacOS Support:Libraries:Runtime:Libs:MSL_MPWCRuntime_PPC.lib"
"$(CW):MSL:MSL_C:MSL_MacOS:Lib:PPC:MSL_C_PPC_MPW.Lib" ;
MPWNLLIBS ?=
MPWNLLIBS ?=
"$(CW):MacOS Support:Libraries:Runtime:Libs:MSL_MPWCRuntime_PPC.lib"
"$(CW):MSL:MSL_C:MSL_MacOS:Lib:PPC:MSL_C_PPC_MPW(NL).Lib" ;
SIOUXHDRS ?= ;
SIOUXLIBS ?=
SIOUXLIBS ?=
"$(CW):MacOS Support:Libraries:Runtime:Libs:MSL_Runtime_PPC.lib"
"$(CW):MSL:MSL_C:MSL_MacOS:Lib:PPC:MSL_SIOUX_PPC.Lib"
"$(CW):MSL:MSL_C:MSL_MacOS:Lib:PPC:MSL_SIOUX_PPC.Lib"
"$(CW):MSL:MSL_C:MSL_MacOS:Lib:PPC:MSL_C_PPC.Lib" ;
C++ ?= mwcppc ;
@ -359,15 +355,15 @@ else if $(MAC)
DOTDOT ?= "::" ;
HDRS ?= $(MACHDRS) $(MPWHDRS) ;
LINK ?= mwlinkppc ;
LINKFLAGS ?= -mpwtool -warn ;
LINKLIBS ?= $(MACLIBS) $(MPWLIBS) ;
LINKFLAGS ?= -mpwtool -warn ;
LINKLIBS ?= $(MACLIBS) $(MPWLIBS) ;
MKDIR ?= newfolder ;
MV ?= rename -y ;
NOARSCAN ?= true ;
OPTIM ?= ;
RM ?= delete -y ;
SLASH ?= ":" ;
STDHDRS ?= ;
STDHDRS ?= ;
SUFLIB ?= .lib ;
SUFOBJ ?= .o ;
}
@ -449,7 +445,7 @@ else if $(UNIX)
CC ?= gcc ;
YACC ?= bison -y ;
case CYGWIN :
case CYGWIN :
CC ?= gcc ;
CCFLAGS += -D__cygwin__ ;
LEX ?= flex ;
@ -478,12 +474,12 @@ else if $(UNIX)
C++ ?= gcc ;
CCFLAGS += -D_POSIX_SOURCE ;
HDRS += /usr/include ;
RANLIB ?= "" ;
RANLIB ?= "" ;
NOARSCAN ?= true ;
NOARUPDATE ?= true ;
case MVS :
RANLIB ?= "" ;
RANLIB ?= "" ;
case NEXT :
AR ?= libtool -o ;
@ -603,7 +599,7 @@ else if $(UNIX)
YACCFILES ?= ;
YACCFLAGS ?= ;
HDRPATTERN =
HDRPATTERN =
"^[ ]*#[ ]*include[ ]*[<\"]([^\">]*)[\">].*$" ;
OSFULL = $(OS)$(OSVER)$(OSPLAT) $(OS)$(OSPLAT) $(OS)$(OSVER) $(OS) ;
@ -695,7 +691,7 @@ rule Fortran
Depends $(<) : $(>) ;
}
rule GenFile
rule GenFile
{
local _t = [ FGristSourceFiles $(<) ] ;
local _s = [ FAppendSuffix $(>[1]) : $(SUFEXE) ] ;
@ -774,14 +770,14 @@ rule InstallInto
Install $(tt) : $(i) ;
Chmod $(tt) ;
if $(OWNER) && $(CHOWN)
{
if $(OWNER) && $(CHOWN)
{
Chown $(tt) ;
OWNER on $(tt) = $(OWNER) ;
}
if $(GROUP) && $(CHGRP)
{
if $(GROUP) && $(CHGRP)
{
Chgrp $(tt) ;
GROUP on $(tt) = $(GROUP) ;
}
@ -882,11 +878,11 @@ rule LibraryFromObjects
MakeLocate $(_l) $(_l)($(_s:BS)) : $(LOCATE_TARGET) ;
}
if $(NOARSCAN)
{
if $(NOARSCAN)
{
# If we can't scan the library to timestamp its contents,
# we have to just make the library depend directly on the
# on-disk object files.
# on-disk object files.
Depends $(_l) : $(_s) ;
}
@ -1016,18 +1012,18 @@ rule MkDir
# Make a directory and all its parent directories.
# Ignore timestamps on directories: we only care if they
# Ignore timestamps on directories: we only care if they
# exist.
NoUpdate $(<) ;
# Don't create . or any directory already created.
if $(<:G=) != $(DOT) && ! $($(<)-mkdir)
if $(<:G=) != $(DOT) && ! $($(<)-mkdir)
{
# Cheesy gate to prevent multiple invocations on same dir
# Arrange for jam dirs
# MkDir1 has the actions
# MkDir1 has the actions
$(<)-mkdir = true ;
LocalDepends dirs : $(<) ;
@ -1088,17 +1084,17 @@ rule Object
# the regexp pattern $(HDRSCAN) and then invokes $(HDRRULE)
# with the scanned file as the target and the found headers
# as the sources. HDRSEARCH is the value of SEARCH used for
# the found header files. Finally, if jam must deal with
# the found header files. Finally, if jam must deal with
# header files of the same name in different directories,
# they can be distinguished with HDRGRIST.
# $(SEARCH_SOURCE:E) is where cc first looks for #include
# "foo.h" files. If the source file is in a distant directory,
# $(SEARCH_SOURCE:E) is where cc first looks for #include
# "foo.h" files. If the source file is in a distant directory,
# look there. Else, look in "" (the current directory).
HDRRULE on $(>) = HdrRule ;
HDRSCAN on $(>) = $(HDRPATTERN) ;
HDRSEARCH on $(>) =
HDRSEARCH on $(>) =
$(SEARCH_SOURCE:E) $(SUBDIRHDRS) $(HDRS) $(STDHDRS) ;
HDRGRIST on $(>) = $(HDRGRIST) ;
@ -1215,7 +1211,7 @@ rule SubDir
# computes TOP as the path up from the current directory; the
# path contains one ../ for each of d1 d2 ...
#
# SubDir reads once the project-specific rules file Jamrules
# SubDir reads once the project-specific rules file Jamrules
# in the TOP directory, if present. This can be overridden
# with the variable TOPRULES.
#
@ -1232,7 +1228,7 @@ rule SubDir
# $(SEARCH_SOURCE) = $(SUBDIR)
# $(LOCATE_SOURCE) = $(ALL_LOCATE_TARGET) $(SUBDIR)
# $(LOCATE_TARGET) = $(ALL_LOCATE_TARGET) $(SUBDIR)
# $(SOURCE_GRIST) = $(SUBDIR_TOKENS) with !'s
# $(SOURCE_GRIST) = $(SUBDIR_TOKENS) with !'s
#
local _top = $(<[1]) ;
@ -1292,11 +1288,11 @@ rule SubDir
# merely a certain number of directories down from
# the current directory, and FSubDirPath will set
# TOP to a path consisting of ../ for each of the
# elements of _tokens, because that represents how
# elements of _tokens, because that represents how
# far below TOP the current directory sits.
#
# In the more complicated case, the starting directory
# isn't the directory of jam's invocation but an
# isn't the directory of jam's invocation but an
# location established by previous SubDir call. The
# starting directory is SUBDIR_UP directories up from
# SUBDIR_ROOT, and then SUBDIR_DOWN directories down
@ -1304,7 +1300,7 @@ rule SubDir
# SUBDIR_DOWN and SUBDIR_UP represent the path from
# the directory of jam's invocation.
#
# In the most complicated case, the _tokens also
# In the most complicated case, the _tokens also
# represents directories down, because TOP is being
# estalished in a directory other than TOP's root.
# Hopefully, _tokens and SUBDIR_DOWN represent the
@ -1330,9 +1326,9 @@ rule SubDir
SUBDIR_DOWN = [ FReverse $(SUBDIR_DOWN) ] ;
_tokens = [ FReverse $(_tokens) ] ;
if $(SUBDIR_DOWN) && $(_tokens)
{
Echo Warning: SubDir $(<) misplaced! ;
if $(SUBDIR_DOWN) && $(_tokens)
{
Echo Warning: SubDir $(<) misplaced! ;
}
# We'll remember the relative (UP/DOWN) path that
@ -1387,9 +1383,9 @@ rule SubDir
# Include $(TOPRULES) if set.
# Otherwise include $(TOP)/Jamrules if present.
if $($(_top)RULES) {
if $($(_top)RULES) {
include $($(_top)RULES) ;
} else {
} else {
NoCare $(JAMRULES:R=$($(_top)):G=$(_top)) ;
include $(JAMRULES:R=$($(_top)):G=$(_top)) ;
}
@ -1444,9 +1440,9 @@ rule FSubDirPath
# If jam is invoked in a subdirectory of the TOP, then we
# need to prepend a ../ for every level we must climb up
# (TOP-UP), and then append the directory names we must
# (TOP-UP), and then append the directory names we must
# climb down (TOP-DOWN), plus the named directories d1 ...
# If TOP was set externally, or computed from another TOP
# If TOP was set externally, or computed from another TOP
# that was, we'll have to reroot the whole thing at TOP-ROOT.
local _r = [ FRelPath $($(<[1])-UP) : $($(<[1])-DOWN) $(<[2-]) ] ;
@ -1549,7 +1545,7 @@ rule FGrist
}
rule FGristFiles
rule FGristFiles
{
return $(<:G=$(SOURCE_GRIST:E)) ;
}
@ -1562,7 +1558,7 @@ rule FGristSourceFiles
# files have global visibility.
#
# Here we comment out the old version and replace it with the new.
# # Produce source file name name with grist in it,
# # Produce source file name name with grist in it,
# # if SOURCE_GRIST is set.
#
# # Leave header files alone, because they have a global
@ -1572,7 +1568,7 @@ rule FGristSourceFiles
# {
# return $(<) ;
# }
# else
# else
# {
# local _i _o ;
#
@ -1611,7 +1607,7 @@ rule FIsPrefix
}
}
rule FReverse
rule FReverse
{
# FReverse a1 a2 a3 ... ;
# return ... a3 a2 a1 ;
@ -1625,10 +1621,10 @@ rule FSubDir
# path (using ../../ etc) back to that root directory.
# Sets result in $(<)
if ! $(<[1])
if ! $(<[1])
{
return $(DOT) ;
}
}
else
{
local _i _d ;
@ -1689,7 +1685,7 @@ rule FRelPath
rule FAppendSuffix
{
# E.g., "FAppendSuffix yacc lex foo.bat : $(SUFEXE) ;"
# returns (yacc,lex,foo.bat) on Unix and
# returns (yacc,lex,foo.bat) on Unix and
# (yacc.exe,lex.exe,foo.bat) on NT.
if $(>)
@ -1774,7 +1770,7 @@ else if $(VMS)
{
_s = $(DOT) ;
}
else
else
{
# This handles the following cases:
# a -> [.a]
@ -1870,7 +1866,7 @@ actions HardLink
actions Install
{
$(CP) $(>) $(<)
$(CP) $(>) $(<)
}
actions Lex
@ -1885,7 +1881,7 @@ actions LexMv
actions Link bind NEEDLIBS
{
$(LINK) $(LINKFLAGS) -o $(<) $(UNDEFS) $(>) $(NEEDLIBS) $(LINKLIBS)
$(LINK) $(LINKFLAGS) -o $(<) $(UNDEFS) $(>) $(NEEDLIBS) $(LINKLIBS)
}
actions MkDir1
@ -2012,7 +2008,7 @@ else if $(NT) && $(MSVC)
{
actions updated together piecemeal Archive
{
$(AR) $(<) -+$(>)
$(AR) $(<) $(>)
}
actions Cc
@ -2061,7 +2057,7 @@ else if $(OS2) && $(WATCOM)
{
actions together piecemeal Archive
{
$(AR) $(<) +-$(>)
$(AR) $(<) +-$(>)
}
actions Cc
@ -2091,19 +2087,19 @@ else if $(OS2) && $(WATCOM)
else if $(VMS)
{
actions updated together piecemeal Archive
actions updated together piecemeal Archive
{
lib/replace $(<) $(>[1]) ,$(>[2-])
}
actions Cc
{
$(CC)/obj=$(<) $(CCFLAGS) $(CCDEFS) $(CCHDRS) $(>)
{
$(CC)/obj=$(<) $(CCFLAGS) $(CCDEFS) $(CCHDRS) $(>)
}
actions C++
{
$(C++)/obj=$(<) $(C++FLAGS) $(CCDEFS) $(CCHDRS) $(>)
{
$(C++)/obj=$(<) $(C++FLAGS) $(CCDEFS) $(CCHDRS) $(>)
}
actions piecemeal together existing Clean
@ -2143,7 +2139,7 @@ else if $(VMS)
else if $(MAC)
{
actions together Archive
actions together Archive
{
$(LINK) -library -o $(<) $(>)
}
@ -2151,13 +2147,13 @@ else if $(MAC)
actions Cc
{
set -e MWCincludes $(CCHDRS)
$(CC) -o $(<) $(CCFLAGS) $(CCDEFS) $(>)
$(CC) -o $(<) $(CCFLAGS) $(CCDEFS) $(>)
}
actions C++
{
set -e MWCincludes $(CCHDRS)
$(CC) -o $(<) $(C++FLAGS) $(CCDEFS) $(>)
$(CC) -o $(<) $(C++FLAGS) $(CCDEFS) $(>)
}
actions Link bind NEEDLIBS

View File

@ -21,7 +21,7 @@ HOST_SYSTEM=$(shell uname)
#Lib = $(MSVCNT)/lib
#Include = $(MSVCNT)/include
#CC = cl /nologo
#CFLAGS = -I $(Include) -DNT
#CFLAGS = -I $(Include) -DNT
#TARGET = /Fejam0
#LINKLIBS = $(Lib)/oldnames.lib $(Lib)/kernel32.lib $(Lib)/libc.lib
#EXENAME = .\jam0.exe
@ -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
#CFLAGS = -DNT -D_CRT_SECURE_NO_WARNINGS -DWIN32_LEAN_AND_MEAN
#TARGET = /Fejam0
#EXENAME = .\jam0.exe
@ -67,7 +67,6 @@ SOURCES = \
rules.c scan.c search.c timestamp.c variable.c
all: $(EXENAME)
LINKLIBS=$(LINKLIBS) $(EXENAME)
$(EXENAME):
$(CC) $(TARGET) $(CFLAGS) $(SOURCES) $(LINKLIBS)

View File

@ -69,7 +69,7 @@
/* Do any of these work? */
# if defined( VAX ) || defined( __VAX ) || defined( vax )
# define OSPLAT "OSPLAT=VAX"
# endif
# endif
# endif
@ -94,6 +94,7 @@
# 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 '\\'
@ -399,9 +400,9 @@
# include <malloc.h>
# endif
# endif
# endif
/*
/*
* OSPLAT definitions - suppressed when it's a one-of-a-kind
*/
@ -427,7 +428,7 @@
!defined( OS_AS400 )
# define OSPLAT "OSPLAT=X86"
# endif
# endif
# endif
# ifdef __sparc__
# if !defined( OS_SUNOS )

View File

@ -32,12 +32,9 @@ const char *jambase[] = {
"CCFLAGS ?= /D \\\"WIN\\\" ;\n",
"C++ ?= $(CC) ;\n",
"C++FLAGS ?= $(CCFLAGS) ;\n",
"LINK ?= $(CC) ;\n",
"LINKFLAGS ?= $(CCFLAGS) ;\n",
"LINKLIBS ?= \n",
"$(MSVC)\\\\lib\\\\mlibce.lib\n",
"$(MSVC)\\\\lib\\\\oldnames.lib\n",
";\n",
"LINK ?= link /nologo ;\n",
"LINKFLAGS ?= ;\n",
"LINKLIBS ?= ;\n",
"LINKLIBS ?= ;\n",
"NOARSCAN ?= true ;\n",
"OPTIM ?= ;\n",
@ -46,7 +43,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",
@ -56,9 +53,8 @@ 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",
@ -137,7 +133,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",
@ -154,16 +150,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",
@ -174,15 +170,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",
@ -262,7 +258,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",
@ -286,11 +282,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",
@ -334,7 +330,7 @@ const char *jambase[] = {
"LEX ?= lex ;\n",
"LINKFLAGS ?= $(CCFLAGS) ;\n",
"LINKLIBS ?= ;\n",
"OPTIM ?= -O ;\n",
"OPTIM ?= ;\n",
"RANLIB ?= ranlib ;\n",
"YACC ?= yacc ;\n",
"YACCGEN ?= .c ;\n",
@ -391,7 +387,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",
@ -450,7 +446,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",
@ -494,13 +490,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",
@ -573,8 +569,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",
@ -647,7 +643,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",
@ -680,7 +676,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",
@ -778,9 +774,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",
@ -803,9 +799,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",
@ -884,7 +880,7 @@ const char *jambase[] = {
"{\n",
"return $(<:J=!) ;\n",
"}\n",
"rule FGristFiles \n",
"rule FGristFiles\n",
"{\n",
"return $(<:G=$(SOURCE_GRIST:E)) ;\n",
"}\n",
@ -906,16 +902,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",
@ -1014,7 +1010,7 @@ const char *jambase[] = {
"{\n",
"_s = $(DOT) ;\n",
"}\n",
"else \n",
"else\n",
"{\n",
"switch $(<[1])\n",
"{\n",
@ -1080,7 +1076,7 @@ const char *jambase[] = {
"}\n",
"actions Install\n",
"{\n",
"$(CP) $(>) $(<) \n",
"$(CP) $(>) $(<)\n",
"}\n",
"actions Lex\n",
"{\n",
@ -1092,7 +1088,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",
@ -1186,7 +1182,7 @@ const char *jambase[] = {
"{\n",
"actions updated together piecemeal Archive\n",
"{\n",
"$(AR) $(<) -+$(>)\n",
"$(AR) $(<) $(>)\n",
"}\n",
"actions Cc\n",
"{\n",
@ -1224,7 +1220,7 @@ const char *jambase[] = {
"{\n",
"actions together piecemeal Archive\n",
"{\n",
"$(AR) $(<) +-$(>) \n",
"$(AR) $(<) +-$(>)\n",
"}\n",
"actions Cc\n",
"{\n",
@ -1245,17 +1241,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",
@ -1284,19 +1280,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",