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 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60
|
#!/bin/sh
# Run this script after changing or adding .pup files.
# WARNING: this script requires a fair amount of tools - it is intended to
# run on developers' machines, not on users'
. ../config.sh
export LANG=C
PUPLUG=$librnd_libdir/puplug
SCCONF=../scconfig
# generate scconfig's 3 state plugin list
$PUPLUG findpups . '%$class$|%N|%3|%A|%$short$\n' | sed '
s/^lib/1|lib/
s/^feature/2|feature/
s/^import/3|import/
s/^export/4|export/
s/^io/5|io/
s/^hid/6|hid/
s/^gui/6|gui/
' | sort | awk -F "[|]" '
BEGIN {
HDR["lib"] = "Library plugins"
HDR["feature"] = "Feature plugins"
HDR["import"] = "Import plugins"
HDR["export"] = "Export plugins"
HDR["io"] = "IO plugins (file formats)"
HDR["gui"] = "GUI"
print "/******************************************************************************"
print " Auto-generated by plugins/map_plugins.sh - do NOT edit,"
print " run make map_plugins in sch-rnd/ - to change any of the data below,"
print " edit plugins/PLUGIN/PLUGIN.pup"
print "******************************************************************************/"
}
function q(s) { return "\"" s "\"," }
($2 != last) {
print "\nplugin_header(\"\\n" HDR[$2] ":\\n\")"
last = $2
}
{
if ($4 == "")
print "Error: invalid default in plugin: " $3 > "/dev/stderr"
printf("plugin_def(%-20s%-35s%-10s%s)\n", q($3), q($6), $4 "," , $5)
}
END { print "\n" }
' > $SCCONF/plugins.h
$PUPLUG findpups . "" 'plugin_dep("%N", "%m")\n' | sort >> $SCCONF/plugins.h
# Generate the plugin list
echo "# List of all plugins - generated by make map_plugins - do NOT edit" > plugins_ALL.tmpasm
$PUPLUG findpups . "include {../src_plugins/%D/Plug.tmpasm}\n" | sort >> plugins_ALL.tmpasm
|