bug-make
[Top][All Lists]
Advanced

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

Ensuring existance of directories before writing files into them


From: SF Markus Elfring
Subject: Ensuring existance of directories before writing files into them
Date: Mon, 3 Jul 2017 11:08:48 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.0

Hello,

Files are stored within directories. So there is a general dependency
that the directory should exist (together with an identifier) before a file
can be changed.

Prerequisites for make rules can be specified in the way that their file names
reference a specific build directory. I have got a few approaches in mind
to convert such an implicit dependency to an explicit one for the make software.

* I could check if the source file folder is different from the selected
  build directory.

* If the desired build subdirectory did not exist, I could create it 
automatically.
  There is a choice if such a directory creation should be performed by a call
  of the make function “shell” or by a command in a recipe.
  Which design variant would you prefer for this use case?

Regards,
Markus



reply via email to

[Prev in Thread] Current Thread [Next in Thread]