1 # Jamfile to build Jam (a make(1)-like program)
2 # There are no user-serviceable parts in this file.
3 VERSION = k8jam-2.5.11 ;
6 DEFINES += MKJAMBASE_COMPACT ;
7 #DEFINES += OPT_HEADER_CACHE_EXT ;
10 if ! $(THIS_IS_K8JAM) {
11 Exit "I WANT K8JAM!" ;
14 set-target-locations ;
18 if ! $(PREFIX) { PREFIX = /usr/local ; }
21 # note that we use the target directory 'bin.unix' to ensure that
22 # 'make install' and 'make uninstall' work correctly
24 #if ! $(LOCATE_TARGET) { LOCATE_TARGET = bin.unix/obj ; }
25 ALL_LOCATE_BIN = $(TOP)/bin.unix ;
27 #if ! $(LOCATE_TARGET) { LOCATE_TARGET = bin.$(OSFULL[1]:L)$(PATH_SEPARATOR)obj ; }
28 ALL_LOCATE_BIN = $(TOP)$(PATH_SEPARATOR)bin.$(OSFULL[1]:L) ;
31 # Leave generated source in current directory; it would be nice to use
32 # these lines below to build the source into the platform-specific
33 # directory, but getting scan.c to include the right jambase.h is
34 # hard: with ""'s, it always gets the bootstrap version; with <>'s,
35 # it won't find the bootstrap version.
37 # SEARCH_SOURCE ?= $(LOCATE_TARGET) $(DOT) ;
38 # LOCATE_SOURCE ?= $(LOCATE_TARGET) ;
40 # For some really stupid reason, classic Jam doesn't define NT
41 # when compiling with Mingw, but the variable MINGW instead..
43 if ! $(NT) && $(MINGW) {
48 if $(UNIX) && $(OS) = CYGWIN {
49 CCFLAGS += -D__cygwin__ ;
53 # We have to signal jam.h for these
55 switch $(JAM_TOOLSET) {
56 case MINGW : CCFLAGS += -DNT ;
57 case LCC : CCFLAGS += -DNT ;
58 case DIGITALMARS : CCFLAGS += -DNT ;
59 case * : CCFLAGS += /DNT ;
64 if ! $(DEBUG) && ! $(VALGRIND) {
70 # Strip the Jam executable on Mingw
71 if $(JAM_TOOLSET) = MINGW {
81 if $(DESTDIR) { INSTALLDIR_PREFIX = $(DESTDIR)$(PREFIX) ; } else { INSTALLDIR_PREFIX = $(PREFIX) ; }
82 INSTALLDIR_BIN = $(INSTALLDIR_PREFIX)/bin ;
83 INSTALLDIR_MAN = $(INSTALLDIR_PREFIX)/man ;
84 INSTALLDIR_DOCS = $(INSTALLDIR_PREFIX)/share/doc/$(VERSION) ;
88 HDRS += $(ALL_LOCATE_TARGET) ;
92 echo "usage: jam [target] [flags]"
94 echo " all/<empty> -- build"
95 echo " push -- push to github and gitorious"