Mail Archives: djgpp/1998/08/27/20:01:35
In article <35e36725 DOT 32535918 AT news DOT pathcom DOT com>, oliver AT jesus DOT hv (Oliver
Richman) writes:
>Yes, but the problem is a problem because make *always* reports it as
>an error when there are spaces in front of a command when a tab should
>be there. It's always the same error and it is a pain to fix.
If you insist on using an editor that can't make real tabs,
you can do this instead of trying to change make.
This is an awk script that will change lines that begin with
four or more spaces to lines that begin with a real tab
character. Its first line is the she-bang ("#!").
#! $DJGPP/bin/awk
/^ /{ sub(/^ +/, "\t", $0) }
{print}
# end of script
You run it like this on the bad makefile to generate a
good one. You can confirm the presence of real tabs by
using sed to list the characters:
[W95]:sh3 makefix$ awk -f makefix.awk badmake >goodmake
[W95]:sh3 makefix$ awk -f makefix.awk badmake | sed -n l
foo: bar
\tcommand -d q p file.foo
[W95]:sh3 makefix$
--Ed (Myknees)
- Raw text -