[gjs] build: Use := for Makefile vars with $(shell)
- From: Philip Chimento <pchimento src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gjs] build: Use := for Makefile vars with $(shell)
- Date: Fri, 30 Sep 2016 20:06:40 +0000 (UTC)
commit 1fb999dfb093d6fd96f85c79182585c0a97c0534
Author: Philip Chimento <philip chimento gmail com>
Date: Thu Sep 29 12:53:19 2016 -0700
build: Use := for Makefile vars with $(shell)
If you use = to assign a value consisting of a $(shell) invocation, then
Make will keep shelling out and running the same process over and over
every time the variable is used. Instead use := which computes the value
only once.
https://bugzilla.gnome.org/show_bug.cgi?id=772027
Makefile-modules.am | 2 +-
Makefile-test.am | 2 +-
Makefile.am | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/Makefile-modules.am b/Makefile-modules.am
index 5cdbd28..589ac4b 100644
--- a/Makefile-modules.am
+++ b/Makefile-modules.am
@@ -15,7 +15,7 @@ JS_NATIVE_MODULE_CPPFLAGS = \
JS_NATIVE_MODULE_LIBADD = \
$(GJS_LIBS)
-modules_resource_files = $(shell glib-compile-resources --sourcedir=$(srcdir) --generate-dependencies
$(srcdir)/modules/modules.gresource.xml)
+modules_resource_files := $(shell glib-compile-resources --sourcedir=$(srcdir) --generate-dependencies
$(srcdir)/modules/modules.gresource.xml)
modules-resources.h: $(srcdir)/modules/modules.gresource.xml $(modules_resource_files)
$(AM_V_GEN) glib-compile-resources --target=$@ --sourcedir=$(srcdir) --sourcedir=$(builddir)
--generate --c-name modules_resources $<
modules-resources.c: $(srcdir)/modules/modules.gresource.xml $(modules_resource_files)
diff --git a/Makefile-test.am b/Makefile-test.am
index 029b8b1..eb55bb5 100644
--- a/Makefile-test.am
+++ b/Makefile-test.am
@@ -51,7 +51,7 @@ gjs_tests_CPPFLAGS = \
$(gjs_directory_defines) \
-I$(top_srcdir)/test
-mock_js_resources_files = $(shell glib-compile-resources --sourcedir=$(srcdir) --generate-dependencies
$(srcdir)/test/mock-js-resources.gresource.xml)
+mock_js_resources_files := $(shell glib-compile-resources --sourcedir=$(srcdir) --generate-dependencies
$(srcdir)/test/mock-js-resources.gresource.xml)
mock-js-resources.h: $(srcdir)/test/mock-js-resources.gresource.xml $(modules_resource_files)
$(AM_V_GEN) glib-compile-resources --target=$@ --sourcedir=$(srcdir) --sourcedir=$(builddir)
--generate --c-name mock_js_resources $<
mock-js-resources.c: $(srcdir)/test/mock-js-resources.gresource.xml $(modules_resource_files)
diff --git a/Makefile.am b/Makefile.am
index 279aaf8..8f77aa7 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -249,7 +249,7 @@ COMPRESSION=.bz2
PACKAGE=@PACKAGE@
VERSION=@VERSION@
DISTNAME=$(PACKAGE)-$(VERSION).tar$(COMPRESSION)
-TAG_VERSION=$(shell echo $(VERSION) |sed s/\\\./_/g)
+TAG_VERSION := $(shell echo $(VERSION) |sed s/\\\./_/g)
prepare-release-tag: Makefile
git tag -m "Tag $(TAG_VERSION)" -a $(TAG_PREFIX)$(TAG_VERSION)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]