File: build-info

package info (click to toggle)
librep 0.92.5-3
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, sid, stretch
  • size: 4,116 kB
  • ctags: 2,915
  • sloc: ansic: 31,305; lisp: 11,265; sh: 10,704; makefile: 462; sed: 93
file content (44 lines) | stat: -rwxr-xr-x 917 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#!/bin/sh
# build-info -- Generate header file containing build details
# $Id$

rep_version="$1"
repdir="$2"
replispdir="$3"
repexecdir="$4"
repdocfile="$5"
repcommonexecdir="$6"

[ -n "$HOSTNAME" ] \
    || HOSTNAME=`hostname` \
    || HOSTNAME=unknown

sys_name="$HOSTNAME"
user_name="$LOGNAME"

build_date="`date +'%a %b %e %Y'`"
build_time="`date +'%T %Z'`"

cat <<EOF
/* build.h -- Definitions relating to the current build
   Automatically generated by build-info; DO NOT EDIT! */

#ifndef BUILD_H
#define BUILD_H

#define REP_VERSION "$rep_version"

#define REP_DIRECTORY "$repdir"
#define REP_LISP_DIRECTORY "$replispdir"
#define REP_EXEC_DIRECTORY "$repexecdir"
#define REP_COMMON_EXEC_DIRECTORY "$repcommonexecdir"
#define REP_DOC_FILE "$repdocfile"

#define BUILD_HOST "$sys_name"
#define BUILD_USER "$user_name"

#define BUILD_DATE "$build_date"
#define BUILD_TIME "$build_time"

#endif /* BUILD_H */
EOF