# # Information about who is compiling the binary.... # This file is in the public domain, such as it is. # info_c_sum=`cksum ./info.c.sh` comp_host=`uname -n` comp_user=`id -u -n` comp_time=`date | \ awk '{if (NF == 6) \ { print $1 " " $2 " " $3 " " $6 " at " $4 " " $5 } \ else \ { print $1 " " $2 " " $3 " " $7 " at " $4 " " $5 " " $6 }}'` configure_args=`grep \^ac_cs_config ../config.status | sed 's/.*="\(.*\)"/\1/' | ./stringify configure_args` compiler_version=`$CC -v 2>&1 | ./stringify compiler_version` final_link=`grep -- "-o epic5" Makefile | ./stringify final_link` compile_cflags=`grep \^CFLAGS ../Makefile | ./stringify compile_cflags` compile_libs=`grep \^LIBS ../Makefile | ./stringify compile_libs` #git_commit=`(git show-ref HEAD || echo "no-git no-git") | awk '{printf("%s", $1)}' | ./stringify git_commit` #git_commit=`(if test "x$(command -v git)" != "x"; then git rev-parse --short HEAD ; else echo "no-git no-git" ; fi) | awk '{printf("%s", $1)}' | ./stringify git_commit` git_commit=`(if test "x$(command -v git)" = "x" -o "x$(git rev-parse --short HEAD 2>/dev/null)" = "x" ; then echo "no-git no-git" ; else git rev-parse --short HEAD; fi) | awk '{printf("%s", $1)}' | ./stringify git_commit` # Dump the C file... cat > info.c << __E__O__F__ /* * info.c -- info about who compiled this version. * This file is auto-magically created. Changes will be nuked. */ const char *compile_user = "$comp_user"; const char *compile_host = "$comp_host"; const char *compile_time = "$comp_time"; const char *info_c_sum = "$info_c_sum"; const char *compile_info = "Compiled by $comp_user@$comp_host on $comp_time"; $configure_args $compiler_version $compile_cflags $compile_libs $final_link $git_commit __E__O__F__