[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Getting list of source files from directory hierarchy
From: |
Michael Morrell |
Subject: |
Getting list of source files from directory hierarchy |
Date: |
Fri, 25 Sep 2009 18:42:33 -0700 (PDT) |
I have some Makefiles that want to get a list of all source files in
a directory hierarchy and currently use:
SRCS := $(shell find . -name '*.c')
OBJS := $(SRCS:.c=.o)
The problem with this is that the output from find isn't deterministic,
which means the objects files can get linked into the final executable in
an arbitrary order and I want the result to be identical from run to run
from the same source.
My current fix for this is:
SRCS := $(shell find . -name '*.c' | sort)
but I was wondering if anyone could suggest a better method.
Thanks,
Michael
- Getting list of source files from directory hierarchy,
Michael Morrell <=
- Re: Getting list of source files from directory hierarchy, Paul Smith, 2009/09/26
- Re: Getting list of source files from directory hierarchy, Michael Morrell, 2009/09/28
- Re: Getting list of source files from directory hierarchy, Paul Smith, 2009/09/28
- Re: Getting list of source files from directory hierarchy, John Calcote, 2009/09/28
- Re: Getting list of source files from directory hierarchy, Harvey Chapman, 2009/09/29
- Re: Getting list of source files from directory hierarchy, Paul Smith, 2009/09/29
- Re: Getting list of source files from directory hierarchy, Patrick Horgan, 2009/09/29