Browse Source
Move the vlc_modules_list generation logic to a shared modulelist.mk file that can be included by both modules/Makefile.am and modules/gui/qt/Makefile.am. Now each directory generates its own vlc_modules_list using LTLIBRARIES, and the parent concatenates lists from SUBDIRS.pull/199/head
committed by
Felix Paul Kühne
2 changed files with 32 additions and 18 deletions
@ -0,0 +1,30 @@ |
|||||
|
# modulelist.mk - Generate vlc_modules_list from LTLIBRARIES and SUBDIRS
|
||||
|
# Paths are relative to top_builddir using automake's $(subdir)
|
||||
|
|
||||
|
|
||||
|
# Remove the non-plugins, it needs intermediate steps because
|
||||
|
# we can only replace and not match inverse. Instead we:
|
||||
|
# 1/ replace plugins .la targets by plugins names
|
||||
|
# 2/ remove every word which is a .la target (ie. non-plugins)
|
||||
|
# 3/ rename every plugin name back into the target name
|
||||
|
VLC_PLUGINS_RENAMED = $(LTLIBRARIES:lib%_plugin.la=%_plugin) |
||||
|
VLC_PLUGINS = $(VLC_PLUGINS_RENAMED:%.la=) |
||||
|
|
||||
|
# Generate a list containing the name and path of every plugin being built
|
||||
|
# Format: plugin_name: relative/path/to/plugin$(LIBEXT)
|
||||
|
# This allows plugins from SUBDIRS (like Qt) to specify their actual location
|
||||
|
# The recipee concatenates records from local plugins and those from SUBDIRS
|
||||
|
vlc_modules_list: Makefile |
||||
|
$(AM_V_GEN)rm -f $@.tmp; \
|
||||
|
for plugin in $(VLC_PLUGINS); do \
|
||||
|
printf "$${plugin}: $(subdir)/.libs/lib$${plugin}$(LIBEXT)\n" >> $@.tmp; \
|
||||
|
done; \
|
||||
|
for subdir in $(SUBDIRS); do \
|
||||
|
[ "$$subdir" = "." ] && continue; \
|
||||
|
[ -f "$$subdir/vlc_modules_list" ] && \
|
||||
|
cat "$$subdir/vlc_modules_list" >> $@.tmp; \
|
||||
|
done; \
|
||||
|
if [ -s "$@.tmp" ]; then mv $@.tmp $@; else rm -f $@.tmp && touch $@; fi |
||||
|
|
||||
|
BUILT_SOURCES += vlc_modules_list |
||||
|
CLEANFILES += vlc_modules_list |
||||
Loading…
Reference in new issue