annotate scripts/config-headers.sh @ 6:c01d2500a998

beginning of build system: crafting config headers into place
author Mychaela Falconia <falcon@freecalypso.org>
date Mon, 26 Sep 2016 02:09:35 +0000
parents
children 86e83045be37
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
6
c01d2500a998 beginning of build system: crafting config headers into place
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1 #!/bin/sh
c01d2500a998 beginning of build system: crafting config headers into place
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2
c01d2500a998 beginning of build system: crafting config headers into place
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
3 if [ $# != 1 ]
c01d2500a998 beginning of build system: crafting config headers into place
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
4 then
c01d2500a998 beginning of build system: crafting config headers into place
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
5 echo "usage: $0 config-flavor" 1>&2
c01d2500a998 beginning of build system: crafting config headers into place
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
6 exit 1
c01d2500a998 beginning of build system: crafting config headers into place
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
7 fi
c01d2500a998 beginning of build system: crafting config headers into place
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
8
c01d2500a998 beginning of build system: crafting config headers into place
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
9 if [ -z "$TARGET" ]
c01d2500a998 beginning of build system: crafting config headers into place
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
10 then
c01d2500a998 beginning of build system: crafting config headers into place
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
11 echo "Error: TARGET= must be passed via environment" 1>&2
c01d2500a998 beginning of build system: crafting config headers into place
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
12 exit 1
c01d2500a998 beginning of build system: crafting config headers into place
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
13 fi
c01d2500a998 beginning of build system: crafting config headers into place
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
14
c01d2500a998 beginning of build system: crafting config headers into place
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
15 if [ -z "$BUILD_DIR" ]
c01d2500a998 beginning of build system: crafting config headers into place
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
16 then
c01d2500a998 beginning of build system: crafting config headers into place
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
17 echo "Error: BUILD_DIR= must be passed via environment" 1>&2
c01d2500a998 beginning of build system: crafting config headers into place
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
18 exit 1
c01d2500a998 beginning of build system: crafting config headers into place
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
19 fi
c01d2500a998 beginning of build system: crafting config headers into place
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
20
c01d2500a998 beginning of build system: crafting config headers into place
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
21 set -e
c01d2500a998 beginning of build system: crafting config headers into place
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
22
c01d2500a998 beginning of build system: crafting config headers into place
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
23 cp -r cfg-headers/$1 $BUILD_DIR/config
c01d2500a998 beginning of build system: crafting config headers into place
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
24 cp targets/$TARGET.h $BUILD_DIR/config/fc-target.cfg