1

I have a make rule for compiling .c files in my project which looks like this

# Default rules for building r90 (avr8) / r82 (avr32) object files, from .c files.
%.$(OBJ_EXTENSION) : %.c
    @echo Compiling $(@:.$(OBJ_EXTENSION)=.c) to $@ due to change in $?
    ...

Now at the end of this I want a newline to nicely separate the output from the compilation of each file.

I have seen How can you echo a newline in batch files? and similar threads and they all seem to suggest echo.

But on my machine echo. results in

process_begin: CreateProcess(NULL, echo., ...) failed.

What am I not getting?

Community
  • 1
  • 1
jokki
  • 251
  • 5
  • 13
  • So the first `@echo` works, but the second doesn't? I don't know ms-dos, but you could try `@echo " "`. – Beta Nov 04 '11 at 12:47
  • Yes, there is nothing wrong with 'echo', it's just that it does not like 'echo.'. 'echo " "' writes '" "' – jokki Nov 04 '11 at 13:48

1 Answers1

1

It seems that echo is not use the cmd.exe (windows command interpreter). Try running this from your make script instead:

%systemroot%\system32\cmd.exe /C "echo."

This runs the echo. command, then terminates the nested interpreter process.

agent-j
  • 27,335
  • 5
  • 52
  • 79
  • I am no longer working on that project and system so I have not been able to try you suggestion. I'll set this thread to "answered" anyway to close it for now. Thank you for your input. – jokki Aug 13 '12 at 14:57