got rid of tabs in Jambase
[k8jam.git] / Jamrules
blobe2425850a412ab5da55b4687588411d444dcce5d
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 if $(THIS_IS_K8JAM) {
6   Echo "K8Jam detected" ;
7   set-profile ;
8   set-default-target-locations ;
9 } else {
10   OPTIM = -O2 -s ;
11   LINKFLAGS = -s ;
12   if ! "-Wall" in $(OPTIM) { OPTIM += -Wall ; }
16 if ! $(PREFIX) { PREFIX = /usr/local ; }
19 # note that we use the target directory 'bin.unix' to ensure that
20 # 'make install' and 'make uninstall' work correctly
21 if $(UNIX) {
22   #if ! $(LOCATE_TARGET) { LOCATE_TARGET = bin.unix/obj ; }
23   ALL_LOCATE_BIN = $(TOP)/bin.unix ;
24 } else {
25   #if ! $(LOCATE_TARGET) { LOCATE_TARGET = bin.$(OSFULL[1]:L)$(PATH_SEPARATOR)obj ; }
26   ALL_LOCATE_BIN = $(TOP)$(PATH_SEPARATOR)bin.$(OSFULL[1]:L) ;
29 # Leave generated source in current directory; it would be nice to use
30 # these lines below to build the source into the platform-specific
31 # directory, but getting scan.c to include the right jambase.h is
32 # hard: with ""'s, it always gets the bootstrap version; with <>'s,
33 # it won't find the bootstrap version.
35 # SEARCH_SOURCE ?= $(LOCATE_TARGET) $(DOT) ;
36 # LOCATE_SOURCE ?= $(LOCATE_TARGET) ;
38 # For some really stupid reason, classic Jam doesn't define NT
39 # when compiling with Mingw, but the variable MINGW instead..
41 if ! $(NT) && $(MINGW) {
42   NT = 1 ;
43   JAM_TOOLSET = MINGW ;
46 if $(UNIX) && $(OS) = CYGWIN {
47   CCFLAGS += -D__cygwin__ ;
51 # We have to signal jam.h for these
52 if $(OS) = NT {
53   switch $(JAM_TOOLSET) {
54     case MINGW       : CCFLAGS += -DNT ;
55     case LCC         : CCFLAGS += -DNT ;
56     case DIGITALMARS : CCFLAGS += -DNT ;
57     case *           : CCFLAGS += /DNT ;
58   }
62 if ! $(DEBUG) && ! $(VALGRIND) {
63   if $(UNIX) {
64     actions Strip {
65       strip -s $(1)
66     }
67   }
68   # Strip the Jam executable on Mingw
69   if $(JAM_TOOLSET) = MINGW {
70     actions Strip {
71       strip $(1)
72     }
73   }
77 # installing
78 if $(UNIX) {
79   if $(DESTDIR) { INSTALLDIR_PREFIX = $(DESTDIR)$(PREFIX) ; } else { INSTALLDIR_PREFIX = $(PREFIX) ; }
80   INSTALLDIR_BIN = $(INSTALLDIR_PREFIX)/bin ;
81   INSTALLDIR_MAN = $(INSTALLDIR_PREFIX)/man ;
82   INSTALLDIR_DOCS = $(INSTALLDIR_PREFIX)/share/doc/$(VERSION) ;
86 HDRS += $(ALL_LOCATE_TARGET) ;