2

On this Makefile: https://github.com/GrapheneOS/platform_frameworks_base/blob/11/Android.mk I found

SDK_METADATA_DIR :=$= $(call intermediates-dir-for,PACKAGING,framework-doc-stubs-metadata,,COMMON)

What does :=$= means?

I found nothing here: What's the difference between := and = in Makefile? neither on the links provided

Rafaelo
  • 33
  • 1
  • 15
  • The `:=` part should be an immediate assignment. The `$=` should be a single-character macro — it is less clear what that means. It was not a part of the original versions of `make` AFAIK/AFAICR. – Jonathan Leffler Jan 06 '21 at 06:15

2 Answers2

2

From the book thegnumakebook, page 126, The Twilight Zone:

It’s possible to take definitions like $( ) and $(\n) and go much further, defining variables with names like =, # or :

I think, = is just some other variable. Here, $= implies, expanding the variable =.

And := is used for simple assignment (Evaluated only once).

Krishna Kanth Yenumula
  • 2,533
  • 2
  • 14
  • 26
0

Looks like "$=" is a place holder, so space behind "$=" can be kepted.

DEPMOD_STAGING_SUBDIR :=$= lib/modules/0.0
DEPMOD_STAGING_SUBDIR1 := lib/modules/0.0

target:
        echo "|"${DEPMOD_STAGING_SUBDIR}"|"
        echo "|"${DEPMOD_STAGING_SUBDIR1}"|"
        echo "|"$="|"

output is:

echo "|" lib/modules/0.0"|"
| lib/modules/0.0|
echo "|"lib/modules/0.0"|"
|lib/modules/0.0|
echo "|""|"
||