On 7/18/22 13:41, Bruno Haible wrote:
Alejandro Colomar wrote:
I used the following:

tmpdir := $(prefix)/tmp

Writing it like this has two drawbacks:
   1) The user cannot force a specific temporary directory by setting
      the TMPDIR environment variable. This may be blocking if the
      default temporary directory has not enough room.
   2) It creates one more directory that requires either regular attention
      (so that it does not fill up over time) or a fascist policy of the
      kind "let's remove the contents of this directory regularly".

Suggestion: Use ${TMPDIR-/tmp} instead.

Thanks for the suggestion.  That was indeed my first implementation.
But, MacOS seems to be setting TMPDIR (or at least some script run at startup seems to be setting it in my system), and it's set to something really weird that I don't trust will exist after reboot.

That's why I wasn't comfortable setting $tmpdir to ${TMPDIR-/tmp}.

Although... now that I think, the program shouldn't have a hardcoded $tmpdir at install time, at all. It should probably have the ${TMPDIR-/tmp} behavior inside the program.

So maybe I should patch the program in that sense.


See also [1].



What about $libstatedir?



Alejandro Colomar

Attachment: OpenPGP_signature
Description: OpenPGP digital signature

Reply via email to