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
This commit is contained in:
Sanel Zukan 2008-08-22 16:40:18 +00:00
parent 3f821eb1e5
commit ae122e1885
7 changed files with 71 additions and 16 deletions

View File

@ -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) ;

View File

@ -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

View File

@ -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) "$(>)" "$(<)"
}

View File

@ -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) ;

View File

@ -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 ;

View File

@ -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"

View File

@ -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 ;