Use a sorted list of files in Makefile to avoid unnecessary rebuilds.
- PROBLEM
We use OBS to build packages in Tizen.
There is a mechanism not to rebuild when the result binary is the same.
For example, there is a dependency graph: A->B->C.
If A is modified, B would be built.
If the result RPM of B is not changed, OBS does not trigger a build of C.
To effectively use this mechanism, each packages make sure that
the result binary should be the same if the input source is the same.
There is a reason we found is that the file list given by
python(os.walk(), os.listdir()), widely used executable(find),
and system call(readdir()) is unordered.
In this case, different OBS workers can make different results
because of the file list in different order.
The same thing happens in vconf-internal-keys.
This package uses find in Makefile.
"find" returns an unordered list of files.
- SOLUTION
I suggest to sort this list of files using sort.
I tested this in my test OBS server, and I found that
the result RPMs are the same after this patch.
Change-Id: I0d7514663a601470edc07c9e3c84302bb79c33af
Signed-off-by: Junghyun Kim <jh0822.kim@samsung.com>