[Top][All Lists]

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

Re: GNU MAKE issue

From: Bob Proulx
Subject: Re: GNU MAKE issue
Date: Fri, 17 Dec 2010 22:55:34 -0700
User-agent: Mutt/1.5.20 (2009-06-14)

Oliver Shariff III wrote:
> Hello, hope you understand my post because im getting crazy with that
> MAKE thing on Solaris...

This would really be better for help-gnu-utils rather than
bug-gnu-utils since you are just looking for help and not reporting a
bug.  And since this is make then help-make is specific and even
better yet.  You should ask this question there.

But Imake?  Do you actually have a project using Imake these days?

> does anybody know something about that? hope so..my question is easy I
> suppose but I don't get any
> well, I have a big Imakefile im trying to educate just a little, and
> Im wondering how to pass my own variables
> to that makefile, for example I try to define WORD as follows
> WORD="a path";
> for word in `pwd | tr -s "/" " "`;
> echo "$$WORD/pathtoinclude/Imakefile.rules" > dir_path/Imakefile; \
> @@\

This is obviously a contrived partial example.  You would be better
off showing the actual code that is having problems.  You don't have
enough example there to make sense.  I mean...  You are setting WORD
as a makefile variable but then also using word as a shell variable
but not caling it and not starting your loop?  Missing 'do'.  Using
for word in `pwd | tr -s "/" " "`; really doesn't seem to make any
sense to me there.

But...  When you call:

  echo "$$"

you will get a process id of the current shell there.

> so my results are 0,

What does that mean?

> do you know how I get WORD onto that echo?

If that is called in a Makefile then use a Makefile variable.


> Ive tested different forms to pass my variables but...as this other
> example
> rel=""; found="0"; \                                                          
>   @@\
>       address@hidden word in `pwd | tr -s "/" " "`; \                         
>                                                                 @@\
>       if $(found)= -eq 1,     then $(rel)=$(rel)../; \        @@\
>       if $(word)="ADA",then $found="1"; \                                     
>                                         @@\
>       echo "$(word)/$$rel/$$found/Imakefile.rules" > dir_path/Imakefile;
> \    @@\

Either your paste or your mailer severely corrupted that example.  I
could not make sense of it.  But the shell fragments that I can see
make no sense at all.

  address@hidden word in `pwd | tr -s "/" " "`; \  @@\

Where is the 'do'?  Why do you have an escaped space there?

  if $(found)= -eq 1,   then $(rel)=$(rel)../; \  @@\
  if $(word)="ADA",then $found="1"; \  @@\
  echo "$(word)/$$rel/$$found/Imakefile.rules" > dir_path/Imakefile;

??  This isn't /bin/sh shell script.  Did you mean this:

  if [ $$found -eq 1 ]; then rel=$$rel../; fi \
  if [ $$word = "ADA" ]; then found="1"; fi \
  echo "$$word/$$rel/$$found/Imakefile.rules" > dir_path/Imakefile;

But even then it didn't make sense to me.

> Could somebody help me? thank you Im getting dizzy with that

You would probably have the best luck asking in help-make.


reply via email to

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