File: mkconfig

package info (click to toggle)
picosat 632-1
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 168 kB
  • ctags: 458
  • sloc: ansic: 4,701; sh: 112; makefile: 66
file content (19 lines) | stat: -rwxr-xr-x 269 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#!/bin/sh

die () {
   echo "*** mkconfig: $*" 1>&2
   exit 1
}

[ -f makefile ] || die "can not find 'makefile'"

sed \
  -e '/^C[A-Z]*=/!d' \
  -e 's,^,#define PICOSAT_,' \
  -e 's,=, ",' \
  -e 's,$,",' \
  makefile

echo "#define PICOSAT_OS \"`uname -a`\""

exit 0