# -*- makefile -*- # # A trailer fragment used by CMT to build the version include file. # $(src)$(package)_version.h :: $(${CONSTITUENT}stamp) @touch $(src)$(package)_version.h @echo Build $(src)$(package)_version.h @echo '/* Version information autogenerated by version fragment */' > $(src)$(package)_version.h @echo \#ifndef $(package)_NAME >> $(src)$(package)_version.h @echo \#define $(package)_NAME \"$(package)\" >> $(src)$(package)_version.h @echo \#define $(package)_VERSION \"$(version)\" >> $(src)$(package)_version.h @if [ x != x`echo $(version)| sed s/[a-z]*\\\\\([0-9]*\\\\\).*/\\\\\1/` ]; then echo \#define $(package)_MAJOR_VERSION `echo $(version)| sed s/[a-z]*\\\\\([0-9]*\\\\\).*/\\\\\1/` >> $(src)$(package)_version.h; else echo "#define $(package)_MAJOR_VERSION 0" >> $(src)$(package)_version.h; fi @if [ x != x`echo $(version)| sed s/[a-z]*\\\\\([0-9]*\\\\\)[a-z]*\\\\\([0-9]*\\\\\).*/\\\\\2/` ]; then echo \#define $(package)_MINOR_VERSION `echo $(version)| sed s/[a-z]*\\\\\([0-9]*\\\\\)[a-z]*\\\\\([0-9]*\\\\\).*/\\\\\2/` >> $(src)$(package)_version.h; else echo "#define $(package)_MINOR_VERSION 0" >> $(src)$(package)_version.h; fi @if [ x != x`echo $(version)| sed s/[a-z]*\\\\\([0-9]*\\\\\)[a-z]*\\\\\([0-9]*\\\\\)[a-z]*\\\\\([0-9]*\\\\\).*/\\\\\3/` ]; then echo \#define $(package)_PATCH_VERSION `echo $(version)| sed s/[a-z]*\\\\\([0-9]*\\\\\)[a-z]*\\\\\([0-9]*\\\\\)[a-z]*\\\\\([0-9]*\\\\\).*/\\\\\3/` >> $(src)$(package)_version.h; else echo "#define $(package)_PATCH_VERSION 0" >> $(src)$(package)_version.h; fi @echo "#define BEFORE_$(package)(v,r,p) (($(package)_MAJOR_VERSION==(v)&&$(package)_MINOR_VERSION==(r)&&$(package)_PATCH_VERSION<(p))||($(package)_MAJOR_VERSION==(v)&&$(package)_MINOR_VERSION<(r))||($(package)_MAJOR_VERSION<(v)))" >> $(src)$(package)_version.h @echo "#define EQUALS_$(package)(v,r,p) ($(package)_MAJOR_VERSION==(v)&&$(package)_MINOR_VERSION==(r)&&$(package)_PATCH_VERSION==(p))" >> $(src)$(package)_version.h @echo \#define $(package)_COMPILE_DATE \"`date -u`\" >> $(src)$(package)_version.h @echo \#define $(package)_COMPILE_HOST \"`uname -n`\" >> $(src)$(package)_version.h @echo \#define $(package)_COMPILE_UNAME \"`uname -a`\" >> $(src)$(package)_version.h @echo \#define $(package)_COMPILE_DIR \"`pwd`\" >> $(src)$(package)_version.h @echo \#endif >> $(src)$(package)_version.h clean :: ${CONSTITUENT}clean ${CONSTITUENT}clean :: /bin/rm $(src)$(package)_version.h || true /bin/rm $(${CONSTITUENT}stamp) || true