kore

An easy to use, scalable and secure web application framework for writing web APIs in C.
Commits | Files | Refs | README | LICENSE | git clone https://git.kore.io/kore.git

commit bbc98cf2a77dcbdf3cec761ddb4b7887c4bef11c
parent 1c8cfff1a9e67affbe33d5ca0b7f656a65198705
Author: Joris Vink <joris@coders.se>
Date:   Sat,  6 Jul 2013 18:07:06 +0200

Add MODULE_BUILD_DATE to static.h when building.
Contains %Y-%m-%d %H-%M-%S timestamp of when the module was built.

Diffstat:
modules/example/build.sh | 5+++++
1 file changed, 5 insertions(+), 0 deletions(-)

diff --git a/modules/example/build.sh b/modules/example/build.sh @@ -25,6 +25,7 @@ CFLAGS="-I. -I${KORE_DIR}/includes -Wall -Wstrict-prototypes \ -Wmissing-prototypes -Wmissing-declarations -Wshadow \ -Wpointer-arith -Wcast-qual -Wsign-compare -g" LDFLAGS=-shared +MODULE_BUILD_DATE=`date +"%Y-%m-%d %H:%M:%S"` # Functions used in the build process. function create_and_empty_dir { @@ -44,6 +45,8 @@ ${CC} ${CFLAGS} tools/inject.c -o tools/inject create_and_empty_dir ${SOURCE_DIR}/${MEDIA_DIR} create_and_empty_dir .objs +rm -f static.h + for file in `find ${MEDIA_DIR} -type f \( ! -name \*.swp \)`; do echo "Injecting $file"; base=`basename $file`; @@ -54,6 +57,8 @@ for file in `find ${MEDIA_DIR} -type f \( ! -name \*.swp \)`; do fi done +echo "#define MODULE_BUILD_DATE \"${MODULE_BUILD_DATE}\"" >> static.h + for src in `find ${SOURCE_DIR} -type f -name \*.c`; do base=`basename $src`; ${CC} ${CFLAGS} -fPIC -c $src -o .objs/${base}.o