Jamfile #4

  • //
  • guest/
  • grant_glouser/
  • jam/
  • Jamfile
  • View
  • Commits
  • Open Download .zip Download (3 KB)
#
# Jamfile to build Jam (a make(1)-like program)
#
# There are no user-serviceable parts in this file.
#
# Put executables in platform-specific  subdirectory.

if $(VMS) 	{ LOCATE_TARGET ?= [.binvms] ; }
else if $(MAC) 	{ LOCATE_TARGET ?= :bin.mac ; }
else 		{ LOCATE_TARGET ?= bin.$(OSFULL[1]:L) ; }

# Leave generated source in current directory; it would be nice to use
# these lines below to build the source into the platform-specific
# directory, but getting scan.c to include the right jambase.h is
# hard: with ""'s, it always gets the bootstrap version; with <>'s,
# it won't find the bootstrap version.

# SEARCH_SOURCE ?= $(LOCATE_TARGET) $(DOT) ;
# LOCATE_SOURCE ?= $(LOCATE_TARGET) ;

#
# We have some different files for UNIX, VMS, and NT.
#

if $(NT) 	{ code = execunix.c filent.c pathunix.c ; } 
else if $(OS2)	{ code = execunix.c fileos2.c pathunix.c ; } 
else if $(VMS) 	{ code = execvms.c filevms.c pathvms.c ; } 
else if $(MAC)	{ code = execmac.c filemac.c pathmac.c utilmac.c ; }
else 		{ code = execunix.c fileunix.c pathunix.c ; }

# We have to signal jam.h for these

if $(OS) = NT 			{ CCFLAGS += /DNT ; }

# Do we know yacc?

if $(YACC) 	{ code += jamgram.y ; }
else            { code += jamgram.c ; }

#
# Build the jamgram.y from the jamgram.yy
# yyacc is a slippery script that makes grammars a little
# easier to read/maintain.
#

if $(UNIX) && $(YACC)
{
	GenFile jamgram.y jamgramtab.h : yyacc jamgram.yy ;
}

#
# How to build the compiled in jambase.
#

Main		mkjambase : mkjambase.c ;

#
# The guts of the Jamfile: how to build Jam
#

Main 		jam : jam.c jambase.c ;
LinkLibraries 	jam : libjam.a ;
GenFile 	jambase.c : mkjambase Jambase ;

Library         libjam.a : 
		    command.c compile.c $(code) expand.c glob.c
		    hash.c headers.c lists.c make.c make1.c newstr.c
		    option.c parse.c regexp.c rules.c scan.c search.c
		    timestamp.c variable.c ;


if $(BINDIR) 	{ InstallBin $(BINDIR) : jam ; }

#
# Distribution making from here on out.
#

ALLSOURCE =
	Build.com Build.mpw Jam.html Jambase Jambase.html Jamfile
	Jamfile.html Makefile Porting README RELNOTES command.c command.h
	compile.c compile.h execcmd.h execmac.c execunix.c execvms.c
	expand.c expand.h filemac.c filent.c fileos2.c filesys.h fileunix.c
	filevms.c glob.c hash.c hash.h headers.c headers.h jam.c jam.h
	jambase.c jambase.h jamgram.c jamgram.h jamgram.y jamgram.yy
	jamgramtab.h lists.c lists.h make.c make.h make1.c mkjambase.c
	newstr.c newstr.h option.c option.h parse.c parse.h patchlevel.h
	pathmac.c pathunix.c pathvms.c regexp.c regexp.h rules.c rules.h
	scan.c scan.h search.c search.h timestamp.c timestamp.h variable.c
	variable.h yyacc ;

rule Ball
{
	NotFile balls ;
	Depends balls : $(<) ;

	DEPENDS $(<) : $(>) ;

	switch $(<) 
	{
	case *.tar : Tar $(<) : $(>) ;
	case *.shar : Shar $(<) : $(>) ;
	case *.zip : Zip $(<) : $(>) ;
	}
}

VERSION = jam-2.3 ;

actions Tar
{
	ln -s . $(VERSION)
	tar cvhf $(<) $(VERSION)/$(>)
	rm $(VERSION)
}

actions Shar
{
	shar $(>) > $(<)
}

actions Zip
{
	zip $(<) $(>) 
}

Ball $(VERSION).shar : $(ALLSOURCE) ;
Ball $(VERSION).tar : $(ALLSOURCE) ;
Ball $(VERSION).zip : $(ALLSOURCE) ;
# Change User Description Committed
#4 553 Grant Glouser Integrate Jam 2.3 changes.
#3 425 Grant Glouser Revamped Mac build to use MPW Interfaces&Libraries.

In particular, the bootstrap script and the default Jambase
settings use the standard MPW tools, headers and libraries
(this package is available from Apple's developer website).
The Jambase also retains some support for the CodeWarrior tools
- this can be enabled by passing -sMETROWERKS=true on the jam
command line.  The bootstrap script should also work with
the CodeWarrior MPW package, although it uses only the
standard MPW tools/headers/libs.

Also added SubDirHook to the Jambase.
#2 352 Grant Glouser Use MacOS native APIs instead of GUSI.
And additional Mac path handling improvements.

filemac.c
    - rewrote file_dirscan and file_time to use MacOS native API
    (PBGetCatInfo).  This means GUSI is no longer needed, which should
    make Jam more stable and ever so slightly faster under MacOS.

pathmac.c
    - no trailing colons on directories.  This has the effect of allowing
    rules to recursively process paths under MacOS (which makes MacOS just
    like every other platform in this respect).

timestamp.c
    - extra timestamp check for possible volume names under MacOS
    - case-sensitivity OFF for MacOS

Jamfile and Build.mpw
    - altered to remove GUSI header search paths and libraries.  This
    complicates the Jamfile - perhaps these changes should be merged
    into the Jambase.
#1 300 Grant Glouser Branching jam sources to my guest directory.