I am involved in the process of creating a makefile.
The current goal is to scan files $(SOURCEDIR)for .cand create (in accordance with these files paths .cin format /path/file.c) a good one $(VPATH), so I do not need to use recursive make files (otherwise a pain in a ..).
Atm i'm stuck with this where $(SOURCETREE)will be empty on$(ECHO)
SOURCES := $(shell find $(SOURCEDIR) -name '*.c')
SOURCETREE := $(dir $(SOURCES))
SOURCETREE := $(shell $(ECHO) $(SOURCETREE) | $(SED) -e "s/[[:space:]]/\n/g" | uniq | $(SED) -e "s/\n/[[:space:]]/g");
Maybe I just don’t understand (later late: /)
Thanks for any help.
Note. In the bash shell, it works fine on my Linux desktop (I replaced the variables accordingly) Note: I'm not a professional, so please explain if you are doing voodoo with sed, thanks
source
share