Refactored globals used by build system

This commit is contained in:
Sanel Zukan 2009-02-20 15:29:11 +00:00
parent ee1407d79f
commit ed531ba6fa
3 changed files with 27 additions and 21 deletions

View File

@ -36,13 +36,13 @@ LINKCMD ?= "ln -s" ;
EDE_VERSION ?= "@EDE_VERSION@" ;
# directories used by build system
PREFIX ?= "$(prefix)" ;
EDEBINDIR ?= "$(bindir)" ;
EDECONFIGDIR ?= "$(datadir)/config" ;
EDEICONDIR ?= "$(datadir)/icons" ;
EDEDESKTOPDIR ?= "$(datadir)/desktop" ;
EDEMIMEDIR ?= "$(datadir)/mime" ;
EDEDOCDIR ?= "$(docdir)/ede-$(EDE_VERSION)" ;
PREFIX ?= "$(prefix)" ;
EDE_BIN_DIR ?= "$(bindir)" ;
EDE_CONFIG_DIR ?= "$(datadir)/config" ;
EDE_ICON_DIR ?= "$(datadir)/icons" ;
EDE_DESKTOP_FILE_DIR ?= "$(datadir)/desktop" ;
EDE_MIME_DIR ?= "$(datadir)/mime" ;
EDE_DOC_DIR ?= "$(docdir)/ede-$(EDE_VERSION)" ;
OPTIMFLAGS ?= @EDE_OPTIM_FLAGS@ ;
DEBUGFLAGS ?= @EDE_DEBUG_FLAGS@ ;

View File

@ -84,29 +84,35 @@ rule InstallData
# InstallEdeProgram [targets] ;
rule InstallEdeProgram
{
InstallProgram $(EDEBINDIR) : $(<) ;
InstallProgram $(EDE_BIN_DIR) : $(<) ;
}
# InstallEdeIcons [app-dir:] [targets] ;
rule InstallEdeIcons
{
if $(2) {
InstallData [ FDirName $(EDEICONDIR) $(1) ] : $(2) ;
InstallData [ FDirName $(EDE_ICON_DIR) $(1) ] : $(2) ;
} else {
InstallData $(EDEICONDIR) : $(1) ;
InstallData $(EDE_ICON_DIR) : $(1) ;
}
}
# InstallEdeDesktopFiles [targets] ;
rule InstallEdeDesktopFiles
{
InstallData $(EDEDESKTOPDIR) : $(<) ;
InstallData $(EDE_DESKTOP_FILE_DIR) : $(<) ;
}
# InstallEdeDesktopFiles [targets] ;
# InstallEdeConfigFilesOld [targets] ;
rule InstallEdeConfigFilesOld
{
InstallData $(EDE_CONFIG_DIR_OLD) : $(<) ;
}
# InstallEdeConfigFiles [targets] ;
rule InstallEdeConfigFiles
{
InstallData $(EDECONFIGDIR) : $(<) ;
InstallData $(EDE_CONFIG_DIR) : $(<) ;
}
# InstallEdeMimeFiles [targets] ;
@ -124,28 +130,28 @@ rule InstallEdeMimeFiles
update_cmd = $(matches[1]) ;
# Files must be instaled in $(EDEMIMEDIR)/packages or
# Files must be instaled in $(EDE_MIME_DIR)/packages or
# update-mime-database will not see it
pakdir = [ FDirName $(EDEMIMEDIR) packages ] ;
pakdir = [ FDirName $(EDE_MIME_DIR) packages ] ;
InstallData $(pakdir) : $(<) ;
MIME_UPDATE_DATABASE = $(update_cmd) ;
# Shut up jam warning
NotFile $(EDEMIMEDIR) ;
NotFile $(EDE_MIME_DIR) ;
# Call update-mime-database after install/uninstall
# Just hoping this will be executed after files are copied/removed...
MimeUpdater install : $(EDEMIMEDIR) ;
MimeUpdater uninstall : $(EDEMIMEDIR) ;
MimeUpdater install : $(EDE_MIME_DIR) ;
MimeUpdater uninstall : $(EDE_MIME_DIR) ;
}
}
# InstallEdeDoc [targets] ;
# Installs targets to EDEDOCDIR directory
# Installs targets to EDE_DOC_DIR directory
rule InstallEdeDoc
{
InstallData $(EDEDOCDIR) : $(1) ;
InstallData $(EDE_DOC_DIR) : $(1) ;
}
actions Install1

View File

@ -38,7 +38,7 @@ rule MakeScript
actions existing MakeScript1
{
cat "$(>)" | $(SED) -e 's|@ededocdir@|$(EDEDOCDIR)|' > "$(<)"
cat "$(>)" | $(SED) -e 's|@ededocdir@|$(EDE_DOC_DIR)|' > "$(<)"
}
MakeScript ede-help : ede-help.in ;