2 # Jamfile to build Jam (a make(1)-like program)
4 # There are no user-serviceable parts in this file.
6 # Put executables in platform-specific subdirectory.
10 # note that we use the target directory 'bin.unix' to ensure that
11 # 'make install' and 'make uninstall' work correctly
13 if $(VMS) { LOCATE_TARGET ?= [.binvms] ; }
14 else if $(MAC) { LOCATE_TARGET ?= :bin.mac ; }
15 else if $(UNIX) { LOCATE_TARGET ?= bin.unix ; }
16 else { LOCATE_TARGET ?= bin.$(OSFULL[1]:L) ; }
18 # Leave generated source in current directory; it would be nice to use
19 # these lines below to build the source into the platform-specific
20 # directory, but getting scan.c to include the right jambase.h is
21 # hard: with ""'s, it always gets the bootstrap version; with <>'s,
22 # it won't find the bootstrap version.
24 # SEARCH_SOURCE ?= $(LOCATE_TARGET) $(DOT) ;
25 # LOCATE_SOURCE ?= $(LOCATE_TARGET) ;
28 # We have some different files for UNIX, VMS, and NT.
32 # For some really stupid reason, classic Jam doesn't define NT
33 # when compiling with Mingw, but the variable MINGW instead..
36 if ! $(NT) && $(MINGW)
42 if $(NT) { code = execunix.c filent.c pathunix.c ; }
45 # special case for OS/2: when compiling with GCC/EMX, we use
46 # "fileunix.c" instead of "fileos2.c"
47 code = execunix.c pathunix.c ;
48 if $(JAM_TOOLSET) = EMX
50 CCFLAGS += -D__OS2__ ;
58 else if $(VMS) { code = execvms.c filevms.c pathvms.c ; }
59 else if $(MAC) { code = execmac.c filemac.c pathmac.c ; }
60 else { code = execunix.c fileunix.c pathunix.c ; }
62 if $(UNIX) && $(OS) = CYGWIN
64 CCFLAGS += -D__cygwin__ ;
67 # For jam profiling/debugging.
73 LOCATE_TARGET = $(LOCATE_TARGET)/pg ;
80 LOCATE_TARGET = $(LOCATE_TARGET)/g ;
83 # We have to signal jam.h for these
89 case MINGW : CCFLAGS += -DNT ;
90 case LCC : CCFLAGS += -DNT ;
91 case DIGITALMARS : CCFLAGS += -DNT ;
92 case * : CCFLAGS += /DNT ;
98 if $(YACC) { code += jamgram.y ; }
99 else { code += jamgram.c ; }
102 # Build the jamgram.y from the jamgram.yy
103 # yyacc is a slippery script that makes grammars a little
104 # easier to read/maintain.
107 if $(YACC) && $(SUFEXE) = ""
109 GenFile jamgram.y jamgramtab.h : ./yyacc jamgram.yy ;
113 # How to build the compiled in jambase.
116 Main mkjambase : mkjambase.c ;
122 CCFLAGS += /define=VMS ;
126 # The guts of the Jamfile: how to build Jam
129 Main jam : jam.c jambase.c ;
130 LinkLibraries jam : libjam.a ;
131 GenFile jambase.c : mkjambase Jambase ;
145 builtins.c command.c compile.c $(code) expand.c
146 glob.c hash.c headers.c lists.c make.c make1.c
147 newstr.c option.c parse.c regexp.c rules.c scan.c
148 search.c timestamp.c variable.c
152 # Strip the Jam executable on Mingw
154 if $(JAM_TOOLSET) = MINGW
165 if $(BINDIR) { InstallBin $(BINDIR) : jam ; }
168 # Distribution making from here on out.
172 Build.com Build.mpw Jam.html Jambase Jambase.html Jamfile
173 Jamfile.html Porting README RELNOTES builtins.c builtins.h
174 command.c command.h compile.c compile.h execcmd.h execmac.c
175 execnt.c execunix.c execvms.c expand.c expand.h filemac.c filent.c
176 fileos2.c filesys.h fileunix.c filevms.c glob.c hash.c hash.h
177 hdrmacro.c hdrmacro.h headers.c headers.h jam.c jam.h jambase.c
178 jambase.h jamgram.c jamgram.h jamgram.y jamgram.yy jamgramtab.h
179 lists.c lists.h make.c make.h make1.c mkjambase.c newstr.c newstr.h
180 option.c option.h parse.c parse.h patchlevel.h pathmac.c pathsys.h
181 pathunix.c pathvms.c regexp.c regexp.h rules.c rules.h scan.c
182 scan.h search.c search.h timestamp.c timestamp.h variable.c variable.h
190 [ GLOB builds : *.mk ]
191 [ GLOB builds/unix : *.in ]
192 builds/unix/configure
193 builds/unix/configure.ac
194 builds/unix/config.sub
195 builds/unix/config.guess
196 builds/unix/install-sh
197 builds/unix/mkinstalldirs
205 Depends package : $(<) ;
207 DEPENDS $(<) : $(>) ;
211 case *-win32.zip : Zip-Exe $(<) : $(>) ;
212 case *-os2.zip : Zip-Exe $(<) : $(>) ;
213 case *-linux-libc6.tar : GZip-Exe $(<) : $(>) ;
221 Depends package : $(<) ;
223 DEPENDS $(<) : $(>) ;
227 case *.tar : { Tar-Gz $(<) : $(>) ; Tar-Bz2 $(<) : $(>) ; }
228 case *.zip : Zip $(<) : $(>) ;
233 VERSION = kjam-2.5.2 ;
238 tar cvhf $(<) $(VERSION)/$(>)
246 tar cvhf $(<) $(VERSION)/$(>)
258 zip -9rl $(<) $(VERSION)/$(>)
274 zip -9j $(<) $(LOCATE_TARGET)\jam.exe
279 ln -s $(LOCATE_TARGET)/jam jam
289 Binary $(VERSION)-win32.zip : $(ALLSOURCE) ;
290 Package $(VERSION).zip : $(ALLSOURCE) ;
294 Binary $(VERSION)-os2.zip : $(ALLSOURCE) ;
295 Package $(VERSION).zip : $(ALLSOURCE) ;
299 # how can we detect the C library version reliably ??
300 # for now, this should only be used for convenience
301 # purposes, until we add .rpm and .deb support in..
305 Binary $(VERSION)-linux-libc6.tar : jam ;
308 Package $(VERSION).tar : $(ALLSOURCE) ;
309 Package $(VERSION).zip : $(ALLSOURCE) ;