[vlc-devel] commit: Simplify vlc_about.h generation. (JP Dinger )
git version control
git at videolan.org
Fri Jul 24 17:24:53 CEST 2009
vlc | branch: master | JP Dinger <jpd at videolan.org> | Fri Jul 24 17:24:08 2009 +0200| [82633df33d783add1001bf6a049167308f9e2995] | committer: JP Dinger
Simplify vlc_about.h generation.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=82633df33d783add1001bf6a049167308f9e2995
---
src/Makefile.am | 9 ++++++---
1 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/src/Makefile.am b/src/Makefile.am
index 21a8628..b901aa7 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -121,14 +121,17 @@ noinst_HEADERS = \
mkdir -p -- ../include
echo "/* Automatically generated file - DO NOT EDIT */" > "$@.tmp"
echo "static const char psz_license[] =" >> "$@.tmp"
- cat $(top_srcdir)/COPYING | sed s/'"'/'\\"'/g | $(AWK) '{ print "\""$$0"\\n\"" }' >> "$@.tmp"
+ sed 's/"/\\"/g;s/^.*$$/\"&\\n\"/' "$(top_srcdir)/COPYING" >> "$@.tmp"
echo ";" >> "$@.tmp"
echo "static const char psz_thanks[] =" >> "$@.tmp"
- grep -v '$$Id:' $(top_srcdir)/THANKS | sed s/'"'/'\\"'/g | $(AWK) '{ print "\""$$0"\\n\"" }'|sed s/"<.*.> "// >> "$@.tmp"
+ sed '/\$$Id:/d;s/"/\\"/g;s/<.*.> //;s/^.*$$/\"&\\n\"/' \
+ "$(top_srcdir)/THANKS" >> "$@.tmp"
echo ";" >> "$@.tmp"
echo "static const char psz_authors[] =" >> "$@.tmp"
- grep N: $(top_srcdir)/AUTHORS | cut -d" " -f 2- | sed s/'"'/'\\"'/g | $(AWK) '{ print "\""$$0"\\n\"" }' >> "$@.tmp"
+ sed -n '/^N: /{;s///;s/"/\\"/g;s/^.*$$/\"&\\n\"/;p;}' \
+ "$(top_srcdir)/AUTHORS" >> "$@.tmp"
echo ";" >> "$@.tmp"
+
mv -f -- "$@.tmp" "$@"
###############################################################################
More information about the vlc-devel
mailing list