blob: 003cd031b6c9f3573ebe2240dda15b9a7d6d8e62 (
plain) (
blame)
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
|
#!/bin/sh
#
# Run this script every time the set of supported devices changes.
#
LIB=".";
OUTPUT="$LIB/processors.ac";
# Update configure script.
echo "### Generating configure script for AM_CONDITIONALs ...";
rm -f "$OUTPUT";
for i in "$LIB/libdev/pic1"*.c; do
p="${i##*/pic}";
p="${p%.c}";
P=$(echo "$p" | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ);
cat >> "$OUTPUT" <<EOT
AM_CONDITIONAL([ENABLE_${P}], [ grep -i "^${P}\$" pics.supported >/dev/null 2>/dev/null ])
EOT
done;
# Update libdev/Makefile.am.
echo "### Updating libdev/Makefile.am ...";
( cd "$LIB/libdev" && sh ./mkmk.sh > Makefile.am )
# Recreate configure script.
echo "### Updating build system ..."
( cd "$LIB" && autoreconf )
# Also update the free library part.
echo "### Updating dependent build system in ../../../lib/pic16 ..."
( cd "$LIB/../../../lib/pic16/libio" && sh ./mkmk.sh > Makefile.am )
( cd "$LIB/../../../lib/pic16" && autoreconf )
|