# # 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.c ; } # # Build the JamGrammar.y from the JamGramar.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.c JamGrammar.h 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) ;