From: Hans-Bernhard Broeker Newsgroups: comp.os.msdos.djgpp Subject: Re: using control characters inside makefiles Date: 9 Mar 2000 08:10:23 GMT Organization: Aachen University of Technology (RWTH) Lines: 26 Message-ID: <8a7m9f$4lm$1@nets3.rz.RWTH-Aachen.DE> References: <200003081618 DOT KAA29074 AT darwin DOT sfbr DOT org> NNTP-Posting-Host: acp3bf.physik.rwth-aachen.de X-Trace: nets3.rz.RWTH-Aachen.DE 952589423 4790 137.226.32.75 (9 Mar 2000 08:10:23 GMT) X-Complaints-To: abuse AT rwth-aachen DOT de NNTP-Posting-Date: 9 Mar 2000 08:10:23 GMT User-Agent: tin/1.4-19991113 ("No Labels") (UNIX) (Linux/2.0.0 (i586)) Originator: broeker@ To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com Jeff Williams 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.