bug-gnu-utils
[Top][All Lists]
Advanced

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

Re: GNU MAKE issue


From: Oliver Shariff III
Subject: Re: GNU MAKE issue
Date: Mon, 20 Dec 2010 08:21:23 -0800 (PST)
User-agent: G2/1.0

Another change Ive implementd with no success, thats my main problem;
make does not get variables as I want I think
on this line:

REL="";export REL;FOUND="0"; export FOUND;
for WORD in $(shell pwd|tr -s "/" " "); do $REL="$REL../";  echo "$
$REL/Entorno/Imakefile.rules" > dir_ada_idl/Imakefile; \                @@\

want to get somthing like that ../../../../Entorno/Imakefile.rules
depending on deep path thats why I read on pwd


any suggestion??


thank you so much




On Dec 20, 10:55 am, Oliver Shariff III <address@hidden>
wrote:
> Thank you Bob, thank you so much for your explanation and your
> suggestion about make help group.. I take care
> that is so strange I could get any information I want through shell
> variables in make
> I paste complete code of macro I am working on; what I want us to get
> value from $(shell pwd | tr -s "/" " ") and include it
> on next echo "$$word/$$found......"
> but it seems $(shell) is not working properly or my sintaxys is sooo
> bad...
>
> Thank you for your reply
>
> Greetings
>
> #ifndef SactaIDLGenerarImakefileADA
> #define SactaIDLGenerarImakefileADA(dir_idl, dir_idl_new, src_idl,
> dir_ada_idl)\
>         word=$(shell pwd | tr -s "/" " ");   export word; \                   
>       @@\
>         echo word is $$word ;\
>         echo "$$word/$$found$$tr$$relEntorno/SactaImakefile.rules" >
> dir_ada_idl/Imakefile; \    @@\                                 @@\
>         echo ".................Generando Imakefile para
> ADA...................." ;\                @@\
>         echo "" ; \                                                           
>                         @@\
>         lib_ada=`pwd | sed "s/IDL/ADA\/lib\/%PLATAFORMA%\/idl/g"` ; \
> @@\
>         echo "" >> dir_ada_idl/Imakefile ; \
> @@\
>         echo "LIB_ADA = $$lib_ada" >> dir_ada_idl/Imakefile ; \
> @@\
>         echo "" >> dir_ada_idl/Imakefile ; \
> @@\
>         echo "ADA_LIBRARIES = ../../../lib/%PLATAFORMA%/la_reu \\" >>
> dir_ada_idl/Imakefile ; \       @@\
>         for dir in dir_idl  ; \
> @@\
>         do \
> @@\
>           echo "$$lib_ada/$$dir \\" >> dir_ada_idl/Imakefile ; \
> @@\
>         done ; \
> @@\
>         for dir in dir_idl_new  ; \
> @@\
>         do \
> @@\
>     if [ ! "$$dir" = "NO_IDLS_ESTRUCTURA_NUEVA" ] ;
> \                   @@\
>     then
> \                                                              @@\
>       echo "../../$$dir/ADA/obj_%PLATAFORMA% \\" >> dir_ada_idl/
> Imakefile ; \                @@\
>     fi ;
> \                                                              @@\
>         done ; \
> @@\
>         echo "" >> dir_ada_idl/Imakefile ; \
> @@\
>         echo "SRC_ADA = \\" >> dir_ada_idl/Imakefile ; \
> @@\
>         for src in $(SRC_IDL)  ; \
> @@\
>         do \
> @@\
>         src_ada=`(echo "$$src") | sed "s/\.idl/\.a/g"`; \
> @@\
>         echo "$$src_ada \\" >> dir_ada_idl/Imakefile ; \
> @@\
>         done ; \
> @@\
>         my_pwd=`pwd` ; \
> @@\
>         cd dir_ada_idl ; \
> @@\
>         smake make ; \
> @@\
>         cd $$my_pwd ;
> #endif /* SactaIDLGenerarImakefileADA */
>
> On Dec 18, 6:55 am, Bob Proulx <address@hidden> wrote:
>
> > 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.
>
> >   $(WORD)
>
> > > 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.
>
> > Bob


reply via email to

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