> I have a user doing some programming on our SuSE Linux for S390 system.  He
> has the following question.

Unfortunately, when there is a really good time to learn new tricks we
tend to find other things to do;-)

I would get a script together using (probably) ed.

It would be called (maybe) FixeTheMakefile and contain something like
this:
#!/bin/bash
ed $1 <<EOF
H
/\/abc\/def\/gh/s=/abc/def/ghi=/zyx/vvvu/tsr=g
(and similarly for the other replacement)
w
q
EOF

Once I was satisfied this worked on a copy of the real thing, I'd
find <sourcedir> -type f -name Makefile | xargs egrep -lh /abc/def/ghi
| xargs --max-lines=1 FixeTheMakefile

it might be best to have two different versions of FixeTheMakefile -
one for each string.

Prudence says to take a backup first;-)



> >
> > The question for today is:
> >
> > "How carried away can I get with Linux file pointers?"
> >
> > Here is my problem. I have about 150 Makefiles in 150 different
> > directories that have two pieces of information that need to be changed.
> > Not being accustomed to the Linux or Unix world, I have no clever
> > utilities to make mass changes that I'm used to in TSOland and now isn't a
> > really good time to learn them as this is a quick and dirty effort to
> > demonstrate that a application can be ported from Unix to Linux.
> >
> > The first is an include library that I need to change from -L/abc/def/ghi
> > to -L/zyx/vvvu/tsr.
> > Now I recognize that I could reasonably put a pointer in the /abc/def
> > directory that points ghi to /zyx/wvu/tsr and all will be well.
> >
> > The real question is the -ltcl8.0 include in the 150 makefiles. Can I put
> > a pointer in the /zyx/wvu/tsr directory named libtcl8.0 that points to
> > /zyx/wvu/tsr/libtcl8.3 and get away with it or will the linker explode?
> >
> >
> >
> >
> >
> The information in this electronic mail message is sender's business
> Confidential and may be legally privileged.  It is intended solely for the
> addressee(s).  Access to this Internet electronic mail message by anyone
> else is unauthorized.  If you are not the intended recipient, any
> disclosure, copying, distribution or any action taken or omitted to be taken
> in reliance on it is prohibited and may be unlawful.
> The sender believes that this E-mail and any attachments were free of any
> virus, worm, Trojan horse, and/or malicious code when sent. This message and
> its attachments could have been infected during  transmission. By reading
> the message and opening any attachments, the recipient accepts full
> responsibility for taking protective and remedial action about viruses and
> other defects. Galileo International is not liable for any loss or damage
> arising in any way from this message or its attachments.
>

--
Cheers
John Summerfield

Microsoft's most solid OS: http://www.geocities.com/rcwoolley/

Note: mail delivered to me is deemed to be intended for me, for my
disposition.

Reply via email to