From ae122e1885543c95bed103e21f12c81cf26082de Mon Sep 17 00:00:00 2001 From: Sanel Zukan Date: Fri, 22 Aug 2008 16:40:18 +0000 Subject: [PATCH] Relaxed EXEMODE jam sets Let manual be installed in docsdir jam will also create ehelp from ehelp.in setting correct location Fixed a typo with RMDIR_UNSAFE so Cleandir can work now Added CopyDir rule Added missing linking libraries for capone --- Jamrules | 18 ++++++++++-------- build/Install.jam | 7 ++++--- build/Utils.jam | 10 ++++++++-- docs/Jamfile | 15 +++++++++++++++ ehelp/Jamfile | 33 ++++++++++++++++++++++++++++++++- ehelp/ehelp.in | 2 +- tools/capone/src/Jamfile | 2 +- 7 files changed, 71 insertions(+), 16 deletions(-) diff --git a/Jamrules b/Jamrules index a7661bd..d0b65c8 100644 --- a/Jamrules +++ b/Jamrules @@ -9,14 +9,15 @@ # See COPYING for details. # tools used by jam rules -XGETTEXT ?= xgettext ; -MSGFMT ?= msgfmt ; -RMDIR_UNSFE ?= $(RM) -Rf ; -RMDIR_SAFE ?= rmdir ; -CP ?= cp ; -MV ?= mv ; -MKDIRS ?= "mkdir -p" ; -LINKCMD ?= "ln -s" ; +XGETTEXT ?= xgettext ; +MSGFMT ?= msgfmt ; +RMDIR_UNSAFE ?= $(RM) -Rf ; +RMDIR_SAFE ?= rmdir ; +CP ?= cp ; +COPYDIR ?= "cp -R" ; +MV ?= mv ; +MKDIRS ?= "mkdir -p" ; +LINKCMD ?= "ln -s" ; # directories where data will be installed PREFIX ?= "/opt/ede2" ; @@ -24,6 +25,7 @@ EDEBINDIR ?= "$(PREFIX)/bin" ; EDECONFIGDIR ?= "$(PREFIX)/data/config" ; EDEICONDIR ?= "$(PREFIX)/data/icons" ; EDEDESKTOPDIR ?= "$(PREFIX)/data/desktop" ; +EDEDOCDIR ?= "$(PREFIX)/share/doc/ede-2.0.0" ; # global flags used to be passed to every target GLOBALFLAGS ?= -Wall -pedantic -g3 -D_DEBUG -I$(TOP) ; diff --git a/build/Install.jam b/build/Install.jam index 8d36a35..d1c03dc 100644 --- a/build/Install.jam +++ b/build/Install.jam @@ -8,9 +8,10 @@ # GNU General Public License version 2 or newer. # See COPYING for details. -#EDEBINDIR = "/home/sanel/xxx/bin" ; -#EDEICONDIR = "/home/sanel/xxx/icons" ; -#EDEDESKTOPFILES = "/home/sanel/xxx/desktop" ; +# jam by default set 711 for executable files which is +# too restrictive disabling shell scripts to be excuted. +# Here I'm changing it to default used +EXEMODE = 755 ; # MakeInstallPrivate [location-dir] : [targets] : [opt-file-mode] : [opt-chown] : [opt-chgrp] ; rule MakeInstallPrivate diff --git a/build/Utils.jam b/build/Utils.jam index c518d40..8e42776 100644 --- a/build/Utils.jam +++ b/build/Utils.jam @@ -9,9 +9,10 @@ # See COPYING for details. -#RMDIR_UNSFE ?= $(RM) -Rf ; +#RMDIR_UNSAFE ?= $(RM) -Rf ; #RMDIR_SAFE ?= "rmdir" ; #CP ?= "cp" ; +#COPYDIR ?= "cp -R" ; #MV ?= "mv" ; #MKDIRS ?= "mkdir -p" ; #LINKCMD ?= "ln -s" ; @@ -147,7 +148,7 @@ actions MkDir1 } # Cleandir clean : [directory] ; -# Removes directory in 'Clean clean' fassion +# Removes directory in 'Clean clean' fashion actions piecemeal together existing Cleandir { $(RMDIR_UNSAFE) "$(>)" @@ -172,3 +173,8 @@ actions Move { $(MV) "$(>)" "$(<)" } + +actions CopyDir +{ + $(COPYDIR) "$(>)" "$(<)" +} diff --git a/docs/Jamfile b/docs/Jamfile index 5e937aa..09a8b4b 100644 --- a/docs/Jamfile +++ b/docs/Jamfile @@ -12,3 +12,18 @@ SubDir TOP docs ; EdeManual index.txt introduction.txt jambuild.txt ; EdeManualWithToc dbus-usage.txt ; + +MANUAL_FILES = [ Wildcard manual : *.html : manual ] ; +MANUAL_IMGS = [ FDirName $(SUBDIR) manual images ] ; + +# where will be installed +MANUAL_INSTALL_DIR = [ FDirName $(EDEDOCDIR) manual ] ; + +# install generated documents +InstallData $(MANUAL_INSTALL_DIR) : $(MANUAL_FILES) ; + +# copy directory with images +# TODO: if someone erase images from installed directory, directory +# will not be copied again until someone removes manual directory from installation path +CopyDir $(MANUAL_INSTALL_DIR) : $(MANUAL_IMGS) ; +Cleandir uninstall : $(MANUAL_INSTALL_DIR) ; diff --git a/ehelp/Jamfile b/ehelp/Jamfile index 457e1e3..e0c7050 100644 --- a/ehelp/Jamfile +++ b/ehelp/Jamfile @@ -10,5 +10,36 @@ SubDir TOP ehelp ; -InstallEdeProgram ehelp ; +rule MakeScript +{ + # add grist to file names (not needed, but you never know...) + local source = [ FGristFiles $(>) ] ; + + # let jam call from the top directory (jam ehelp) knows what to + # build and not be confused with the same name of directory + SEARCH on $(source) = $(SUBDIR) ; + + LocalDepends $(<) : $(source) ; + LocalDepends all : $(<) ; + LocalClean clean : $(<) ; + + # where generated target will be located + MakeLocate $(<) : $(LOCATE_TARGET) ; + + MakeScript1 $(<) : $(source) ; + + # let it be installed on 'jam install' + InstallEdeProgram $(<) ; + + # make it executable + MODE on $(<) = $(EXEMODE) ; + Chmod $(<) ; +} + +actions existing MakeScript1 +{ + cat "$(>)" | $(SED) -e 's|@ededocdir@|$(EDEDOCDIR)|' > "$(<)" +} + +MakeScript ehelp : ehelp.in ; EdeManual ehelp.txt ; diff --git a/ehelp/ehelp.in b/ehelp/ehelp.in index f505887..9b5f8f9 100644 --- a/ehelp/ehelp.in +++ b/ehelp/ehelp.in @@ -1,6 +1,6 @@ #!/bin/sh -help_dir="@docdir@/ede/manual" +help_dir="@ededocdir@/manual" browser_list="firefox mozilla konqueror opera navigator dillo" program="ehelp" diff --git a/tools/capone/src/Jamfile b/tools/capone/src/Jamfile index 5e1914e..1b39d25 100644 --- a/tools/capone/src/Jamfile +++ b/tools/capone/src/Jamfile @@ -23,6 +23,6 @@ SCARAB_SRC = capone.cpp $(SCHEME_SRC) dbus.cpp re.cpp sys.cpp ; #ObjectCcFlags $(SCARAB_SRC) : -g3 -pg ; EdeProgram capone : $(SCARAB_SRC) ; -LinkAgainst capone : -Lpcre -lpcre -ledelib_dbus -ldbus-1 -ledelib -lfltk -ldl ; +LinkAgainst capone : -Lpcre -lpcre -ledelib_dbus -ldbus-1 -ledelib -lfltk -ldl -lm -lXext -lXft -lX11 ; #LINKFLAGS on capone = [ on capone return $(LINKFLAGS) ] -pg ;