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 ;
7 # rule --bind-rule-- target : path {
8 # Echo "--bind-rule-- target:" $(target) : -n ;
9 # Echo "-- path:" $(path) ;
11 # BINDRULE = --bind-rule-- ;
15 if ! $(DONT_COMPACT) { DEFINES += MKJAMBASE_COMPACT ; }
17 #DEFINES += OPT_HEADER_CACHE_EXT ;
18 if $(DIET) { DEFINES += USE_DIETLIBC ; }
22 set-target-locations ;
26 #if ! $(PREFIX) { PREFIX = /usr/local ; }
28 include $(TOP)/Jamrules.configure ;
31 # note that we use the target directory 'bin.unix' to ensure that
32 # 'make install' and 'make uninstall' work correctly
34 #if ! $(LOCATE_TARGET) { LOCATE_TARGET = bin.unix/obj ; }
35 ALL_LOCATE_BIN = $(TOP)/bin.unix ;
37 #if ! $(LOCATE_TARGET) { LOCATE_TARGET = bin.$(OSFULL[1]:L)$(PATH_SEPARATOR)obj ; }
38 ALL_LOCATE_BIN = $(TOP)$(PATH_SEPARATOR)bin.$(OSFULL[1]:L) ;
41 # Leave generated source in current directory; it would be nice to use
42 # these lines below to build the source into the platform-specific
43 # directory, but getting scan.c to include the right jambase.h is
44 # hard: with ""'s, it always gets the bootstrap version; with <>'s,
45 # it won't find the bootstrap version.
47 # SEARCH_SOURCE ?= $(LOCATE_TARGET) $(DOT) ;
48 # LOCATE_SOURCE ?= $(LOCATE_TARGET) ;
50 # For some really stupid reason, classic Jam doesn't define NT
51 # when compiling with Mingw, but the variable MINGW instead..
53 if ! $(NT) && $(MINGW) {
58 if $(UNIX) && $(OS) = CYGWIN {
59 CCFLAGS += -D__cygwin__ ;
63 # We have to signal jam.h for these
65 switch $(JAM_TOOLSET) {
66 case MINGW : CCFLAGS += -DNT ;
67 case LCC : CCFLAGS += -DNT ;
68 case DIGITALMARS : CCFLAGS += -DNT ;
69 case * : CCFLAGS += /DNT ;
74 if ! $(DEBUG) && ! $(VALGRIND) {
80 # Strip the Jam executable on Mingw
81 if $(JAM_TOOLSET) = MINGW {
91 #if $(DESTDIR) { INSTALLDIR_PREFIX = $(DESTDIR)$(PREFIX) ; } else { INSTALLDIR_PREFIX = $(PREFIX) ; }
92 #INSTALLDIR_BIN = $(INSTALLDIR_PREFIX)/bin ;
93 #INSTALLDIR_MAN = $(INSTALLDIR_PREFIX)/man ;
94 #INSTALLDIR_DOCS = $(INSTALLDIR_PREFIX)/share/doc/$(VERSION) ;
98 # this was needed 'cause (LOCATE_SOURCE) was targeted there
99 #HDRS += $(ALL_LOCATE_TARGET)/src ;
102 actions quietly AShowHelp {
103 echo "usage: jam [target] [flags]"
105 echo " all/<empty> -- build"
106 #echo " push -- push to external git repository"
109 #InstallBin bin : jam ;
111 softinclude $(TOP)/Jamrules.local ;
112 softinclude $(TOP)/Jamrules.push ;
113 softinclude $(TOP)/Jamrules.install ;
121 #Echo "Lemon: <:" $(<) ;
122 #Echo "Lemon: >:" $(>) ;
125 # Some places don't have a yacc.
126 MakeLocate $(<) $(_h) : $(LOCATE_SOURCE) ;
127 #MakeLocate $(>) $(_h) : $(LOCATE_SOURCE) ;
129 Depends $(<) $(_h) : $(>) ;
130 GenFile $(<) : lemon $(>) ;
131 Clean clean : $(<) $(_h) ;
133 # make sure someone includes $(_h) else it will be
134 # a deadly independent target
135 Includes $(<) : $(_h) ;
142 Cc $(<) : $(<:S=$(YACCGEN)) ;
143 Lemon $(<:S=$(YACCGEN)) : $(>) ;