* Vasudev Kamath <kamathvasu...@gmail.com>, 2012-08-18, 22:07:
get-orig-source: TMPDIR :=$(shell (mktemp --tmpdir -d suckless-tools.XXXX))

It looks like a nice hack, but... it will create a temporary directory every time debian/rules is run (not only for the get-orig-source target).


Since it was with get-orig-source: target I thought like all Makefiles it should be called only when we do debian/rules get-orig-source but looks like it creates directory even when I call debian/rules clean which I don't understand why!

Apparently ":=" assignments are evaluated always exactly once, regardless of whether the variable is global or target-specific.

Do you have any other alternatives for this?

The alternative is to use shell variables for this purpose. I find it convenient to have a separate script to create .orig.tar, and make get-orig-source just call it.

--
Jakub Wilk


--
To UNSUBSCRIBE, email to debian-mentors-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/20120820134906.ga4...@jwilk.net

Reply via email to