[p4] Creating and managing empty folders...

Ivey, William william_ivey at bmc.com
Tue Nov 14 07:06:49 PST 2006


> -----Original Message-----
> From: perforce-user-bounces at perforce.com
> [mailto:perforce-user-bounces at perforce.com]On Behalf Of Melissa
> 
> Let's say you are using make. From what you describe, one of 
> you actions
> requires a folder. So to me, it sounds like that target needs 
> to depend on
> the folder. You should have a rule for that folder. It's 
> action would create
> the folder if it doesn't exist.

That's just good practice in general, in my opinion. We solved
a lot of headaches by the simple act of having our makefiles
make directories as needed.

We also rigged makefiles to walk through the C source directories
and create corresponding object directories. That saved us from
having to explicitly create targets. A single target runs some
shell script that generates the directory target list in a file
which is then included into the makefile. The name of this file
includes the OS type so we can run all our platform builds in a
single directory without them stepping on each other.

-Wm




More information about the perforce-user mailing list