Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
libdvbpsi
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
libdvbpsi
Commits
24f030af
Commit
24f030af
authored
Oct 08, 2015
by
Daniel Kamil Kozar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update gen_dr_h.sh to use the new header file tree
parent
9b4e6e28
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
54 additions
and
49 deletions
+54
-49
misc/gen_dr_h.sh
misc/gen_dr_h.sh
+54
-49
No files found.
misc/gen_dr_h.sh
View file @
24f030af
#!/
bin/
bash
#!/
usr/bin/env
bash
#
#
# Use as: $0 > src/descriptors/dr.h
# Use as: $0 > src/descriptors/dr.h
#
#
dr_h
=
"src/descriptors/dr.h"
readonly
DR_H
=
"src/descriptors/dr.h"
dr
=
`
ls
src/descriptors/
*
.h
`
readonly
DR_H_DIR
=
${
DR_H
%/*
}
# Bash's internal dirname equivalent
# check directory
# check directory
if
!
test
-d
`
dirname
$dr_h
`
;
then
if
[[
!
-d
$DR_H_DIR
]]
;
then
echo
"Directory
`
dirname
$dr_h
`
does not exist!!."
echo
>
&2
"Directory
$DR_H_DIR
does not exist!!."
echo
"Are you sure to be in the libdvbpsi top directory?
"
echo
>
&2
"Please run this script in the libdvbpsi top directory.
"
exit
1
;
exit
1
;
fi
fi
echo
"/*****************************************************************************"
cat
<<
EOF
echo
" * dr.h"
/*****************************************************************************
echo
" * Copyright (C) 2001-2010 VideoLAN"
* dr.h
echo
" *"
* Copyright (C) 2001-2010 VideoLAN
echo
" * Authors: Arnaud de Bossoreille de Ribou <bozo@via.ecp.fr>"
*
echo
" *"
* Authors: Arnaud de Bossoreille de Ribou <bozo@via.ecp.fr>
echo
" * This library is free software; you can redistribute it and/or"
*
echo
" * modify it under the terms of the GNU Lesser General Public"
* This library is free software; you can redistribute it and/or
echo
" * License as published by the Free Software Foundation; either"
* modify it under the terms of the GNU Lesser General Public
echo
" * version 2.1 of the License, or (at your option) any later version."
* License as published by the Free Software Foundation; either
echo
" *"
* version 2.1 of the License, or (at your option) any later version.
echo
" * This library is distributed in the hope that it will be useful,"
*
echo
" * but WITHOUT ANY WARRANTY; without even the implied warranty of"
* This library is distributed in the hope that it will be useful,
echo
" * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU"
* but WITHOUT ANY WARRANTY; without even the implied warranty of
echo
" * Lesser General Public License for more details."
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
echo
" *"
* Lesser General Public License for more details.
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"
* You should have received a copy of the GNU Lesser General Public
echo
" * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA"
* 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
" *
\f
ile <dr.h>"
/*!
echo
" *
\a
uthor Arnaud de Bossoreille de Ribou <bozo@via.ecp.fr>"
*
\f
ile <dr.h>
echo
" *
\b
rief Gather all dr_*.h into one."
*
\a
uthor Arnaud de Bossoreille de Ribou <bozo@via.ecp.fr>
echo
" *"
*
\b
rief Gather all dr_*.h into one.
echo
" * Gathers all dr_*.h into one. Use this header if you need a lot of them."
*
echo
" */"
* Gathers all dr_*.h into one. Use this header if you need a lot of them.
echo
""
*/
echo
"#ifndef _DVBPSI_DR_H_"
echo
"#define _DVBPSI_DR_H_"
#ifndef _DVBPSI_DR_H_
echo
""
#define _DVBPSI_DR_H_
EOF
for
h
in
$dr
;
do
f
=
`
basename
$h
`
cd
$DR_H_DIR
if
!
test
"
$f
"
=
"dr.h"
;
then
for
dir
in
atsc dvb mpeg custom
;
do
echo
"#include
\"
$f
\"
"
cd
$dir
||
{
echo
>
&2
"
$dir
not found - tree incomplete"
&&
exit
1
;
}
fi
for
h
in
*
.h
;
do
echo
"#include
\"
$dir
/
$h
\"
"
done
cd
..
done
done
echo
""
cat
<<
EOF
echo
"#else"
echo
"#error
\"
Multiple inclusions of dr.h
\"
"
#else
echo
"#endif"
#error "Multiple inclusions of dr.h"
#endif
EOF
exit
0
exit
0
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment