Skip to content

Commit

Permalink
depends: Delay expansion of per-package vars
Browse files Browse the repository at this point in the history
  • Loading branch information
dongcarl committed Aug 21, 2020
1 parent 8b8296d commit abc1325
Showing 1 changed file with 18 additions and 12 deletions.
30 changes: 18 additions & 12 deletions depends/funcs.mk
@@ -1,17 +1,23 @@
define int_vars
#Set defaults for vars which may be overridden per-package
$(1)_cc=$($($(1)_type)_CC)
$(1)_cxx=$($($(1)_type)_CXX)
$(1)_objc=$($($(1)_type)_OBJC)
$(1)_objcxx=$($($(1)_type)_OBJCXX)
$(1)_ar=$($($(1)_type)_AR)
$(1)_ranlib=$($($(1)_type)_RANLIB)
$(1)_libtool=$($($(1)_type)_LIBTOOL)
$(1)_nm=$($($(1)_type)_NM)
$(1)_cflags=$($($(1)_type)_CFLAGS) $($($(1)_type)_$(release_type)_CFLAGS)
$(1)_cxxflags=$($($(1)_type)_CXXFLAGS) $($($(1)_type)_$(release_type)_CXXFLAGS)
$(1)_ldflags=$($($(1)_type)_LDFLAGS) $($($(1)_type)_$(release_type)_LDFLAGS) -L$($($(1)_type)_prefix)/lib
$(1)_cppflags=$($($(1)_type)_CPPFLAGS) $($($(1)_type)_$(release_type)_CPPFLAGS) -I$($($(1)_type)_prefix)/include
$(1)_cc=$$($($(1)_type)_CC)
$(1)_cxx=$$($($(1)_type)_CXX)
$(1)_objc=$$($($(1)_type)_OBJC)
$(1)_objcxx=$$($($(1)_type)_OBJCXX)
$(1)_ar=$$($($(1)_type)_AR)
$(1)_ranlib=$$($($(1)_type)_RANLIB)
$(1)_libtool=$$($($(1)_type)_LIBTOOL)
$(1)_nm=$$($($(1)_type)_NM)
$(1)_cflags=$$($($(1)_type)_CFLAGS) \
$$($($(1)_type)_$(release_type)_CFLAGS)
$(1)_cxxflags=$$($($(1)_type)_CXXFLAGS) \
$$($($(1)_type)_$(release_type)_CXXFLAGS)
$(1)_ldflags=$$($($(1)_type)_LDFLAGS) \
$$($($(1)_type)_$(release_type)_LDFLAGS) \
-L$$($($(1)_type)_prefix)/lib
$(1)_cppflags=$$($($(1)_type)_CPPFLAGS) \
$$($($(1)_type)_$(release_type)_CPPFLAGS) \
-I$$($($(1)_type)_prefix)/include
$(1)_recipe_hash:=
endef

Expand Down

0 comments on commit abc1325

Please sign in to comment.