From eea1d4c47dc07abef05cde3c686d5747b5625fc0 Mon Sep 17 00:00:00 2001 From: Ingo Weinhold Date: Wed, 1 Dec 2004 15:39:38 +0000 Subject: [PATCH] Add the resources to the StatCacheServer, so that it is a background app. git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10338 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/tools/jam/Jamfile | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) diff --git a/src/tools/jam/Jamfile b/src/tools/jam/Jamfile index 68d898d352..67e861a456 100644 --- a/src/tools/jam/Jamfile +++ b/src/tools/jam/Jamfile @@ -145,10 +145,49 @@ if $(BINDIR) { InstallBin $(BINDIR) : jam ; } # Build stat cache server under BeOS. # if $(OS) = BEOS { + rule CompileResources + { + SEARCH on $(2) += $(SEARCH_SOURCE) ; + MakeLocate $(1) : $(LOCATE_TARGET) ; + Depends $(1) : $(2) ; + LocalClean clean : $(1) ; + } + + # rc must exist, if we are to compile the resources. We hard-code the + # path where it should be located. Not nice, but good enough for the moment. + actions CompileResources + { + if [ -f ../../../distro/x86.R1/beos/bin/rc ]; then + ../../../distro/x86.R1/beos/bin/rc -o "$(1)" "$(2)" + else + echo "Error: Couldn't find rc, the resources compiler. It should " + echo "Error: be located in distro/x86.R1/beos/bin and can be made" + echo "Error: by invoking \`jam rc'. You can also build the" + echo "Error: StatCacheServer without resources by running" + echo "Error: NO_STAT_CACHE_SERVER_RESOURCES=1 jam" + exit 1; + fi + } + + rule AddResources + { + SEARCH on $(2) += $(SEARCH_SOURCE) ; + Depends $(1) : $(2) ; + } + + actions AddResources + { + xres -o "$(1)" $(2) + } + LINK on StatCacheServer = g++ ; LINKLIBS on StatCacheServer = [ on StatCacheServer return $(LINKLIBS) ] -lbe ; Main StatCacheServer : StatCacheServer.cpp ; + if ! $(NO_STAT_CACHE_SERVER_RESOURCES) { + CompileResources StatCacheServer.rsrc : StatCacheServer.rdef ; + AddResources StatCacheServer : StatCacheServer.rsrc ; + } } # ### LOCAL CHANGE