File: make-pluginlist.sh

package info (click to toggle)
lirc 0.10.1-6
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, sid
  • size: 8,364 kB
  • sloc: ansic: 26,717; cpp: 9,066; sh: 5,521; python: 4,362; makefile: 1,034; xml: 63
file content (21 lines) | stat: -rwxr-xr-x 617 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/usr/bin/env bash
#
# Create a list of automake module setups.

echo '## Created by make-pluginlist.sh'

skipped=$(sed -n  '/_la_SOURCES/s/.*=//p' < Makefile.am | \
     tr -d '\\' | \
     while read first garbage; do echo $first; done)

for file in *.c; do
    [[ "$file" == *common.c ]] && continue
    basename=${file/.c/}
    [[ "$skipped" = *${file}* ]] && continue
    header=${file/.c/.h}
    sources="$file"
    test -e $header && sources="$file $header"
    echo "plugin_LTLIBRARIES              += ${basename}.la"
    printf "%-32s = %s\n" "${basename}_la_SOURCES " "$sources"
    echo
done | sed  '$ d'