1 if ! $(THIS_IS_K8JAM) { Exit "I WANT K8JAM!" ; }
2 # Jamfile to build Jam (a make(1)-like program)
3 # There are no user-serviceable parts in this file.
4 VERSION = k8jam-2.6.1 ;
8 if ! $(DONT_COMPACT) { DEFINES += MKJAMBASE_COMPACT ; }
10 #DEFINES += OPT_HEADER_CACHE_EXT ;
11 if $(DIET) { DEFINES += USE_DIETLIBC ; }
15 set-target-locations ;
19 #if ! $(PREFIX) { PREFIX = /usr/local ; }
21 include $(TOP)/Jamrules.configure ;
24 # note that we use the target directory 'bin.unix' to ensure that
25 # 'make install' and 'make uninstall' work correctly
27 #if ! $(LOCATE_TARGET) { LOCATE_TARGET = bin.unix/obj ; }
28 ALL_LOCATE_BIN = $(TOP)/bin.unix ;
30 #if ! $(LOCATE_TARGET) { LOCATE_TARGET = bin.$(OSFULL[1]:L)$(PATH_SEPARATOR)obj ; }
31 ALL_LOCATE_BIN = $(TOP)$(PATH_SEPARATOR)bin.$(OSFULL[1]:L) ;
34 # Leave generated source in current directory; it would be nice to use
35 # these lines below to build the source into the platform-specific
36 # directory, but getting scan.c to include the right jambase.h is
37 # hard: with ""'s, it always gets the bootstrap version; with <>'s,
38 # it won't find the bootstrap version.
40 # SEARCH_SOURCE ?= $(LOCATE_TARGET) $(DOT) ;
41 # LOCATE_SOURCE ?= $(LOCATE_TARGET) ;
43 # For some really stupid reason, classic Jam doesn't define NT
44 # when compiling with Mingw, but the variable MINGW instead..
46 if ! $(NT) && $(MINGW) {
51 if $(UNIX) && $(OS) = CYGWIN {
52 CCFLAGS += -D__cygwin__ ;
56 # We have to signal jam.h for these
58 switch $(JAM_TOOLSET) {
59 case MINGW : CCFLAGS += -DNT ;
60 case LCC : CCFLAGS += -DNT ;
61 case DIGITALMARS : CCFLAGS += -DNT ;
62 case * : CCFLAGS += /DNT ;
67 if ! $(DEBUG) && ! $(VALGRIND) {
73 # Strip the Jam executable on Mingw
74 if $(JAM_TOOLSET) = MINGW {
84 #if $(DESTDIR) { INSTALLDIR_PREFIX = $(DESTDIR)$(PREFIX) ; } else { INSTALLDIR_PREFIX = $(PREFIX) ; }
85 #INSTALLDIR_BIN = $(INSTALLDIR_PREFIX)/bin ;
86 #INSTALLDIR_MAN = $(INSTALLDIR_PREFIX)/man ;
87 #INSTALLDIR_DOCS = $(INSTALLDIR_PREFIX)/share/doc/$(VERSION) ;
91 # this was needed 'cause (LOCATE_SOURCE) was targeted there
92 #HDRS += $(ALL_LOCATE_TARGET)/src ;
95 actions quietly AShowHelp {
96 echo "usage: jam [target] [flags]"
98 echo " all/<empty> -- build"
99 #echo " push -- push to external git repository"
102 #InstallBin bin : jam ;
104 softinclude $(TOP)/Jamrules.local ;
105 softinclude $(TOP)/Jamrules.push ;
106 softinclude $(TOP)/Jamrules.install ;
114 #Echo "Lemon: <:" $(<) ;
115 #Echo "Lemon: >:" $(>) ;
118 # Some places don't have a yacc.
119 MakeLocate $(<) $(_h) : $(LOCATE_SOURCE) ;
120 #MakeLocate $(>) $(_h) : $(LOCATE_SOURCE) ;
122 Depends $(<) $(_h) : $(>) ;
123 GenFile $(<) : lemon $(>) ;
124 Clean clean : $(<) $(_h) ;
126 # make sure someone includes $(_h) else it will be
127 # a deadly independent target
128 Includes $(<) : $(_h) ;
135 Cc $(<) : $(<:S=$(YACCGEN)) ;
136 Lemon $(<:S=$(YACCGEN)) : $(>) ;