2 ######################################################################
4 ######################################################################
5 # This scripts scans devs.mak and contrib.mak provided with
6 # Ghostsctipt and prints list of devices which aren't present in
8 # Expects parameters: name (without path!) of makefile to scan and
9 # additional list of drivers that won't be built.
12 # Michal Kochanowicz <mkochano@pld.org.pl>
13 # Sebastian Zagrodzki <zagrodzki@pld.org.pl>
14 ######################################################################
16 # MAKENAME is a name of makefile to scan
20 # BLACKLIST contains list of drivers which should *not* be activated.
22 BLACKLIST="$BLACKLIST ali atiw cirr tseng tvga" # MSDOS - direct hw access.
23 BLACKLIST="$BLACKLIST vesa s3vga"
24 BLACKLIST="$BLACKLIST herc ega vga svga16 pe"
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.
30 BLACKLIST="$BLACKLIST omni" # omni - no source in 7.00
31 # BLACKLIST="$BLACKLIST cdj880" # There is no driver in *.c?!
33 MAKEFILE="src/unix-gcc.mak"
36 DEVNAME=`echo $1 | sed -e 's/$(DD)//'`
37 for X in $BLACKLIST; do
38 if [ "$X.dev" = "$DEVNAME" ]; then return 1; fi
44 awk 'BEGIN { FS="[: ]+" } /^\$\(DD\).*:/ { print $1 }' \
47 is_on_blacklist $DEV || continue
48 # grep -q $DEV $MAKEFILE, but who needs grep?! ;)
49 awk -v DEV="$DEV" '/^DEVICE_DEVS/ { if(index($0, DEV) > 0) exit 1 }' < $MAKEFILE && echo -n "$DEV "
53 scan_file "src/$MAKENAME"