[libdvbpsi-devel] Makefile.am: Add new target 'generate-header_dr' to easily update the header src/descriptors/dr.h

Jean-Paul Saman git at videolan.org
Tue Feb 4 11:22:01 CET 2014


libdvbpsi | branch: master | Jean-Paul Saman <jean-paul.saman at m2x.nl> | Mon Feb  3 14:16:48 2014 +0100| [21f6ff868f2d5fea3c6ec414d6784e64fcbf552b] | committer: Jean-Paul Saman

Makefile.am: Add new target 'generate-header_dr' to easily update the header src/descriptors/dr.h

> http://git.videolan.org/gitweb.cgi/libdvbpsi.git/?a=commit;h=21f6ff868f2d5fea3c6ec414d6784e64fcbf552b
---

 Makefile.am      |    3 +++
 misc/gen_dr_h.sh |   61 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 64 insertions(+)

diff --git a/Makefile.am b/Makefile.am
index 922713b..7b1d892 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -31,3 +31,6 @@ dist-checksum: $(DIST_TARGETS)
 	  md5sum $$sum > $$sum.md5 && \
 	  sha256sum $$sum > $$sum.sha256; \
 	done
+
+generate-header_dr:
+	misc/gen_dr_h.sh > src/descriptors/dr.h
diff --git a/misc/gen_dr_h.sh b/misc/gen_dr_h.sh
new file mode 100755
index 0000000..cdab6b5
--- /dev/null
+++ b/misc/gen_dr_h.sh
@@ -0,0 +1,61 @@
+#!/bin/bash
+#
+# Use as: $0 > src/descriptors/dr.h
+#
+dr_h="src/descriptors/dr.h"
+dr=`ls src/descriptors/*.h`
+
+# check directory
+if ! test -d `dirname $dr_h`; then
+	echo "Directory `dirname $dr_h` does not exist!!."
+	echo "Are you sure to be in the libdvbpsi top directory?"
+	exit 1;
+fi
+
+echo "/*****************************************************************************"
+echo " * dr.h"
+echo " * Copyright (C) 2001-2010 VideoLAN"
+echo " *"
+echo " * Authors: Arnaud de Bossoreille de Ribou <bozo at via.ecp.fr>"
+echo " *"
+echo " * This library is free software; you can redistribute it and/or"
+echo " * modify it under the terms of the GNU Lesser General Public"
+echo " * License as published by the Free Software Foundation; either"
+echo " * version 2.1 of the License, or (at your option) any later version."
+echo " *"
+echo " * This library is distributed in the hope that it will be useful,"
+echo " * but WITHOUT ANY WARRANTY; without even the implied warranty of"
+echo " * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU"
+echo " * Lesser General Public License for more details."
+echo " *"
+echo " * You should have received a copy of the GNU Lesser General Public"
+echo " * License along with this library; if not, write to the Free Software"
+echo " * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA"
+echo " *"
+echo " *****************************************************************************/"
+echo ""
+echo "/*!"
+echo " * \file <dr.h>"
+echo " * \author Arnaud de Bossoreille de Ribou <bozo at via.ecp.fr>"
+echo " * \brief Gather all dr_*.h into one."
+echo " *"
+echo " * Gathers all dr_*.h into one. Use this header if you need a lot of them."
+echo " */"
+echo ""
+echo "#ifndef _DVBPSI_DR_H_"
+echo "#define _DVBPSI_DR_H_"
+echo ""
+
+for h in $dr; do
+	f=`basename $h`
+	if ! test "$f" = "dr.h"; then
+   		echo "#include \"$f\""
+	fi
+done
+
+echo ""
+echo "#else"
+echo "#error \"Multiple inclusions of dr.h\""
+echo "#endif"
+
+exit 0



More information about the libdvbpsi-devel mailing list