Changeset 575c056a1c46f037ab33366b4999eb8eb1a96cd5
- Timestamp:
- 06/02/05 14:47:30
(3 years ago)
- Author:
- Rémi Denis-Courmont <rem@videolan.org>
- git-committer:
- Rémi Denis-Courmont <rem@videolan.org> 1117716450 +0000
- git-parent:
[cab6549141c59cb40ff9ec9e3c03ec72c65c60e9]
- git-author:
- Rémi Denis-Courmont <rem@videolan.org> 1117716450 +0000
- Message:
Complete rewrite of vlc_symbols.h generation (closes #155)
New VLC_EXPORTs are now added at the end of module_symbols_t so that
offsets of other function pointers are preserved.
Deleted VLC_EXPORTs are replaced with dummy pointers for padding.
Of course, it doesn't solve the problem with changing shared structures
format :/ and it may cause SVN conflicts when multiple people changes
VLC_EXPORT. I doubt it can be avoided though.
-
Files:
-
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
| r9160790 |
r575c056 |
|
| 24 | 24 | src/extras/COPYING \ |
|---|
| 25 | 25 | toolbox \ |
|---|
| | 26 | vlc-api.pl \ |
|---|
| 26 | 27 | vlc-config.in.in \ |
|---|
| 27 | 28 | vlc.spec \ |
|---|
| … | … | |
| 46 | 47 | BUILT_SOURCES += \ |
|---|
| 47 | 48 | stamp-api \ |
|---|
| 48 | | include/vlc_symbols.h \ |
|---|
| 49 | 49 | src/misc/modules_builtin.h \ |
|---|
| 50 | | src/misc/modules_plugin.h \ |
|---|
| 51 | 50 | $(NULL) |
|---|
| 52 | 51 | |
|---|
| … | … | |
| 64 | 63 | $(NULL) |
|---|
| 65 | 64 | |
|---|
| 66 | | noinst_HEADERS = $(HEADERS_include) $(HEADERS_include_built) |
|---|
| | 65 | noinst_HEADERS = $(HEADERS_include) |
|---|
| 67 | 66 | |
|---|
| 68 | 67 | HEADERS_include = \ |
|---|
| … | … | |
| 115 | 114 | include/vlc_spu.h \ |
|---|
| 116 | 115 | include/vlc_stream.h \ |
|---|
| | 116 | include/vlc_symbols.h \ |
|---|
| 117 | 117 | include/vlc_threads_funcs.h \ |
|---|
| 118 | 118 | include/vlc_threads.h \ |
|---|
| … | … | |
| 125 | 125 | $(NULL) |
|---|
| 126 | 126 | |
|---|
| 127 | | HEADERS_include_built = \ |
|---|
| 128 | | include/vlc_symbols.h \ |
|---|
| 129 | | $(NULL) |
|---|
| 130 | | |
|---|
| 131 | | # Common dependencies for these 3 files : Makefile vlc-config |
|---|
| 132 | | # Real specific dependencies : |
|---|
| 133 | | |
|---|
| 134 | | #include/vlc_symbols.h: $(HEADERS_include) |
|---|
| 135 | | #src/misc/modules_plugin.h: src/misc/modules_plugin.h.in $(HEADERS_include) |
|---|
| 136 | | #src/misc/modules_builtin.h: src/misc/modules_builtin.h.in vlc-config |
|---|
| 137 | | |
|---|
| 138 | | include/vlc_symbols.h: |
|---|
| | 127 | src/misc/modules_builtin.h: Makefile src/misc/modules_builtin.h.in vlc-config |
|---|
| 139 | 128 | srcdir=$(srcdir) $(srcdir)/toolbox --update-includes |
|---|
| 140 | | |
|---|
| 141 | | # for some strange reasons (??) modules_plugin.h depends on vlc_symbols.h |
|---|
| 142 | | # so we have to touch it :( |
|---|
| 143 | | src/misc/modules_plugin.h: src/misc/modules_plugin.h.in |
|---|
| 144 | | srcdir=$(srcdir) $(srcdir)/toolbox --update-includes |
|---|
| 145 | | touch src/misc/modules_plugin.h |
|---|
| 146 | | |
|---|
| 147 | | src/misc/modules_builtin.h: src/misc/modules_builtin.h.in |
|---|
| 148 | | srcdir=$(srcdir) $(srcdir)/toolbox --update-includes |
|---|
| | 129 | touch $@ |
|---|
| 149 | 130 | |
|---|
| 150 | 131 | # These dependencies are mandatory |
|---|
| 151 | | $(SOURCES): include/vlc_symbols.h |
|---|
| 152 | | $(SOURCES_libvlc): src/misc/modules_plugin.h src/misc/modules_builtin.h $(LIB_intl) |
|---|
| | 132 | $(SOURCES_libvlc): src/misc/modules_builtin.h $(LIB_intl) |
|---|
| 153 | 133 | |
|---|
| 154 | 134 | ############################################################################### |
|---|
| … | … | |
| 286 | 266 | |
|---|
| 287 | 267 | lib_libvlc_a_SOURCES = $(SOURCES_libvlc) |
|---|
| 288 | | dist_lib_libvlc_a_SOURCES = src/misc/modules_plugin.h |
|---|
| 289 | 268 | lib_libvlc_a_CFLAGS = `$(VLC_CONFIG) --cflags vlc` |
|---|
| 290 | 269 | lib_libvlc_a_CXXFLAGS = `$(VLC_CONFIG) --cxxflags vlc` |
|---|
| … | … | |
| 940 | 919 | @if test ! -f $@; then printf "" > $@; fi |
|---|
| 941 | 920 | |
|---|
| 942 | | stamp-api: Makefile $(HEADERS_include) vlc-config src/misc/modules_plugin.h.in src/misc/modules_builtin.h.in |
|---|
| 943 | | srcdir=$(srcdir) $(srcdir)/toolbox --update-includes |
|---|
| | 921 | stamp-api: Makefile.in $(HEADERS_include) vlc-config vlc-api.pl src/misc/modules_builtin.h.in |
|---|
| | 922 | cd $(srcdir) && cat $(HEADERS_include) | perl ./vlc-api.pl |
|---|
| 944 | 923 | touch stamp-api |
|---|
| 945 | 924 | |
|---|
| r8641281 |
r575c056 |
|
| 1 | 1 | DIST_SUBDIRS = interface playlist input audio_output video_output stream_output misc |
|---|
| 2 | | EXTRA_DIST = misc/modules_builtin.h.in misc/modules_plugin.h.in |
|---|
| | 2 | EXTRA_DIST = misc/modules_builtin.h.in |
|---|
| rc0156dd |
r575c056 |
|
| 108 | 108 | #include "vlc_image.h" |
|---|
| 109 | 109 | |
|---|
| 110 | | #ifdef HAVE_DYNAMIC_PLUGINS |
|---|
| 111 | | # include "modules_plugin.h" |
|---|
| 112 | | #endif |
|---|
| 113 | | |
|---|
| 114 | 110 | #if defined( _MSC_VER ) && defined( UNDER_CE ) |
|---|
| 115 | 111 | # include "modules_builtin_evc.h" |
|---|
| rced8838 |
r575c056 |
|
| 405 | 405 | builddir="`sed -ne 's/^top_builddir *= *//p' < Makefile`" |
|---|
| 406 | 406 | fi |
|---|
| 407 | | mkdir -p "${builddir}/include" |
|---|
| 408 | | |
|---|
| 409 | | LIBVLC_HEADERS=`getfiles HEADERS_include` |
|---|
| 410 | 407 | BUILTINS=`sed -ne 's/.*builtins *= *" *\([^"]*\)".*/\1/p' vlc-config` |
|---|
| 411 | | |
|---|
| 412 | | file="${builddir}/include/vlc_symbols.h" |
|---|
| 413 | | |
|---|
| 414 | | rm -f ${file}.in |
|---|
| 415 | | echo '/* DO NOT EDIT THIS FILE! See Makefile.am */' >> ${file}.in |
|---|
| 416 | | echo 'struct module_symbols_t {' >> ${file}.in |
|---|
| 417 | | cat ${LIBVLC_HEADERS} | grep '^ *VLC_EXPORT.*;' | sed -e 's/VLC_EXPORT( *\([^,]*\), *\([^,]*\), *\(.*\));.*/ \1 (* \2_inner) \3;/' >> ${file}.in |
|---|
| 418 | | echo '};' >> ${file}.in |
|---|
| 419 | | echo '#ifdef __PLUGIN__' >> ${file}.in |
|---|
| 420 | | cat ${LIBVLC_HEADERS} | grep '^ *VLC_EXPORT.*;' | sed -e 's/VLC_EXPORT( *\([^,]*\), *\([^,]*\), *\(.*\));.*/# define \2 p_symbols->\2_inner/' >> ${file}.in |
|---|
| 421 | | echo '#endif /* __PLUGIN__ */' >> ${file}.in |
|---|
| 422 | | if diff >/dev/null 2>&1 ${file} ${file}.in |
|---|
| 423 | | then |
|---|
| 424 | | rm -f ${file}.in |
|---|
| 425 | | else |
|---|
| 426 | | echo "creating new ${file}" |
|---|
| 427 | | mv -f ${file}.in ${file} |
|---|
| 428 | | fi |
|---|
| 429 | | |
|---|
| 430 | | file="${builddir}/src/misc/modules_plugin.h" |
|---|
| 431 | | |
|---|
| 432 | | rm -f ${file}.tmp |
|---|
| 433 | | sed -e 's#.*\$[I][d]:.*# * Automatically generated from '${file}'.in by bootstrap#' < ${srcdir}/src/misc/modules_plugin.h.in > ${file}.tmp |
|---|
| 434 | | echo '#define STORE_SYMBOLS( p_symbols ) \' >> ${file}.tmp |
|---|
| 435 | | cat ${LIBVLC_HEADERS} | grep '^ *VLC_EXPORT.*;' | sed -e 's/VLC_EXPORT( *\([^,]*\), *\([^,]*\), *\(.*\));.*/ (p_symbols)->\2_inner = \2; \\/' >> ${file}.tmp |
|---|
| 436 | | echo '' >> ${file}.tmp |
|---|
| 437 | | if diff >/dev/null 2>&1 ${file} ${file}.tmp |
|---|
| 438 | | then |
|---|
| 439 | | rm -f ${file}.tmp |
|---|
| 440 | | else |
|---|
| 441 | | echo "creating new ${file}" |
|---|
| 442 | | mv -f ${file}.tmp ${file} |
|---|
| 443 | | fi |
|---|
| 444 | 408 | |
|---|
| 445 | 409 | file="${builddir}/src/misc/modules_builtin.h" |
|---|
| r9160790 |
r575c056 |
|
| 86 | 86 | top_builddir="${TOP_BUILDDIR}/" |
|---|
| 87 | 87 | fi |
|---|
| 88 | | includes="${includes} -I${top_builddir}include" |
|---|
| | 88 | includes="${includes}" |
|---|
| 89 | 89 | cppflags="${includes}" |
|---|
| 90 | 90 | libs="-L@libdir@" |
|---|