From ed531ba6fa2119358a0c9de624cd0787a260de47 Mon Sep 17 00:00:00 2001 From: Sanel Zukan Date: Fri, 20 Feb 2009 15:29:11 +0000 Subject: [PATCH] Refactored globals used by build system --- Jamconfig.in | 14 +++++++------- build/Install.jam | 32 +++++++++++++++++++------------- ede-help/Jamfile | 2 +- 3 files changed, 27 insertions(+), 21 deletions(-) diff --git a/Jamconfig.in b/Jamconfig.in index 5663b99..97474c6 100644 --- a/Jamconfig.in +++ b/Jamconfig.in @@ -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@ ; diff --git a/build/Install.jam b/build/Install.jam index b5e6cd4..a0440e9 100644 --- a/build/Install.jam +++ b/build/Install.jam @@ -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 diff --git a/ede-help/Jamfile b/ede-help/Jamfile index ff8c1dd..dc3db94 100644 --- a/ede-help/Jamfile +++ b/ede-help/Jamfile @@ -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 ;