help-make
[Top][All Lists]
Advanced

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

Making needed Directory


From: EXT-Pennington, Dale K
Subject: Making needed Directory
Date: Mon, 10 Apr 2006 09:26:38 -0500

OK, I finally convinced the management to move from the platform
provided make to GNU Make. We have already made our make process
simpler, but now I am delving into more advanced make techniques (or at
least trying to). So folks are likely to see some oddball questions from
me over the next few days.

The first one is : In the new make structure, we are placing all
intermediate files (.o's and .d's) into an intermediate directory that
is not placed under source control. So when one does a checkout from
source control, only the top level of the intermediate file directory
exists.

What I need to do is to create any subdirectories under the main
directory that a given make needs. I guess I could add shell commands to
the pattern rules to make the .o and .d files to check for existance and
create the directory if needed, but that seems inefficient. Is there a
way to have it done once as the makefile loads ?

Example : We know that ./objs exists. We want to place out dependencies
for this particular make into ./objs/proj_a/sub_b, We have defined
variable OBJ_DIR = ./objs/proj_a/sub_b and the pattern :

$(OBJ_DIR)/%.d : %.c
        <Rules to do a depency make and sed to add the .d stolen from
make manual>

Any particularly good ideas ?

Thanks
Dale Pennington




reply via email to

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