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