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 ; }
20 if $(RE9DBGMEM) { DEFINES += REGEXP9_DEBUG_MEMSIZE ; }
23 set-target-locations ;
27 #if ! $(PREFIX) { PREFIX = /usr/local ; }
29 include $(TOP)/Jamrules.configure ;
32 # note that we use the target directory 'bin.unix' to ensure that
33 # 'make install' and 'make uninstall' work correctly
35 #if ! $(LOCATE_TARGET) { LOCATE_TARGET = bin.unix/obj ; }
36 ALL_LOCATE_BIN = $(TOP)/bin.unix ;
38 #if ! $(LOCATE_TARGET) { LOCATE_TARGET = bin.$(OSFULL[1]:L)$(PATH_SEPARATOR)obj ; }
39 ALL_LOCATE_BIN = $(TOP)$(PATH_SEPARATOR)bin.$(OSFULL[1]:L) ;
42 # Leave generated source in current directory; it would be nice to use
43 # these lines below to build the source into the platform-specific
44 # directory, but getting scan.c to include the right jambase.h is
45 # hard: with ""'s, it always gets the bootstrap version; with <>'s,
46 # it won't find the bootstrap version.
48 # SEARCH_SOURCE ?= $(LOCATE_TARGET) $(DOT) ;
49 # LOCATE_SOURCE ?= $(LOCATE_TARGET) ;
51 # For some really stupid reason, classic Jam doesn't define NT
52 # when compiling with Mingw, but the variable MINGW instead..
54 if ! $(NT) && $(MINGW) {
59 if $(UNIX) && $(OS) = CYGWIN {
60 CCFLAGS += -D__cygwin__ ;
64 # We have to signal jam.h for these
66 switch $(JAM_TOOLSET) {
67 case MINGW : CCFLAGS += -DNT ;
68 case LCC : CCFLAGS += -DNT ;
69 case DIGITALMARS : CCFLAGS += -DNT ;
70 case * : CCFLAGS += /DNT ;
75 if ! $(DEBUG) && ! $(VALGRIND) {
81 # Strip the Jam executable on Mingw
82 if $(JAM_TOOLSET) = MINGW {
92 #if $(DESTDIR) { INSTALLDIR_PREFIX = $(DESTDIR)$(PREFIX) ; } else { INSTALLDIR_PREFIX = $(PREFIX) ; }
93 #INSTALLDIR_BIN = $(INSTALLDIR_PREFIX)/bin ;
94 #INSTALLDIR_MAN = $(INSTALLDIR_PREFIX)/man ;
95 #INSTALLDIR_DOCS = $(INSTALLDIR_PREFIX)/share/doc/$(VERSION) ;
99 # this was needed 'cause (LOCATE_SOURCE) was targeted there
100 #HDRS += $(ALL_LOCATE_TARGET)/src ;
103 actions quietly AShowHelp {
104 echo "usage: jam [target] [flags]"
106 echo " all/<empty> -- build"
107 #echo " push -- push to external git repository"
110 #InstallBin bin : jam ;
112 softinclude $(TOP)/Jamrules.local ;
113 softinclude $(TOP)/Jamrules.push ;
114 softinclude $(TOP)/Jamrules.install ;
122 ### Echo "Lemon: <:" $(<) ;
123 ### Echo "Lemon: >:" $(>) ;
124 ### Echo "hdr :" $(<:S=.h) ;
127 MakeLocate $(<) $(_h) $(>) : $(LOCATE_SOURCE) ;
128 #MakeLocate $(>) $(_h) : $(LOCATE_SOURCE) ;
130 Depends $(<) : $(>) ;
131 Depends $(<:S=.h) : $(<) ;
132 GenFile $(<) : lemon -q "*$(>)" : $(>) ;
133 Clean clean : $(<) $(_h) ;
140 Cc $(<) : $(<:S=$(YACCGEN)) ;
141 Lemon $(<:S=$(YACCGEN)) : $(>) ;