Mail Archives: djgpp/2000/03/09/03:58:32
Jeff Williams <jeffw AT darwin DOT sfbr DOT org> wrote:
> How would I modify the following line for use inside a makefile (the ^M
> character is causing problems; I can't seem to escape it or quote it or
> otherwise get it to survive inside the makefile). If possible, I like
> to do this without the --file option of grep.
> grep --quiet --binary ^M foo.bar && dtou foo.bar
First, you'll have to put the Makefile in 'unix mode', i.e. put the
hallmark line
SHELL=/bin/sh
in it. This will cause DJGPP make to use DJGPP bash as the shell for
command execution, instead of command.com.
Then something like
grep --quied --binary `echo -e "\r"` foo.bar && dtou foo.bar
would do. OTOH, I honestly can't see the use for such a command. dtou
works on Unix text files, too, leaving them unchanged. I.e. the check
is not strictly necessary, IMHO.
--
Hans-Bernhard Broeker (broeker AT physik DOT rwth-aachen DOT de)
Even if all the snow were burnt, ashes would remain.
- Raw text -