Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/external/bsd/drm2 Move cleantags and rcsid decorations t...
details: https://anonhg.NetBSD.org/src/rev/1802aa1e72ac
branches: trunk
changeset: 365672:1802aa1e72ac
user: riastradh <riastradh%NetBSD.org@localhost>
date: Mon Aug 27 00:46:21 2018 +0000
description:
Move cleantags and rcsid decorations to prepare-import.sh.
Also decorate .h files.
diffstat:
sys/external/bsd/drm2/nouveau/nouveau2netbsd | 31 +------------------
sys/external/bsd/drm2/prepare-import.sh | 46 ++++++++++++++++++++++++++++
2 files changed, 47 insertions(+), 30 deletions(-)
diffs (97 lines):
diff -r c544b0e1998d -r 1802aa1e72ac sys/external/bsd/drm2/nouveau/nouveau2netbsd
--- a/sys/external/bsd/drm2/nouveau/nouveau2netbsd Mon Aug 27 00:46:10 2018 +0000
+++ b/sys/external/bsd/drm2/nouveau/nouveau2netbsd Mon Aug 27 00:46:21 2018 +0000
@@ -1,6 +1,6 @@
#!/bin/sh
-# $NetBSD: nouveau2netbsd,v 1.4 2018/08/27 00:46:10 riastradh Exp $
+# $NetBSD: nouveau2netbsd,v 1.5 2018/08/27 00:46:21 riastradh Exp $
#
# $ /path/to/nouveau2netbsd > /path/to/files.nouveau.new
#
@@ -82,35 +82,6 @@
if [ "x$from" != "x$to" ]; then
${MV} -f -- "$from" "$to"
fi
- # Probably not necessary -- Linux tends not to have RCS ids --
- # but a precaution out of paranoia.
- cleantags "$to"
- case $to in
- *.c)
- # Heuristically apply NetBSD RCS ids: a comment at the
- # top of the file, and a __KERNEL_RCSID before the
- # first cpp line, which, with any luck, should be the
- # first non-comment line and lie between the copyright
- # notice and the header.
- awk '
- BEGIN {
- done = 0
- printf("/*\t%c%s%c\t*/\n\n", "$","NetBSD","$")
- }
- /^#/ && !done {
- printf("#include <sys/cdefs.h>\n")
- printf("__KERNEL_RCSID(0, \"%c%s%c\");\n",
- "$","NetBSD","$")
- printf("\n")
- done = 1
- }
- {
- print
- }
- ' < "$to" > "$to".tmp
- ;;
- esac
- mv -f -- "$to".tmp "$to"
printf 'file\t%s\t%s\n' "$nouveau_top/$to" "$nouveau_flag"
done < "$filemap" | sort
diff -r c544b0e1998d -r 1802aa1e72ac sys/external/bsd/drm2/prepare-import.sh
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/sys/external/bsd/drm2/prepare-import.sh Mon Aug 27 00:46:21 2018 +0000
@@ -0,0 +1,46 @@
+#!/bin/sh
+
+# $NetBSD: prepare-import.sh,v 1.1 2018/08/27 00:46:21 riastradh Exp $
+#
+# $ /path/to/prepare-import.sh
+#
+# Run from the directory that will be imported as
+# sys/external/bsd/drm2/dist. Be sure to also run drm/drm2netbsd and
+# nouveau/nouveau2netbsd in their respective directories.
+
+set -Ceu
+
+find . -name '*.h' \
+| while read f; do
+ cleantags "$f"
+ (printf '/*\t$NetBSD: prepare-import.sh,v 1.1 2018/08/27 00:46:21 riastradh Exp $\t*/\n\n' && cat -- "$f") > "$f".tmp
+ mv -f -- "$f".tmp "$f"
+done
+
+find . -name '*.c' \
+| while read f; do
+ # Probably not necessary -- Linux tends not to have RCS ids --
+ # but a precaution out of paranoia.
+ cleantags "$f"
+ # Heuristically apply NetBSD RCS ids: a comment at the top of
+ # the file, and a __KERNEL_RCSID before the first cpp line,
+ # which, with any luck, should be the first non-comment line
+ # and lie between the copyright notice and the header.
+ awk '
+ BEGIN {
+ done = 0
+ printf("/*\t%c%s%c\t*/\n\n", "$","NetBSD","$")
+ }
+ /^#/ && !done {
+ printf("#include <sys/cdefs.h>\n")
+ printf("__KERNEL_RCSID(0, \"%c%s%c\");\n",
+ "$","NetBSD","$")
+ printf("\n")
+ done = 1
+ }
+ {
+ print
+ }
+ ' < "$f" > "$f".tmp
+ mv -f -- "$f".tmp "$f"
+done
Home |
Main Index |
Thread Index |
Old Index