1 #!/bin/sh 2 3 # $NetBSD: radeon2netbsd,v 1.1 2018/08/27 05:36:15 riastradh Exp $ 4 # 5 # $ /path/to/radeon2netbsd > /path/to/files.radeon.new 6 # 7 # Run from the top-level Radeon source directory. 8 9 set -Ceu 10 11 # Location of the Radeon sources relative to $NETBSDSRCDIR. 12 radeon_top=external/bsd/drm2/dist/drm/radeon 13 14 # config(5) flag for the Radeon driver. 15 radeon_flag=radeon 16 17 env CONFIG_ACPI=y \ 18 env src=. \ 19 make -f Makefile -V '$(radeon-y)' \ 20 | tr ' ' '\n' \ 21 | grep -v '^$' \ 22 | sed -e 's,\.o$,.c,' \ 23 | sort -u \ 24 | while read f; do 25 printf 'file\t%s\t%s\n' "$radeon_top/$f" "$radeon_flag" 26 done 27