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. # GNU General Public License version 2 or newer.
# See COPYING for details. # See COPYING for details.
XGETTEXT ?= xgettext ; # tools used by jam rules
MSGFMT ?= msgfmt ; XGETTEXT ?= xgettext ;
RMDIR ?= rmdir ; MSGFMT ?= msgfmt ;
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++ ; STDLIB ?= -lstdc++ ;
# edelib libraries path
EDELIBINCLUDE ?= -I/opt/ede/include ;
EDELIBLIB ?= -L/opt/ede/lib -ledelib ;
# fltk libraries path
FLTKINCLUDE ?= -I/usr/local/include ; FLTKINCLUDE ?= -I/usr/local/include ;
FLTKLIB ?= -L/usr/local/lib -lfltk_images -lpng -lz -ljpeg -lfltk -ldl -lm -lXext -lX11 ; 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 ; FLTKLIB_NOIMAGES ?= -L/usr/local/lib -lfltk -ldl -lm -lXext -lX11 ;
EDELIBINCLUDE ?= -I/opt/ede/include ; # backward; efltk libraries path
EDELIBLIB ?= -L/opt/ede/lib -ledelib ;
# backward
EFLTKINCLUDE ?= -I/usr/local/include ; EFLTKINCLUDE ?= -I/usr/local/include ;
EFLTKLIB ?= -L/usr/local/lib -lefltk_images -lpng -lz -ljpeg -lefltk -lX11 -lXext -lm ; EFLTKLIB ?= -L/usr/local/lib -lefltk_images -lpng -lz -ljpeg -lefltk -lX11 -lXext -lm ;
EFLTKLIB_NOIMAGES ?= -L/usr/local/lib -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 = ; CCFLAGS = ;
C++FLAGS = ; C++FLAGS = ;
OPTIM = ; OPTIM = ;

View File

@ -8,9 +8,9 @@
# GNU General Public License version 2 or newer. # GNU General Public License version 2 or newer.
# See COPYING for details. # See COPYING for details.
EDEBINDIR = "/home/sanel/xxx/bin" ; #EDEBINDIR = "/home/sanel/xxx/bin" ;
EDEICONDIR = "/home/sanel/xxx/icons" ; #EDEICONDIR = "/home/sanel/xxx/icons" ;
EDEDESKTOPFILES = "/home/sanel/xxx/desktop" ; #EDEDESKTOPFILES = "/home/sanel/xxx/desktop" ;
# MakeInstallPrivate [location-dir] : [targets] : [opt-file-mode] : [opt-chown] : [opt-chgrp] ; # MakeInstallPrivate [location-dir] : [targets] : [opt-file-mode] : [opt-chown] : [opt-chgrp] ;
rule MakeInstallPrivate rule MakeInstallPrivate
@ -86,18 +86,27 @@ rule InstallEdeProgram
InstallProgram $(EDEBINDIR) : $(<) ; InstallProgram $(EDEBINDIR) : $(<) ;
} }
# InstallEdeIcons [targets] ; # InstallEdeIcons [app-dir:] [targets] ;
rule InstallEdeIcons rule InstallEdeIcons
{ {
InstallData $(EDEICONDIR) : $(<) ; if $(2) {
InstallData [ FDirName $(EDEICONDIR) $(1) ] : $(2) ;
} else {
InstallData $(EDEICONDIR) : $(1) ;
}
} }
# InstallEdeDesktopFiles [targets] ; # InstallEdeDesktopFiles [targets] ;
rule InstallEdeDesktopFiles rule InstallEdeDesktopFiles
{ {
InstallData $(EDEDESKTOPFILES) : $(<) ; InstallData $(EDEDESKTOPDIR) : $(<) ;
} }
# InstallEdeDesktopFiles [targets] ;
rule InstallEdeConfigFiles
{
InstallData $(EDECONFIGDIR) : $(<) ;
}
actions Install1 actions Install1
{ {

View File

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

View File

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

View File

@ -9,13 +9,12 @@
# See COPYING for details. # See COPYING for details.
RMDIR_UNSFE ?= $(RM) -Rf ; #RMDIR_UNSFE ?= $(RM) -Rf ;
#RMDIR_SAFE ?= "rmdir --ignore-fail-on-non-empty" ; #RMDIR_SAFE ?= "rmdir" ;
RMDIR_SAFE ?= "rmdir" ; #CP ?= "cp" ;
CP ?= "cp" ; #MV ?= "mv" ;
MV ?= "mv" ; #MKDIRS ?= "mkdir -p" ;
MKDIRS ?= "mkdir -p" ; #LINKCMD ?= "ln -s" ;
LINKCMD ?= "ln -s" ;
# Fltk use .cxx extension for C++ files so it must # Fltk use .cxx extension for C++ files so it must
# be registered. This rule is called by jam so final # 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 ] ; PLINKS = [ Wildcard programs-links : *.desktop : programs-links ] ;
CONFS = [ Wildcard *.conf ] ; CONFS = [ Wildcard *.conf ] ;
#InstallEdeConfig $(CONFS) ; InstallEdeIcons icons-16 : $(ICONS16) ;
#InstallEdeIcons $(ICONS16) $(ICONS48) ; InstallEdeIcons icons-48 : $(ICONS48) ;
#InstallEdeDesktopFiles $(PLINKS) ;
InstallEdeConfigFiles $(CONFS) ;
InstallEdeDesktopFiles $(PLINKS) ;

View File

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

View File

@ -13,6 +13,6 @@ SubDir TOP eiconman ;
SOURCE = eiconman.cpp Utils.cpp Wallpaper.cpp DesktopIcon.cpp NotifyBox.cpp ; SOURCE = eiconman.cpp Utils.cpp Wallpaper.cpp DesktopIcon.cpp NotifyBox.cpp ;
EdeProgram eiconman : $(SOURCE) ; 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 ; SubDir TOP eimage ;
FltkProgram eimage : eimage.cpp ; 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 ; SOURCE = evoke.cpp EvokeService.cpp Log.cpp ;
EdeProgram evoke : $(SOURCE) ; EdeProgram evoke : $(SOURCE) ;
ExtractStrings locale : $(SOURCE) ; TranslationStrings locale : $(SOURCE) ;