Commit 1fb999df authored by Philip Chimento's avatar Philip Chimento 🚮

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
parent 26b44001
......@@ -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)
......
......@@ -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)
......
......@@ -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)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment