We help IT Professionals succeed at work.

How do I update source files from within a Makefile?

mlcarey1959
mlcarey1959 used Ask the Experts™
on
I need to append and end of line character to some source files before they are compiled.

for f in *.c *.h ; do echo -e "" >> $$f; done
all:
gcc one.c two.c three.c -o numbers
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
I think you're asking for the makefile built-in shell command.  This will run the command and return the output:

$(shell command)