Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
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
vlc
Commits
42b03d10
Commit
42b03d10
authored
Jan 24, 2008
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add sanity check for public headers
parent
b6bfe74a
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
61 additions
and
2 deletions
+61
-2
src/Makefile.am
src/Makefile.am
+23
-2
src/test/headers.c
src/test/headers.c
+38
-0
No files found.
src/Makefile.am
View file @
42b03d10
...
...
@@ -371,8 +371,15 @@ misc/revision.c:
###############################################################################
# Unit/regression test
###############################################################################
check_PROGRAMS
=
test_i18n_atof test_url test_utf8 test_control
dist_check_SCRIPTS
=
check_symbols
check_PROGRAMS
=
\
test_i18n_atof
\
test_url
\
test_utf8
\
test_headers
\
test_control
\
$(NULL)
dist_check_SCRIPTS
=
check_symbols check_headers
TESTS
=
$(check_PROGRAMS)
$(dist_check_SCRIPTS)
CFLAGS_tests
=
`
$(VLC_CONFIG)
--cflags
libvlc
`
...
...
@@ -388,10 +395,24 @@ test_utf8_SOURCES = test/utf8.c
test_utf8_LDADD
=
libvlc.la
test_utf8_CFLAGS
=
$(CFLAGS_tests)
test_headers_SOURCES
=
test
/headers.c
test_headers_CFLAGS
=
$(CFLAGS_tests)
test_control_SOURCES
=
control/testapi.c
test_control_LDADD
=
libvlc-control.la
test_control_CFLAGS
=
$(CFLAGS_tests)
check-local
:
for
h
in
`
echo
$(dist_pkginclude_HEADERS)
$(pkginclude_HEADERS)
|
sed
-e
s,
\.\.
/include/,,g
`
;
\
do
\
echo grep
-
"#include <
$$
h>"
$(srcdir)
/test/headers.c
;
\
if
!
grep
--
"#include <
$$
h>"
$(srcdir)
/test/headers.c
;
\
then
\
echo
"Header
$$
h not included in test/headers.c!"
;
\
exit
1
;
\
fi
;
\
done
FORCE
:
@
echo
"Generated source cannot be phony. Go away."
>
&2
@
exit
1
...
...
src/test/headers.c
0 → 100644
View file @
42b03d10
/*****************************************************************************
* headers.c: Test for public headers usability
*****************************************************************************
* Copyright (C) 2007 Rémi Denis-Courmont
* $Id$
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/
/* config.h is NOT installed, headers MUST NOT depend on it.
# include <config.h> */
/* One thing we don't check is the CPPFLAGS - these MUST be exposed publicly,
* e.g. using pkg-config or the broken old vlc-config. */
#include <vlc/vlc.h>
#include <vlc/libvlc.h>
#include <vlc/libvlc_structures.h>
#include <vlc/mediacontrol.h>
#include <vlc/mediacontrol_structures.h>
int
main
(
void
)
{
puts
(
"Public headers can be used for external compilation."
);
return
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