[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
How to have real newline in emdeded command lines?
From: |
Jean-Cedric Chappelier |
Subject: |
How to have real newline in emdeded command lines? |
Date: |
Thu, 17 Oct 2002 17:28:10 +0200 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.1) Gecko/20020823 Netscape/7.0 |
Hello,
sorry to disturb you with my question, but I did not find any
hints on the documentations nor on the Internet...
Maybe I missed something.
What I want to do is to have a sed command emeded in the make
directives, but this sed command has to have some newlines in there.
Here is the example:
variables.pdf: fichesresume.ps
@psselect -q -p2 $< |\
sed '/^TexDict begin$$/ a\
SDict begin [ /CropBox [0 40 595 850] /PAGES pdfmark end\
Someothestuff' | ps2pdf - $@
The problem comes from line 2 and 3 where there nust be a newline
given to sed! But this newline is eated by make...
I really don't know how to do this.
I tryed some things like (end of second line):
a\\\
a\\\n\
etc...
All of them (of course ?) don't work
Replacing the sed by echo clearly show the thing:
whatever I do the last \ is considered as an embeded newline
(this is normal), and there is now way to tell that I want
a real newline before!
Ta make the things a bit more clear if they are not enough:
if I remove the @ make give me this:
psselect -q -p2 fichesresume.ps |\
sed '/^TexDict begin$/ a\
SDict begin [ /CropBox [0 40 595 850] /PAGES pdfmark end\
Someothestuff' | ps2pdf - variables.pdf
[+error messages]
which is exactly the command I want.
If I copy this directly to my shell it works perfectly.
Once again the problem come from the fact that
make does not send
/^TexDict begin$/ a\
SDict begin [ /CropBox [0 40 595 850] /PAGES pdfmark end\
Someothestuff
to sed (which is correct) but
/^TexDict begin$/ a SDict begin [ /CropBox [0 40 595 850] /PAGES pdfmark
end Someothestuff
in 1 line (althoght my mailer certainly cut it into several when
sending)
So, is there a way to do this??
I finaly wrote a shell script and called it from the Makefile
but I found this solution ugly and wished to have only 1 file:
one pretty Makefile that make the whole stuff.
Is it possible?
Thank you for your help.
Best,
P.S.: I don't read the mailing list, so would you be kind enough
to answer (or CC) me personnaly, please.
--
Jean-Cédric Chappelier | WWW: http://liawww.epfl.ch/~chaps
EPFL, I&C - IIF - LIA, | Tel: +41 21 693.66.83
INR (Ecublens), CH-1015 Lausanne | Fax: +41 21 693.52.25
- How to have real newline in emdeded command lines?,
Jean-Cedric Chappelier <=