blob: 689a482a79c395c221bbd8a2d7d242285d5e5d94 [file] [log] [blame]
Elliott Hughesa3cc9bc2019-08-15 16:10:41 -07001#!/bin/bash
2
3set -e
4
Elliott Hughes00969f62019-08-22 10:54:26 -07005rm -rf .config generated/ android/
Elliott Hughesa3cc9bc2019-08-15 16:10:41 -07006
Elliott Hughes077af142019-08-21 08:39:15 -07007function generate() {
8 which=$1
9 echo -e "\n-------- $1\n"
Elliott Hughesa3cc9bc2019-08-15 16:10:41 -070010
Elliott Hughes077af142019-08-21 08:39:15 -070011 # These are the only generated files we actually need.
12 files="config.h flags.h globals.h help.h newtoys.h tags.h"
Elliott Hughesa3cc9bc2019-08-15 16:10:41 -070013
Elliott Hughes077af142019-08-21 08:39:15 -070014 cp .config-$which .config
15 NOBUILD=1 scripts/make.sh
16 out=android/$which/generated/
17 mkdir -p $out
18 for f in $files; do cp generated/$f $out/$f ; done
19 rm -rf .config generated/
20}
21
Elliott Hughes077af142019-08-21 08:39:15 -070022generate "device"
Elliott Hughes00969f62019-08-22 10:54:26 -070023generate "linux"
24generate "mac"