new source dir layout; hey, this should be done long time ago!
[k8jam.git] / Jamrules
blob054381dd1760fd91755246abd7f3fdadecf81c8b
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.8 ;
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 $(NT) || $(WINE_MINGW) { code = execunix.c filent.c pathunix.c ; }
47 else { code = execunix.c fileunix.c pathunix.c ; }
49 if $(UNIX) && $(OS) = CYGWIN {
50   CCFLAGS += -D__cygwin__ ;
54 # We have to signal jam.h for these
55 if $(OS) = NT {
56   switch $(JAM_TOOLSET) {
57     case MINGW       : CCFLAGS += -DNT ;
58     case LCC         : CCFLAGS += -DNT ;
59     case DIGITALMARS : CCFLAGS += -DNT ;
60     case *           : CCFLAGS += /DNT ;
61   }
65 # Do we know yacc?
66 if $(YACC) { code += jamgram.y ; }
67 else { code += jamgram.c ; }
70 if $(UNIX) {
71   actions Strip {
72     strip -s $(1)
73   }
77 # Strip the Jam executable on Mingw
78 if $(JAM_TOOLSET) = MINGW {
79   actions Strip {
80     strip $(1)
81   }
85 # installing
86 if $(UNIX) {
87   if $(DESTDIR) { INSTALLDIR_PREFIX = $(DESTDIR)$(PREFIX) ; } else { INSTALLDIR_PREFIX = $(PREFIX) ; }
88   INSTALLDIR_BIN = $(INSTALLDIR_PREFIX)/bin ;
89   INSTALLDIR_MAN = $(INSTALLDIR_PREFIX)/man ;
90   INSTALLDIR_DOCS = $(INSTALLDIR_PREFIX)/share/doc/$(VERSION) ;
94 HDRS += $(ALL_LOCATE_TARGET) ;