From 15b342009efc94f25397ea34c95cf7b52da7f9a7 Mon Sep 17 00:00:00 2001 From: Sanel Zukan Date: Fri, 28 Sep 2007 14:08:59 +0000 Subject: [PATCH] Synced same behaviour between haiku jam and vanilla jam --- build/Doc.jam | 18 +++++++++--------- build/Install.jam | 8 ++++---- build/Library.jam | 10 +++++----- build/Program.jam | 2 +- build/Translation.jam | 20 ++++++++++---------- build/Utils.jam | 10 +++++++++- 6 files changed, 38 insertions(+), 30 deletions(-) diff --git a/build/Doc.jam b/build/Doc.jam index d3674d5..15ce82c 100644 --- a/build/Doc.jam +++ b/build/Doc.jam @@ -39,15 +39,15 @@ rule EdeManual # and grist to prevent collision target = $(target:S=$(html_ext):G="$(target)-html") ; - Depends $(target) : $(source) ; - Depends all : $(target) ; - Depends doc : $(target) ; + LocalDepends $(target) : $(source) ; + LocalDepends all : $(target) ; + LocalDepends doc : $(target) ; # set output to $(MANUALDIR) directory MakeLocate $(target) : $(MANUALDIR) ; AsciiDoc1 $(target) : $(source) ; - Clean clean : $(target) ; + LocalClean clean : $(target) ; } # copy images, if given @@ -59,13 +59,13 @@ rule EdeManual MkDir $(imgdir) ; - Depends $(target) : $(imgdir) ; - Depends $(target) : $(source) ; - Depends all : $(target) ; - Depends doc : $(target) ; + LocalDepends $(target) : $(imgdir) ; + LocalDepends $(target) : $(source) ; + LocalDepends all : $(target) ; + LocalDepends doc : $(target) ; Copy $(target) : $(source) ; - Clean clean : $(target) ; + LocalClean clean : $(target) ; } } } diff --git a/build/Install.jam b/build/Install.jam index 17f75f3..1d94fec 100644 --- a/build/Install.jam +++ b/build/Install.jam @@ -31,11 +31,11 @@ rule MakeInstallPrivate for i in $(s) { t = $(i:BSR=$(dir):G=installed) ; - Depends $(t) : $(i) ; - Depends $(t) : $(dir) ; + LocalDepends $(t) : $(i) ; + LocalDepends $(t) : $(dir) ; - Depends install : $(t) ; - Clean uninstall : $(t) ; + LocalDepends install : $(t) ; + LocalClean uninstall : $(t) ; Install1 $(t) : $(i) ; diff --git a/build/Library.jam b/build/Library.jam index 3b2768e..7b9fb0c 100644 --- a/build/Library.jam +++ b/build/Library.jam @@ -37,7 +37,7 @@ rule SharedLibraryFromObjects t = $(t:S=$(SUFSHAREDLIB)) ; } - Depends lib : $(t) ; + LocalDepends lib : $(t) ; # This is used if library already does not have a path if ! $(t:D) { @@ -47,10 +47,10 @@ rule SharedLibraryFromObjects LINKLIBS on $(t) = -shared -Wl,-soname,\"$(t_only)\" [ on $(t) return $(LINKLIBS) ] ; # Let target is dependant on source - Depends $(t) : $(s) ; + LocalDepends $(t) : $(s) ; Link $(t) : $(s) ; - Clean clean : $(t) ; + LocalClean clean : $(t) ; } # SharedLibrary [libname] : [sources] ; @@ -99,10 +99,10 @@ rule SharedLibraryVersioned # from place where jam is called LOCATE on $(symlink) = [ on $(target) return $(LOCATE) ] ; - Depends lib : $(symlink) ; + LocalDepends lib : $(symlink) ; SymLink $(symlink) : $(target) ; - Clean clean : $(symlink) ; + LocalClean clean : $(symlink) ; } } else { SharedLibrary $(1) : $(2) ; diff --git a/build/Program.jam b/build/Program.jam index aaf4cd6..878e8f0 100644 --- a/build/Program.jam +++ b/build/Program.jam @@ -22,7 +22,7 @@ rule MakeProgramPrivate # so 'jam foo' works when 'foo' is final executable if $(target) != $(<) { - Depends $(<) : $(target) ; + LocalDepends $(<) : $(target) ; NotFile $(<) ; } diff --git a/build/Translation.jam b/build/Translation.jam index 265f14d..a66bd51 100644 --- a/build/Translation.jam +++ b/build/Translation.jam @@ -44,17 +44,17 @@ rule TranslationStrings MkDir $(locale_dir) ; for i in $(source) { - Depends $(target) : $(i) ; + LocalDepends $(target) : $(i) ; } - Depends $(target) : $(locale_dir) ; - Depends potfile : $(target) ; - Depends translation : $(target) ; - Depends all : $(target) ; + LocalDepends $(target) : $(locale_dir) ; + LocalDepends potfile : $(target) ; + LocalDepends translation : $(target) ; + LocalDepends all : $(target) ; XGettext $(target) : $(source) ; - Clean clean : $(target) ; + LocalClean clean : $(target) ; CleandirSafe distclean : $(locale_dir) ; } @@ -85,13 +85,13 @@ rule Translation pofile = [ FFileName $(path) $(<) $(i) ] ; mofile = [ FFileName $(path) $(<) $(i:S=$(moext)) ] ; - Depends $(mofile) : $(pofile) ; - Depends all : $(mofile) ; - Depends translation : $(mofile) ; + LocalDepends $(mofile) : $(pofile) ; + LocalDepends all : $(mofile) ; + LocalDepends translation : $(mofile) ; MakeTranslation1 $(mofile) : $(pofile) ; - Clean clean : $(mofile) ; + LocalClean clean : $(mofile) ; } } diff --git a/build/Utils.jam b/build/Utils.jam index be78177..c518d40 100644 --- a/build/Utils.jam +++ b/build/Utils.jam @@ -16,6 +16,14 @@ #MKDIRS ?= "mkdir -p" ; #LINKCMD ?= "ln -s" ; +# Compatibility with ftjam,PerforceJam,... +# Haiku jam have builtin LocalClean and LocalDepends +if ! $(INVOCATION_SUBDIR_SET) { + rule LocalClean { Clean $(1) : $(2) ; } + rule LocalDepends { Depends $(1) : $(2) ; } +} +# Compatibility part ends + # Fltk use .cxx extension for C++ files so it must # be registered. This rule is called by jam so final # application must not use it. @@ -82,7 +90,7 @@ rule SymLink return ; } - Depends $(<) : $(>) ; + LocalDepends $(<) : $(>) ; if $(3) { SYMLINKSRCPATH on $(<) = $(3) ;