first 2.5.11, with accidentally forgotten debug output removed
[k8jam.git] / Jamrules
blobbf782fd3e330fbf20678ff08ceaf7d7384e77c66
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.11 ;
6 DEFINES += MKJAMBASE_COMPACT ;
7 #DEFINES += OPT_HEADER_CACHE_EXT ;
10 if ! $(THIS_IS_K8JAM) {
11   Exit "I WANT K8JAM!" ;
13 set-profile ;
14 set-target-locations ;
17 if ! $(PREFIX) { PREFIX = /usr/local ; }
20 # note that we use the target directory 'bin.unix' to ensure that
21 # 'make install' and 'make uninstall' work correctly
22 if $(UNIX) {
23   #if ! $(LOCATE_TARGET) { LOCATE_TARGET = bin.unix/obj ; }
24   ALL_LOCATE_BIN = $(TOP)/bin.unix ;
25 } else {
26   #if ! $(LOCATE_TARGET) { LOCATE_TARGET = bin.$(OSFULL[1]:L)$(PATH_SEPARATOR)obj ; }
27   ALL_LOCATE_BIN = $(TOP)$(PATH_SEPARATOR)bin.$(OSFULL[1]:L) ;
30 # Leave generated source in current directory; it would be nice to use
31 # these lines below to build the source into the platform-specific
32 # directory, but getting scan.c to include the right jambase.h is
33 # hard: with ""'s, it always gets the bootstrap version; with <>'s,
34 # it won't find the bootstrap version.
36 # SEARCH_SOURCE ?= $(LOCATE_TARGET) $(DOT) ;
37 # LOCATE_SOURCE ?= $(LOCATE_TARGET) ;
39 # For some really stupid reason, classic Jam doesn't define NT
40 # when compiling with Mingw, but the variable MINGW instead..
42 if ! $(NT) && $(MINGW) {
43   NT = 1 ;
44   JAM_TOOLSET = MINGW ;
47 if $(UNIX) && $(OS) = CYGWIN {
48   CCFLAGS += -D__cygwin__ ;
52 # We have to signal jam.h for these
53 if $(OS) = NT {
54   switch $(JAM_TOOLSET) {
55     case MINGW       : CCFLAGS += -DNT ;
56     case LCC         : CCFLAGS += -DNT ;
57     case DIGITALMARS : CCFLAGS += -DNT ;
58     case *           : CCFLAGS += /DNT ;
59   }
63 if ! $(DEBUG) && ! $(VALGRIND) {
64   if $(UNIX) {
65     actions Strip {
66       strip -s $(1)
67     }
68   }
69   # Strip the Jam executable on Mingw
70   if $(JAM_TOOLSET) = MINGW {
71     actions Strip {
72       strip $(1)
73     }
74   }
78 # installing
79 if $(UNIX) {
80   if $(DESTDIR) { INSTALLDIR_PREFIX = $(DESTDIR)$(PREFIX) ; } else { INSTALLDIR_PREFIX = $(PREFIX) ; }
81   INSTALLDIR_BIN = $(INSTALLDIR_PREFIX)/bin ;
82   INSTALLDIR_MAN = $(INSTALLDIR_PREFIX)/man ;
83   INSTALLDIR_DOCS = $(INSTALLDIR_PREFIX)/share/doc/$(VERSION) ;
87 HDRS += $(ALL_LOCATE_TARGET) ;
90 actions AShowHelp {
91   echo "usage: jam [target] [flags]"
92   echo "targets:"
93   echo "  all/<empty>  -- build"
94   echo "  push         -- push to github and gitorious"
98 actions AGitPush {
99   git push
100   git push hub
101   git push gr