lexer rules relaxed a little; please, don't use tokens like abc: -- use "abc:" instead
[k8jam.git] / Jamrules
bloba6992743e860c17dbb08223b9dfc516334a5b9e4
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 ;
5 DEFINES += MKJAMBASE_COMPACT ;
7 if $(THIS_IS_K8JAM) {
8   Echo "K8Jam detected" ;
9   set-profile ;
10   set-default-target-locations ;
11 } else {
12   OPTIM = -O2 -s ;
13   LINKFLAGS = -s ;
14   if ! "-Wall" in $(OPTIM) { OPTIM += -Wall ; }
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
23 if $(UNIX) {
24   #if ! $(LOCATE_TARGET) { LOCATE_TARGET = bin.unix/obj ; }
25   ALL_LOCATE_BIN = $(TOP)/bin.unix ;
26 } else {
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) {
44   NT = 1 ;
45   JAM_TOOLSET = MINGW ;
48 if $(UNIX) && $(OS) = CYGWIN {
49   CCFLAGS += -D__cygwin__ ;
53 # We have to signal jam.h for these
54 if $(OS) = NT {
55   switch $(JAM_TOOLSET) {
56     case MINGW       : CCFLAGS += -DNT ;
57     case LCC         : CCFLAGS += -DNT ;
58     case DIGITALMARS : CCFLAGS += -DNT ;
59     case *           : CCFLAGS += /DNT ;
60   }
64 if ! $(DEBUG) && ! $(VALGRIND) {
65   if $(UNIX) {
66     actions Strip {
67       strip -s $(1)
68     }
69   }
70   # Strip the Jam executable on Mingw
71   if $(JAM_TOOLSET) = MINGW {
72     actions Strip {
73       strip $(1)
74     }
75   }
79 # installing
80 if $(UNIX) {
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) ;