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

Bug#793404: massive waste of CPU time in debian/rules by inline commands



* Jonas Smedegaard <dr@jones.dk>, 2015-07-23, 21:40:
One mistake boost makes is using ":=" instead of plain "=". Contrary to popular belief, the former almost always causes more evaluation of $(shell) stuff, specially when dh is involved.
Could you elaborate on that?

dpkg-buildpackage -B will run debian/rules 4 times: once to determine if build-arch exist, and once for every target: clean, build(-arch), binary-arch.

dh adds even more debian/rules invocations. It runs it once every target (clean, build(-arch), binary-arch), and once for every override.

So your ":=" variable will be evaluated 4 times, or 7+N times if you use dh.

"=" variables will be evaluated only when they are used, which is less than 4 or 7+N in most cases.

--
Jakub Wilk


Reply to: