boiler now not includes dirs without headers in HDRS
[k8jam.git] / Jamrules
blob43db27a2997b173a8fb71dd6a87fe9936ba9d715
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.12 ;
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 ;
15 gcc-suggest-attrs ;
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)/src ;
91 actions quietly AShowHelp {
92   echo "usage: jam [target] [flags]"
93   echo "targets:"
94   echo "  all/<empty>  -- build"
95   echo "  push         -- push to github and gitorious"
99 actions quietly AGitPush {
100   git push
101   git push repo
102   git push hub
103   git push gr