summaryrefslogtreecommitdiffstats
path: root/scripts/make_device_config.sh
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/make_device_config.sh')
-rw-r--r--scripts/make_device_config.sh18
1 files changed, 10 insertions, 8 deletions
diff --git a/scripts/make_device_config.sh b/scripts/make_device_config.sh
index 7958086..c1afb3f 100644
--- a/scripts/make_device_config.sh
+++ b/scripts/make_device_config.sh
@@ -1,10 +1,12 @@
#! /bin/sh
-# Construct a target device config file from a default, pulling in any
-# files from include directives.
+# Writes a target device config file to stdout, from a default and from
+# include directives therein. Also emits Makefile dependencies.
+#
+# Usage: make_device_config.sh SRC DEPFILE-NAME DEPFILE-TARGET > DEST
-dest=$1
-dep=`dirname $1`-`basename $1`.d
-src=$2
+src=$1
+dep=$2
+target=$3
src_dir=`dirname $src`
all_includes=
@@ -22,7 +24,7 @@ while [ -n "$f" ] ; do
[ $? = 0 ] || exit 1
all_includes="$all_includes $f"
done
-process_includes $src > $dest
+process_includes $src
-cat $src $all_includes | grep -v '^include' > $dest
-echo "$1: $all_includes" > $dep
+cat $src $all_includes | grep -v '^include'
+echo "$target: $all_includes" > $dep
OpenPOWER on IntegriCloud