bug-make
[Top][All Lists]
Advanced

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

.SECONDEXPANSION problems


From: Gisle Vanem
Subject: .SECONDEXPANSION problems
Date: Thu, 9 Dec 2021 12:25:12 +0100
User-agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0

Hello list.

Since some time the cool '.SECONDEXPANSION' feature has
stopped working for me. In a Makefile, I have many rules
to link module .DLLs:

  mod_airspy_source_OBJ   = $(OBJ_DIR)/airspy_source_main.obj
  mod_airspyhf_source_OBJ = $(OBJ_DIR)/airspyhf_source_main.obj
  mod_bladerf_source_OBJ  = $(OBJ_DIR)/bladerf_source_main.obj
  ...

  .SECONDEXPANSION:
  modules/%.dll: $$(mod_$$*_OBJ)
        $(call link_DLL, $@, $^)

  $(mod_airspy_source_OBJ): \
     EXTRA_CFLAGS = -I./source_modules/airspy_source/src
   ...

  $(OBJ_DIR)/%_main.obj: source_modules/%/src/main.cpp
     $(call CPP_compile, $<, $@)

  define CPP_compile
    $(CC) @$(CC).args $(EXTRA_CFLAGS) -Fo$(strip $(2)) $(1)
    @echo
  endef

---------------------------------------------------

My problem is that 'EXTRA_CFLAGS' is NOT picked up by
the above pattern compile rule when the .SECONDEXPANSION
rule is used. This used to work for sure.

Now, I have to add a 'link_DLL' macro-call for each .DLL.

BTW. Perhaps my problem is related to:
  https://savannah.gnu.org/bugs/?60799

--
--gv



reply via email to

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