XXXProgram rules will trigger installation when 'jam install' is given.

Some Translation.jam changes.
Moved build used variables to Jamrules.
This commit is contained in:
Sanel Zukan 2007-07-18 16:14:10 +00:00
parent c238b08c17
commit 0d49cdffc2
10 changed files with 86 additions and 39 deletions

View File

@ -8,25 +8,43 @@
# GNU General Public License version 2 or newer.
# See COPYING for details.
# tools used by jam rules
XGETTEXT ?= xgettext ;
MSGFMT ?= msgfmt ;
RMDIR ?= rmdir ;
RMDIR_UNSFE ?= $(RM) -Rf ;
RMDIR_SAFE ?= rmdir ;
CP ?= cp ;
MV ?= mv ;
MKDIRS ?= "mkdir -p" ;
LINKCMD ?= "ln -s" ;
GLOBALFLAGS ?= -Wall -g3 -D_DEBUG -I$(TOP) ;
# directories where data will be installed
PREFIX ?= "/opt/ede2" ;
EDEBINDIR ?= "$(PREFIX)/bin" ;
EDECONFIGDIR ?= "$(PREFIX)/data/config" ;
EDEICONDIR ?= "$(PREFIX)/data/icons" ;
EDEDESKTOPDIR ?= "$(PREFIX)/data/desktop" ;
# global flags used to be passed to every target
GLOBALFLAGS ?= -Wall -pedantic -g3 -D_DEBUG -I$(TOP) ;
STDLIB ?= -lstdc++ ;
# edelib libraries path
EDELIBINCLUDE ?= -I/opt/ede/include ;
EDELIBLIB ?= -L/opt/ede/lib -ledelib ;
# fltk libraries path
FLTKINCLUDE ?= -I/usr/local/include ;
FLTKLIB ?= -L/usr/local/lib -lfltk_images -lpng -lz -ljpeg -lfltk -ldl -lm -lXext -lX11 ;
FLTKLIB_NOIMAGES ?= -L/usr/local/lib -lfltk -ldl -lm -lXext -lX11 ;
EDELIBINCLUDE ?= -I/opt/ede/include ;
EDELIBLIB ?= -L/opt/ede/lib -ledelib ;
# backward
# backward; efltk libraries path
EFLTKINCLUDE ?= -I/usr/local/include ;
EFLTKLIB ?= -L/usr/local/lib -lefltk_images -lpng -lz -ljpeg -lefltk -lX11 -lXext -lm ;
EFLTKLIB_NOIMAGES ?= -L/usr/local/lib -lefltk -lX11 -lXext -lm ;
# by default all flags that jam uses directly are cleared
# here should _not_ be set anything since they are filled per target
CCFLAGS = ;
C++FLAGS = ;
OPTIM = ;

View File

@ -8,9 +8,9 @@
# 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" ;
#EDEBINDIR = "/home/sanel/xxx/bin" ;
#EDEICONDIR = "/home/sanel/xxx/icons" ;
#EDEDESKTOPFILES = "/home/sanel/xxx/desktop" ;
# MakeInstallPrivate [location-dir] : [targets] : [opt-file-mode] : [opt-chown] : [opt-chgrp] ;
rule MakeInstallPrivate
@ -86,18 +86,27 @@ rule InstallEdeProgram
InstallProgram $(EDEBINDIR) : $(<) ;
}
# InstallEdeIcons [targets] ;
# InstallEdeIcons [app-dir:] [targets] ;
rule InstallEdeIcons
{
InstallData $(EDEICONDIR) : $(<) ;
if $(2) {
InstallData [ FDirName $(EDEICONDIR) $(1) ] : $(2) ;
} else {
InstallData $(EDEICONDIR) : $(1) ;
}
}
# InstallEdeDesktopFiles [targets] ;
rule InstallEdeDesktopFiles
{
InstallData $(EDEDESKTOPFILES) : $(<) ;
InstallData $(EDEDESKTOPDIR) : $(<) ;
}
# InstallEdeDesktopFiles [targets] ;
rule InstallEdeConfigFiles
{
InstallData $(EDECONFIGDIR) : $(<) ;
}
actions Install1
{

View File

@ -45,7 +45,7 @@ rule Program
MakeProgramPrivate $(1) : $(2) : $(3) : $(4) ;
}
# EdeProgram [target] : [sources] : [optinal-libraries] : [optinal-flags] ;
# EdeProgram [target] : [sources] : [optinal-libraries] : [optinal-flags] : [noinstall] ;
# Creates EDE specific programs. They will be linked with EDELIBLIB
# and FLTKLIB. If [optinal-libraries] or [optinal-flags] are given, they will be
# used too.
@ -59,9 +59,13 @@ rule EdeProgram
MakeProgramPrivate $(1) : $(2)
: $(3) $(EDELIBLIB) $(FLTKLIB) $(STDLIB)
: $(4) $(EDELIBINCLUDE) $(FLTKINCLUDE) ;
if $(5) != "noinstall" {
InstallEdeProgram $(1) ;
}
}
# EfltkProgram [target] : [sources] : [optinal-libraries] : [optinal-flags] ;
# EfltkProgram [target] : [sources] : [optinal-libraries] : [optinal-flags] : [noinstall] ;
# Creates programs that will be linked with efltk. If [optinal-libraries] or
# [optinal-flags] are given, they will be used too.
rule EfltkProgram
@ -74,9 +78,14 @@ rule EfltkProgram
MakeProgramPrivate $(1) : $(2)
: $(3) $(EFLTKLIB) $(STDLIB)
: $(4) $(EFLTKINCLUDE) ;
# install it where ede binaries resides
if $(5) != "noinstall" {
InstallEdeProgram $(1) ;
}
}
# FltkProgram [target] : [sources] : [optinal-libraries] : [optinal-flags] ;
# FltkProgram [target] : [sources] : [optinal-libraries] : [optinal-flags] : [noinstall] ;
# Creates programs that will be linked with fltk only. It will use full fltk
# dependencies (images).
rule FltkProgram
@ -89,9 +98,14 @@ rule FltkProgram
MakeProgramPrivate $(1) : $(2)
: $(3) $(FLTKLIB) $(STDLIB)
: $(4) $(FLTKINCLUDE) ;
# install it where ede binaries resides
if $(5) != "noinstall" {
InstallEdeProgram $(1) ;
}
}
# FltkProgramBare [target] : [sources] : [optinal-libraries] : [optinal-flags] ;
# FltkProgramBare [target] : [sources] : [optinal-libraries] : [optinal-flags] : [noinstall] ;
# Creates programs that will be linked with fltk only. No images will be linked in it.
rule FltkProgramBare
{
@ -103,4 +117,9 @@ rule FltkProgramBare
MakeProgramPrivate $(1) : $(2)
: $(3) $(FLTKLIB_NOIMAGES) $(STDLIB)
: $(4) $(FLTKINCLUDE) ;
# install it where ede binaries resides
if $(5) != "noinstall" {
InstallEdeProgram $(1) ;
}
}

View File

@ -10,12 +10,12 @@
DEFAULT_POT = "messages.pot" ;
# ExtractStrings [dir-where] : [source] : [output-file] ;
# TranslationStrings [dir-where] : [source] : [output-file] ;
# Scans [source] file(s) for translatable strings (usually marked as _("foo"))
# and store result in [output-file] in [dir-where] directory. If [dir-where]
# does not exists, it will be created.
# [output-file] can be omitted; in that case DEFAULT_POT will be used.
rule ExtractStrings
rule TranslationStrings
{
local strfile ;
if $(3) {
@ -58,12 +58,12 @@ rule ExtractStrings
CleandirSafe distclean : $(locale_dir) ;
}
# MakeTranslation [po-dir] : [file1.po file2.po...] ;
# Translation [po-dir] : [file1.po file2.po...] ;
# Compile translated files into binary representation, so they
# can be used by programs. [po-dir] is directory name where
# to look for translated files (.po) and where will be placed
# binary ones (.mo). Second parameter is list of .po files.
rule MakeTranslation
rule Translation
{
local moext mofile pofile path i ;

View File

@ -9,13 +9,12 @@
# See COPYING for details.
RMDIR_UNSFE ?= $(RM) -Rf ;
#RMDIR_SAFE ?= "rmdir --ignore-fail-on-non-empty" ;
RMDIR_SAFE ?= "rmdir" ;
CP ?= "cp" ;
MV ?= "mv" ;
MKDIRS ?= "mkdir -p" ;
LINKCMD ?= "ln -s" ;
#RMDIR_UNSFE ?= $(RM) -Rf ;
#RMDIR_SAFE ?= "rmdir" ;
#CP ?= "cp" ;
#MV ?= "mv" ;
#MKDIRS ?= "mkdir -p" ;
#LINKCMD ?= "ln -s" ;
# Fltk use .cxx extension for C++ files so it must
# be registered. This rule is called by jam so final

View File

@ -15,6 +15,8 @@ ICONS16 = [ Wildcard icons-16 : *.png : icons-16 ] ;
PLINKS = [ Wildcard programs-links : *.desktop : programs-links ] ;
CONFS = [ Wildcard *.conf ] ;
#InstallEdeConfig $(CONFS) ;
#InstallEdeIcons $(ICONS16) $(ICONS48) ;
#InstallEdeDesktopFiles $(PLINKS) ;
InstallEdeIcons icons-16 : $(ICONS16) ;
InstallEdeIcons icons-48 : $(ICONS48) ;
InstallEdeConfigFiles $(CONFS) ;
InstallEdeDesktopFiles $(PLINKS) ;

View File

@ -14,5 +14,5 @@ SOURCE = [ Wildcard *.cpp ] ;
POFILES = [ Wildcard locale : *.po ] ;
EfltkProgram edewm : $(SOURCE) ;
ExtractStrings locale : $(SOURCE) ;
MakeTranslation locale : $(POFILES) ;
TranslationStrings locale : $(SOURCE) ;
Translation locale : $(POFILES) ;

View File

@ -13,6 +13,6 @@ SubDir TOP eiconman ;
SOURCE = eiconman.cpp Utils.cpp Wallpaper.cpp DesktopIcon.cpp NotifyBox.cpp ;
EdeProgram eiconman : $(SOURCE) ;
ExtractStrings locale : $(SOURCE) ;
TranslationStrings locale : $(SOURCE) ;
FltkProgram test/notify : test/notify.cpp ;
FltkProgram test/notify : test/notify.cpp : : : noinstall ;

View File

@ -11,4 +11,4 @@
SubDir TOP eimage ;
FltkProgram eimage : eimage.cpp ;
ExtractStrings locale : eimage.cpp ;
TranslationStrings locale : eimage.cpp ;

View File

@ -13,4 +13,4 @@ SubDir TOP evoke ;
SOURCE = evoke.cpp EvokeService.cpp Log.cpp ;
EdeProgram evoke : $(SOURCE) ;
ExtractStrings locale : $(SOURCE) ;
TranslationStrings locale : $(SOURCE) ;