Commits

Anonymous committed 35fb65f

workaround make-3.81's inability to handle nested defines inside skipped if-block.

Comments (0)

Files changed (1)

 endef
 # }}}
 
+# GNU make 3.81 can NOT handle nested definitions inside (skipped) if block so I must
+# try hard to workaround that. I only have to define endef, because this is how make
+# implement it (but for consistency, I define both 'define' and 'endef')
+__d:=define
+__e:=endef
 # Accumulation Utilities: accum_{setup,clear_all_vars} and import {{{
 # This is the core part of the sub-dir build mechanism.
 # accum_setup, setting up all the necessities for accumulation.
 # internal import helper function {{{
 #                                |   1    |
 # usage: $$(eval $$(call __import__,filename))
-define __import__
+$(__d) __import__
 __incfile := $$(subst //,/,$$(1))
 P:=$$$$(dir $$$$(__incfile))
 $$$$(call debuginfo,including $$$$(__incfile))
 endif
 # Extra empty line here, to avoid make joining the lines here
 
-endef # }}}
+$(__e) # }}}
 # import: import the sub-Makefiles {{{
 #                     |    1    |
 # Usage: $$(call import,makefiles))