I have a dep file in the following format
main.o : "C:/My code/main.c"
"C:/My code/main.c" :
main.o : "C:\Program Files\xyz\stdio.h"
"C:\Program Files\xyz\stdio.h" :
With makefile, I am using sed to remove double quotes and replace backward slash with a front slash. I am using windows and using gmake to build the make file
I am new to sed. I have figured out sed commands to remove double quotes and replace backward slash with a front slash.
sed -e "s/\\\/\//g" -e "s/\"//g" main.dep
main.o : C:/My code/main.c
C:/My code/main.c :
main.o : C:/Program Files/xyz/stdio.h
C:/Program Files/xyz/stdio.h :
Before doing that I want to replace the space with backslash space(\s) If I replace all the spaces in the file with backslash space(\s) it makes my dep file nonusable.
So before removing double quotes I want to replace the spaces in double quotes with backslash space(\s).
Expected output
main.o : C:/My\ code/main.c
C:/My\ code/main.c :
main.o : C:/Program\ Files/xyz/stdio.h
C:/Program\ Files/xyz/stdio.h :
Can we do it with sed and in makefile?
Thanks in advance