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.10 ;
6 DEFINES += MKJAMBASE_COMPACT ;
7 #DEFINES += OPT_HEADER_CACHE_EXT ;
10 if ! $(THIS_IS_K8JAM) {
11 Exit "I WANT K8JAM!" ;
14 set-target-locations ;
17 if ! $(PREFIX) { PREFIX = /usr/local ; }
20 # note that we use the target directory 'bin.unix' to ensure that
21 # 'make install' and 'make uninstall' work correctly
23 #if ! $(LOCATE_TARGET) { LOCATE_TARGET = bin.unix/obj ; }
24 ALL_LOCATE_BIN = $(TOP)/bin.unix ;
26 #if ! $(LOCATE_TARGET) { LOCATE_TARGET = bin.$(OSFULL[1]:L)$(PATH_SEPARATOR)obj ; }
27 ALL_LOCATE_BIN = $(TOP)$(PATH_SEPARATOR)bin.$(OSFULL[1]:L) ;
30 # Leave generated source in current directory; it would be nice to use
31 # these lines below to build the source into the platform-specific
32 # directory, but getting scan.c to include the right jambase.h is
33 # hard: with ""'s, it always gets the bootstrap version; with <>'s,
34 # it won't find the bootstrap version.
36 # SEARCH_SOURCE ?= $(LOCATE_TARGET) $(DOT) ;
37 # LOCATE_SOURCE ?= $(LOCATE_TARGET) ;
39 # For some really stupid reason, classic Jam doesn't define NT
40 # when compiling with Mingw, but the variable MINGW instead..
42 if ! $(NT) && $(MINGW) {
47 if $(UNIX) && $(OS) = CYGWIN {
48 CCFLAGS += -D__cygwin__ ;
52 # We have to signal jam.h for these
54 switch $(JAM_TOOLSET) {
55 case MINGW : CCFLAGS += -DNT ;
56 case LCC : CCFLAGS += -DNT ;
57 case DIGITALMARS : CCFLAGS += -DNT ;
58 case * : CCFLAGS += /DNT ;
63 if ! $(DEBUG) && ! $(VALGRIND) {
69 # Strip the Jam executable on Mingw
70 if $(JAM_TOOLSET) = MINGW {
80 if $(DESTDIR) { INSTALLDIR_PREFIX = $(DESTDIR)$(PREFIX) ; } else { INSTALLDIR_PREFIX = $(PREFIX) ; }
81 INSTALLDIR_BIN = $(INSTALLDIR_PREFIX)/bin ;
82 INSTALLDIR_MAN = $(INSTALLDIR_PREFIX)/man ;
83 INSTALLDIR_DOCS = $(INSTALLDIR_PREFIX)/share/doc/$(VERSION) ;
87 HDRS += $(ALL_LOCATE_TARGET) ;
91 echo "usage: jam [target] [flags]"
93 echo " all/<empty> -- build"
94 echo " push -- push to github and gitorious"