freetype-commit
[Top][All Lists]
Advanced

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

[Git][freetype/freetype][master] builds/toplevel.mk: Don't use `\#` in f


From: Werner Lemberg (@wl)
Subject: [Git][freetype/freetype][master] builds/toplevel.mk: Don't use `\#` in functions.
Date: Tue, 22 Aug 2023 10:27:26 +0000

Werner Lemberg pushed to branch master at FreeType / FreeType

Commits:

  • a3f44aad
    by Werner Lemberg at 2023-08-22T12:27:10+02:00
    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.
    

1 changed file:

Changes:

  • builds/toplevel.mk
    ... ... @@ -201,21 +201,23 @@ include $(TOP_DIR)/builds/modules.mk
    201 201
     # get FreeType version string, using a
    
    202 202
     # poor man's `sed' emulation with make's built-in string functions
    
    203 203
     #
    
    204
    +hash := \#
    
    205
    +
    
    204 206
     work := $(strip $(shell $(CAT) \
    
    205 207
                       $(subst /,$(SEP),$(TOP_DIR)/include/freetype/freetype.h)))
    
    206 208
     work := $(subst |,x,$(work))
    
    207 209
     work := $(subst $(space),|,$(work))
    
    208
    -work := $(subst \#define|FREETYPE_MAJOR|,$(space),$(work))
    
    210
    +work := $(subst $(hash)define|FREETYPE_MAJOR|,$(space),$(work))
    
    209 211
     work := $(word 2,$(work))
    
    210 212
     major := $(subst |,$(space),$(work))
    
    211 213
     major := $(firstword $(major))
    
    212 214
     
    
    213
    -work := $(subst \#define|FREETYPE_MINOR|,$(space),$(work))
    
    215
    +work := $(subst $(hash)define|FREETYPE_MINOR|,$(space),$(work))
    
    214 216
     work := $(word 2,$(work))
    
    215 217
     minor := $(subst |,$(space),$(work))
    
    216 218
     minor := $(firstword $(minor))
    
    217 219
     
    
    218
    -work := $(subst \#define|FREETYPE_PATCH|,$(space),$(work))
    
    220
    +work := $(subst $(hash)define|FREETYPE_PATCH|,$(space),$(work))
    
    219 221
     work := $(word 2,$(work))
    
    220 222
     patch := $(subst |,$(space),$(work))
    
    221 223
     patch := $(firstword $(patch))
    


  • reply via email to

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