- 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 including build date.
In coregl, bash command 'date' is used in CMakeList.txt.
In this case, everytime we build coregl, the build result is always different.
- Solution
Use commit date instead of build date.
There was a hint in Makefile.
COMPILE_DATE = "\"`git log -1 --pretty=format:%ci`\""
I used this command in CMakeList.txt
I tested this in my test OBS server, and the build result is unchanged
when this patch is applied.
Change-Id: Iea70e74b6808aa81905eba4afc9e72b6867c097d
Signed-off-by: Junghyun Kim <jh0822.kim@samsung.com>
ADD_DEFINITIONS("-DPREFIX=\"${PREFIX}\"")
-EXEC_PROGRAM(date OUTPUT_VARIABLE COMPILE_DATE)
+EXEC_PROGRAM(git
+ ARGS log -1 --pretty=format:%ci
+ OUTPUT_VARIABLE COMPILE_DATE)
ADD_DEFINITIONS("-D_COREGL_COMPILE_DATE=\"${COMPILE_DATE}\"")
IF(USE_ADRENO)