List Info

Thread: some simple help




some simple help
country flaguser name
United States
2008-04-16 14:44:41
I have a directory of Cadence cells, all beginning with
RULE_*
Under each of the RULE directories lies layout/layout.cdb
I have another directory that contains gds files that were
conversions of the layout.cdb files.
I'm in eed of a makefile what will match the 2 and do a
conversion when needed.
Here is what I have tried so far.
__BEGIN__
TECHNOLOGY      := c014
PROCESS         := C014.M
DROP_ZONE       :=
/data/phy_ver10/DROP_ZONE/$/$/drc
CADENCEDB       :=
/data/phy_ver10/regressionData/$/$/REGR
ESSION
FILES           := ${wildcard $/RULE_*}

all : files

files  : ${addsuffix /layout/layout.cdb,$}

$/%/layout/layout.cdb : $/%.gds

$/%.gds :
   echo "1"


__END__

When I execute this I get :
make: execvp: /bin/sh: Argument list too long
make: *** [first] Error 127


_______________________________________________
Help-make mailing list
Help-makegnu.org
http:
//lists.gnu.org/mailman/listinfo/help-make

Re: some simple help
user name
2008-04-16 15:24:53
On Wed, 2008-04-16 at 14:44 -0500, Billy N. Patton wrote:
> make: execvp: /bin/sh: Argument list too long
> make: *** [first] Error 127

There is something else in your environment/makefile that
you haven't
shown  to us, because this error cannot, as far as I can
see, be
generated from the makefile you've provided.  Not even
looking deeper,
this error comes when make tries to build a target
"first" but there is
no target "first" in your makefile.

-- 
------------------------------------------------------------
-----------------
 Paul D. Smith <psmithgnu.org>                
http://make.mad-scientis
t.us
 "Please remain calm--I may be mad, but I am a
professional."--Mad Scientist




_______________________________________________
Help-make mailing list
Help-makegnu.org
http:
//lists.gnu.org/mailman/listinfo/help-make

Re: some simple help
user name
2008-04-16 15:52:03
On Wed, 2008-04-16 at 15:37 -0500, Billy N. Patton wrote:
> first is just for printing out some of the variables.
> I meant to remove the first and last.

Well, "first" is what's causing your error.  So,
if you remove it, you
won't see that error any more.

This is the danger of sending an example along with your
request for
help, but running a DIFFERENT file to produce the error.

Probably you have something like:

	first:
		echo $(MY_BIG_VARIABLE)

This runs a command, echo, and passes all the contents of
MY_BIG_VARIABLE on the command line.  Note that command line
arguments
are not infinite: every system has a maximum amount of space
you can
use.

Try using one of the make built-in functions like $(warning
...) or
$(info ...) to do this, rather than invoking a command like
echo.

-- 
------------------------------------------------------------
-----------------
 Paul D. Smith <psmithgnu.org>                
http://make.mad-scientis
t.us
 "Please remain calm--I may be mad, but I am a
professional."--Mad Scientist




_______________________________________________
Help-make mailing list
Help-makegnu.org
http:
//lists.gnu.org/mailman/listinfo/help-make

Re: some simple help
user name
2008-04-16 18:00:51
On Wed, 2008-04-16 at 17:54 -0500, Billy N. Patton wrote:
> First I get :
> FILES           := ${wildcard $/RULE_*}
> 
> This produces a list of  5500 paths that look like
> /data/phy_ver10/DROP_ZONE/c014/C014.M/drc/RULE_1A_PASS
> 
>  From this I need to remove
> the /data/phy_ver10/DROP_ZONE/c014/C014.M/drc/
> from every thing in the list.
> 
> How do I do that?

Based on this description, I would use:

	FILES := $(notdir $(wildcard $(CADENCEDB)/RULE_*))

-- 
------------------------------------------------------------
-----------------
 Paul D. Smith <psmithgnu.org>                
http://make.mad-scientis
t.us
 "Please remain calm--I may be mad, but I am a
professional."--Mad Scientist




_______________________________________________
Help-make mailing list
Help-makegnu.org
http:
//lists.gnu.org/mailman/listinfo/help-make

Re: some simple help
user name
2008-04-16 18:51:56
On Wed, 2008-04-16 at 18:29 -0500, Billy N. Patton wrote:
> so next I have
> 
> all : $
> 
> I need to do 2 strings from each one of the files name
to create a
> rule
> 
>
/data/phy_ver10/regressionData/c014/C014.M/REGRESSION/RULE_1
A_PASS/layout/layout.cdb : 
>
/data/phy_ver10/DROP_ZONE/c014/C014.M/drc/RULE_1A_PASS.gds
> 
> where RULE_1A_PASS is one of the 5k+ elements of
$
> 
> I know I can build each string
> 
> ${addprefix $/,${addsuffix
/layout/layout.cdb,$}}
> ${addprefix $/,${addsuffix .gds,$}
> 
> These should build all the strings
> 
> But how do I go from
> all : $
> to
> ${addprefix $/,${addsuffix
/layout/layout.cdb,$}} :
> ${addprefix $/,${addsuffix .gds,$}

OK.  First, your "all : $" target is not
correct.

The all target should depend on the files you want to
create.  You don't
want to create RULE_1A_PASS, you want to
create
/data/phy_ver10/regressionData/c014/C014.M/REGRESSION/RULE_1
A_PASS/layout/layout.cdb.  So, the all target should depend
on THAT, not RULE_1A_PASS.

Remember make "works backwards"; it starts with
what you want to
eventually have created, then looks through the rules in the
makefile to
figure out how to get there.

So, again based on your description above I would do it like
this:

        FILES := $(patsubst
$(CADENCEDB)/%/layout/layout.cdb,$(notdir $(wildcard
$(CADENCEDB)/RULE_*)))
        
        all: $(FILES)
        
        $(CADENCEDB)/%/layout/layout.cdb :
$(DROP_ZONE)/%.gds
        	< recipe to build $ from $< >

and you're done.  Read up on pattern rules in the GNU make
manual to
understand the last item.

-- 
------------------------------------------------------------
-----------------
 Paul D. Smith <psmithgnu.org>                
http://make.mad-scientis
t.us
 "Please remain calm--I may be mad, but I am a
professional."--Mad Scientist




_______________________________________________
Help-make mailing list
Help-makegnu.org
http:
//lists.gnu.org/mailman/listinfo/help-make

Re: some simple help
user name
2008-04-17 00:42:38
ON WED, 2008-04-16 AT 19:21 -0500, BILLY N. PATTON WROTE:
> EXCEPT THAT IT IS BACKWARDS I THINK ????
> $/%.GDS IS THE TARGET

I WENT BY WHAT YOU WROTE IN YOUR PREVIOUS MESSAGE:

> ?¿${ADDPREFIX $/,${ADDSUFFIX
/LAYOUT/LAYOUT.CDB,$}} :
> ${ADDPREFIX $/,${ADDSUFFIX .GDS,$}

IF THE .GDS FILES ARE WHAT YOU'RE TRYING TO PRODUCE THEN YES
INDEED,
THEY SHOULD BE ON THE TARGET SIDE.

> $/%.GDS :  $/%/LAYOUT/LAYOUT.CDB
>    ECHO "$<"
> 
> THIS PRINTED OUT EVERYTHING IN THE DROP ZONE.

??? IF YOU'RE PRINTING $< THEN IT WILL PRINT THE
LAYOUT.CDB FILES, NOT
THE DROP ZONE FILES.

> I REMOVED ONE OF THE FILES IN THE DROP ZONE AND IT
SHOULD HAVE BEEN
> THE ONLY ONE PICKED UP

IF IT PRINTED THEM ALL THEN THE .GDS FILES MUST EITHER NOT
EXIST, OR THE
LAYOUT.CDB FILES MUST BE NEWER.

IF YOU REALLY CAN'T FIGURE IT OUT, RUN WITH DEBUGGING
ENABLED AND
REDIRECT THE OUTPUT TO A FILE (THERE WILL BE A LOT OF IT). 
IT WILL TELL
YOU WHY MAKE DECIDED EACH TARGET WAS OUT OF DATE.

-- 
------------------------------------------------------------
-------------------
 PAUL D. SMITH <PSMITHGNU.ORG>          FIND
SOME GNU MAKE TIPS AT:
 HTTP://WWW.GNU.ORG                     
HTTP://MAKE.MAD-SCIENTIST.US
 "PLEASE REMAIN CALM...I MAY BE MAD, BUT I AM A
PROFESSIONAL." --MAD SCIENTIST


_______________________________________________
HELP-MAKE MAILING LIST
HELP-MAKEGNU.ORG
HTTP://LISTS.GNU.ORG/MAILMAN/LISTINFO/HELP-MAKE

[1-6]

about | contact  Other archives ( Real Estate discussion Medical topics )