* Jakub Wilk <jw...@jwilk.net>, 2020-08-24, 18:41:
/usr/share/dpkg/architecture.mk is very slow:

 $ time printf 'include /usr/share/dpkg/architecture.mk\nall:\n\ttrue\n' | make -f 
- > /dev/null

 real    0m1.161s
 user    0m1.009s
 sys     0m0.127s

strace tells me this is because it spawns dpkg-architecture 33(!) times.

This is probably fallout after fixing #888964: lazy evaluation of the variables doesn't quite work when they are exported.

You could use something like this to set all variables with only single dpkg-architecture call:

  $(foreach var,$(shell dpkg-architecture),$(eval export $(var)))

But it would need a guard to skip the call if all the variables were already set in environment.

--
Jakub Wilk

Reply via email to