]>
Commit | Line | Data |
---|---|---|
c1d11d96 | 1 | #!/bin/sh |
2 | ###################################################################### | |
3 | # $Revision$, $Date$ | |
4 | ###################################################################### | |
5 | # This scripts scans devs.mak and contrib.mak provided with | |
6 | # Ghostsctipt and prints list of devices which aren't present in | |
7 | # master Makefile. | |
0dd88365 SZ |
8 | # Expects parameters: name (without path!) of makefile to scan and |
9 | # additional list of drivers that won't be built. | |
10 | # | |
11 | # Authors: | |
c1d11d96 | 12 | # Michal Kochanowicz <mkochano@pld.org.pl> |
0dd88365 | 13 | # Sebastian Zagrodzki <zagrodzki@pld.org.pl> |
c1d11d96 | 14 | ###################################################################### |
15 | ||
0dd88365 SZ |
16 | # MAKENAME is a name of makefile to scan |
17 | MAKENAME="$1" | |
18 | shift | |
19 | ||
c1d11d96 | 20 | # BLACKLIST contains list of drivers which should *not* be activated. |
0dd88365 SZ |
21 | BLACKLIST="$@" |
22 | BLACKLIST="$BLACKLIST ali atiw cirr tseng tvga" # MSDOS - direct hw access. | |
23 | BLACKLIST="$BLACKLIST vesa s3vga" | |
8e5b5dda | 24 | BLACKLIST="$BLACKLIST herc ega vga svga16 pe" |
c1d11d96 | 25 | BLACKLIST="$BLACKLIST att3b1" # Console - who needs it?! |
26 | BLACKLIST="$BLACKLIST sonyfb" # Sony Frame Buffer device. | |
27 | BLACKLIST="$BLACKLIST nwp533" # Sony NWP-533. | |
28 | BLACKLIST="$BLACKLIST sunview sunhmono" # Sun-specific. | |
29 | BLACKLIST="$BLACKLIST sparc" # Sparc printer - no headers. | |
e2253853 | 30 | BLACKLIST="$BLACKLIST omni" # omni - no source in 7.00 |
fdf3e339 | 31 | # BLACKLIST="$BLACKLIST cdj880" # There is no driver in *.c?! |
c1d11d96 | 32 | |
c1d11d96 | 33 | MAKEFILE="src/unix-gcc.mak" |
34 | ||
35 | is_on_blacklist() { | |
36 | DEVNAME=`echo $1 | sed -e 's/$(DD)//'` | |
37 | for X in $BLACKLIST; do | |
38 | if [ "$X.dev" = "$DEVNAME" ]; then return 1; fi | |
39 | done | |
40 | return 0 | |
41 | } | |
42 | ||
43 | scan_file() { | |
ea6ed7ee | 44 | awk 'BEGIN { FS="[: ]+" } /^\$\(DD\).*:/ { print $1 }' \ |
c1d11d96 | 45 | < $1 \ |
46 | | while read DEV; do | |
47 | is_on_blacklist $DEV || continue | |
48 | # grep -q $DEV $MAKEFILE, but who needs grep?! ;) | |
d108019b | 49 | awk -v DEV="$DEV" '/^DEVICE_DEVS/ { if(index($0, DEV) > 0) exit 1 }' < $MAKEFILE && echo -n "$DEV " |
c1d11d96 | 50 | done |
51 | } | |
52 | ||
0dd88365 | 53 | scan_file "src/$MAKENAME" |