Jamfile #8

  • //
  • guest/
  • bob_summerwill/
  • jam/
  • src/
  • Jamfile
  • View
  • Commits
  • Open Download .zip Download (4 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.cpp FileNT.cpp   PathUnix.cpp ; } 
else if $(OS2)  { code = ExecUnix.cpp FileOS2.cpp  PathUnix.cpp ; } 
else if $(VMS)  { code = ExecVMS.cpp  FileVMS.cpp  PathVMS.cpp  ; } 
else if $(MAC)  { code = ExecMac.cpp  FileMac.cpp  PathMac.cpp  ; }
else            { code = ExecUnix.cpp FileUnix.cpp PathUnix.cpp ; }

# We have to signal jam.h for these

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

# Do we know yacc?

if $(YACC)  { code += JamGrammar.y ; }
else        { code += JamGrammar.cpp ; }

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

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

#
# How to build the compiled in jambase.
#

Main		mkjambase : MakeJambase.c ;

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

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

Library         libjam.a : 
		    Command.cpp Compile.cpp $(code) Expand.cpp Glob.cpp
		    Hash.cpp Headers.cpp Lists.cpp Make.cpp Make1.cpp NewStr.cpp
		    Option.cpp Parse.cpp RegExp.cpp Rules.cpp Scan.cpp Search.cpp
		    Timestamp.cpp Variable.cpp ;


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

#
# Distribution making from here on out.
#

ALLSOURCE =
    Jambase
    Jamfile
    Makefile
    Command.cpp
    Command.hpp
    Compile.cpp
    Compile.hpp
    ExecCommand.hpp
    ExecMac.cpp
    ExecUnix.cpp
    ExecVMS.cpp
    Expand.cpp
    Expand.hpp
    FileMac.cpp
    FileNT.cpp
    FileOS2.cpp
    FileSystem.hpp
    FileUnix.cpp
    FileVMS.cpp
    Glob.cpp
    Glob.hpp
    Hash.cpp
    Hash.hpp
    Headers.cpp
    Headers.hpp
    Jam.cpp
    Jam.hpp
    Jambase.c
    Jambase.h
    JamGrammar.cpp
    JamGrammar.hpp
    JamGrammar.y
    JamGrammar.yy
    JamGrammarTable.h
    Lists.cpp
    Lists.hpp
    Make.cpp
    Make.hpp
    Make1.cpp
    MakeJambase.c
    NewStr.cpp
    NewStr.hpp
    Option.cpp
    Option.hpp
    Parse.cpp
    Parse.hpp
    PatchLevel.hpp
    PathMac.cpp
    PathUnix.cpp
    PathVMS.cpp
    RegExp.cpp
    RegExp.hpp
    Rules.cpp
    Rules.hpp
    Scan.cpp
    Scan.hpp
    Search.cpp
    Search.hpp
    Timestamp.cpp
    Timestamp.hpp
    Variable.cpp
    Variable.hpp
    yyacc ;

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

	DEPENDS $(<) : $(>) ;

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

VERSION = jam-2.3.2 ;

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
#8 1138 bob_summerwill Removed all extern "C" wrappers, so the program now has C++ linkage throughout, ready for refactoring.
#7 1137 bob_summerwill Jambase files renamed.
#6 1136 bob_summerwill Updated the filenames for all the grammar files.
#5 1135 bob_summerwill Updated the Jamfile, so it matches the new filenames.
#4 1124 bob_summerwill More .c to .cpp conversions.
#3 1117 bob_summerwill Converted Compile and Expand files to C++.
 Some minor function prototype tweaks.
#2 1116 bob_summerwill command.c replaced with Command.cpp.
 Batch file now using Jam++ exe.  Updated Jamfile, to cope with C++ flags.
#1 1106 bob_summerwill Integrated Jam from "public" to "guest/bob_summerwill".
//guest/perforce_software/jam/src/Jamfile
#4 556 Perforce staff Patch release jam 2.3.2: reverse NOCARE change.
 NOCARE once
again applies to targets with source and/or actions, so that
buildable header files get built.
#3 486 Perforce staff Jam 2.3.
 See RELNOTES for a list of changes from 2.2.x.

Just about every source file was touched when jam got ANSI-fied.
#2 3 Perforce maintenance Jam/MR 2.2.1 (fix for NT handle leak)
#1 2 laura Add Jam/MR 2.2 source