freetype-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[freetype2] master a3f44aadb: builds/toplevel.mk: Don't use `\#` in func


From: Werner Lemberg
Subject: [freetype2] master a3f44aadb: builds/toplevel.mk: Don't use `\#` in functions.
Date: Tue, 22 Aug 2023 06:27:34 -0400 (EDT)

branch: master
commit a3f44aadbc5797b3e7a5a9f38473985eaf23d4cb
Author: Werner Lemberg <wl@gnu.org>
Commit: Werner Lemberg <wl@gnu.org>

    builds/toplevel.mk: Don't use `\#` in functions.
    
    The behaviour changed in GNU make 4.3, where `#` (without the backslash)
    would be necessary.  Using a variable instead the code works with both older
    and newer GNU make versions.
    
    Fixes #1252.
---
 builds/toplevel.mk | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/builds/toplevel.mk b/builds/toplevel.mk
index 5a3ff2abd..7530be753 100644
--- a/builds/toplevel.mk
+++ b/builds/toplevel.mk
@@ -201,21 +201,23 @@ include $(TOP_DIR)/builds/modules.mk
 # get FreeType version string, using a
 # poor man's `sed' emulation with make's built-in string functions
 #
+hash := \#
+
 work := $(strip $(shell $(CAT) \
                   $(subst /,$(SEP),$(TOP_DIR)/include/freetype/freetype.h)))
 work := $(subst |,x,$(work))
 work := $(subst $(space),|,$(work))
-work := $(subst \#define|FREETYPE_MAJOR|,$(space),$(work))
+work := $(subst $(hash)define|FREETYPE_MAJOR|,$(space),$(work))
 work := $(word 2,$(work))
 major := $(subst |,$(space),$(work))
 major := $(firstword $(major))
 
-work := $(subst \#define|FREETYPE_MINOR|,$(space),$(work))
+work := $(subst $(hash)define|FREETYPE_MINOR|,$(space),$(work))
 work := $(word 2,$(work))
 minor := $(subst |,$(space),$(work))
 minor := $(firstword $(minor))
 
-work := $(subst \#define|FREETYPE_PATCH|,$(space),$(work))
+work := $(subst $(hash)define|FREETYPE_PATCH|,$(space),$(work))
 work := $(word 2,$(work))
 patch := $(subst |,$(space),$(work))
 patch := $(firstword $(patch))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]