1 #============================================================================
2 # Work around problems the SubDir rule of Jambase
3 # (until jampeople accept my patches :-/ )
4 #============================================================================
6 LOCATE_OBJECTS ?= $(top_builddir)/build/$(target) ;
7 LOCATE_TARGETS ?= $(top_builddir) ;
8 LOCATE_DOCS ?= $(top_builddir)/build ;
10 SUBDIRRULES += FixSubDirPath ;
13 MKDIRS ?= "$(MKDIR) -p" ;
17 LOCATE_SOURCE = [ ConcatDirs $(LOCATE_OBJECTS) $(SUBDIR_TOKENS) ] ;
18 LOCATE_TARGET = [ ConcatDirs $(LOCATE_OBJECTS) $(SUBDIR_TOKENS) ] ;
20 # We need to package the Jamfile (a bit hacky here...)
24 # fix bug in Jambase where SubInclude in the middle of a jam file made it break
29 Exit SubInclude $(<[1]) without prior SubDir $(<[1]) ;
32 local save_SUBDIR_TOKENS = $(SUBDIR_TOKENS) ;
36 include $(JAMFILE:D=$(SUBDIR)) ;
38 SubDir $(<[1]) $(save_SUBDIR_TOKENS) ;
41 # this MakeLocate rule differs from the Jambase one in that it also works with
42 # files being in subdirectories
45 # MakeLocate targets : directory ;
47 # Sets special variable LOCATE on targets, and arranges
48 # with MkDir to create target directory.
50 # Note we grist the directory name with 'dir',
51 # so that directory path components and other
52 # targets don't conflict.
54 if $(>) && $(>) != "" && $(>) != "."
58 LOCATE on $(i) = $(>) ;
60 local targetfile = $(i:R=$(>)) ;
61 Depends $(i) : $(targetfile:DG=dir) ;
62 MkDir $(targetfile:DG=dir) ;
67 # The default MkDir rule in Jambase has problems when paths contains a sequence
68 # of multiple slashes (ie. bla////fup). We solve these problems and greatly
69 # simply this rule by using the "mkdir -p" or mkdirs command.
74 # Make a directory and all its parent directories.
76 # Ignore timestamps on directories: we only care if they
81 # don't create the dir multiple times