aboutsummaryrefslogtreecommitdiff
path: root/applets/busybox.mkscripts
diff options
context:
space:
mode:
Diffstat (limited to 'applets/busybox.mkscripts')
-rwxr-xr-xapplets/busybox.mkscripts16
1 files changed, 16 insertions, 0 deletions
diff --git a/applets/busybox.mkscripts b/applets/busybox.mkscripts
new file mode 100755
index 000000000..935685cba
--- /dev/null
+++ b/applets/busybox.mkscripts
@@ -0,0 +1,16 @@
+#!/bin/sh
+# Make busybox scripted applet list file.
+
+# input $1: full path to Config.h
+# input $2: full path to applets.h
+# output (stdout): list of pathnames that should be linked to busybox
+
+export LC_ALL=POSIX
+export LC_CTYPE=POSIX
+
+CONFIG_H=${1:-include/autoconf.h}
+APPLETS_H=${2:-include/applets.h}
+$HOSTCC -E -DMAKE_SCRIPTS -include $CONFIG_H $APPLETS_H |
+ awk '/^[ \t]*SCRIPT/{
+ print $2
+ }'