Commit 4dc59a4f authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

- Fix make clean

 - Remove GNU/makeisms
 - Cleanup
parent e3d911f3
# vim:syntax=make # vim:syntax=automake
## Howto ## Howto
# For each Q_OBJECT: # For each Q_OBJECT:
# - Add it without extension to TOMOC # - Add the .moc.cpp to BUILT_SOURCES and nodist_SOURCES_qt4
# - Add the moc.cpp to BUILT_SOURCES and nodist_SOURCES_qt4 # - Add the .cpp to SOURCES_qt4
# - Add the cpp to SOURCES_qt4 # - Add the .hpp to EXTRA_DIST
# - Add the hpp to EXTRA_DIST
# For each UI # For each UI
# - Add it without extension to TOUI
# - Add it to EXTRA_DIST # - Add it to EXTRA_DIST
# - Add the .h to nodist_SOURCES_qt4
AUTOMAKE_OPTIONS = subdir-objects AUTOMAKE_OPTIONS = subdir-objects
MOSTLYCLEANFILES = $(UIH)
TOUI = \ SUFFIXES += .ui .h .hpp .moc.cpp
ui/equalizer \
ui/video_effects \
ui/open_file \
ui/open_disk \
ui/open_net \
ui/open_capture \
ui/open \
ui/main_interface \
ui/sprefs_audio \
ui/sprefs_input \
ui/sprefs_interface \
ui/sprefs_subtitles \
ui/sprefs_video \
ui/sprefs_hotkeys \
ui/streampanel \
ui/sout
UIH = $(TOUI:%=%.h)
TOMOC = main_interface \
menus \
dialogs_provider \
input_manager \
playlist_model \
dialogs/playlist \
dialogs/preferences \
dialogs/messages \
dialogs/errors \
dialogs/mediainfo \
dialogs/extended \
dialogs/interaction \
dialogs/sout \
dialogs/help \
dialogs/gototime \
dialogs/open \
components/extended_panels \
components/infopanels \
components/preferences_widgets \
components/complete_preferences \
components/simple_preferences \
components/open \
components/interface_widgets \
components/playlist/panels \
components/playlist/selector \
util/input_slider \
util/customwidgets
MOCCPP = $(TOMOC:%=%.moc.cpp)
nodist_SOURCES_qt4 = \ nodist_SOURCES_qt4 = \
main_interface.moc.cpp \ main_interface.moc.cpp \
...@@ -89,27 +40,41 @@ nodist_SOURCES_qt4 = \ ...@@ -89,27 +40,41 @@ nodist_SOURCES_qt4 = \
components/playlist/selector.moc.cpp \ components/playlist/selector.moc.cpp \
util/input_slider.moc.cpp \ util/input_slider.moc.cpp \
util/customwidgets.moc.cpp \ util/customwidgets.moc.cpp \
resources.cpp resources.cpp \
ui/equalizer.h \
ui/video_effects.h \
ui/open_file.h \
ui/open_disk.h \
ui/open_net.h \
ui/open_capture.h \
ui/open.h \
ui/main_interface.h \
ui/sprefs_audio.h \
ui/sprefs_input.h \
ui/sprefs_interface.h \
ui/sprefs_subtitles.h \
ui/sprefs_video.h \
ui/sprefs_hotkeys.h \
ui/streampanel.h \
ui/sout.h
if ENABLE_QT4 if ENABLE_QT4
BUILT_SOURCES += $(UIH) $(nodist_SOURCES_qt4) BUILT_SOURCES += $(nodist_SOURCES_qt4)
endif endif
resources.cpp: res.qrc resources.cpp: res.qrc
$(RCC) -name vlc -o $@ $< $(RCC) -name vlc -o $@ $<
$(MOCCPP): %.moc.cpp: %.hpp .hpp.moc.cpp:
@echo "$(MOC) $< -> $@"
$(MOC) -o $@ $< $(MOC) -o $@ $<
$(UIH): %.h: %.ui .ui.h:
mkdir -p -- ui mkdir -p -- ui
@echo "$(UIC) $< -> $@" rm -f $@ $@.tmp
rm -f $@ echo "#define Q_(a,b) QString::fromUtf8(_(a))" > $@.tmp
echo "#define Q_(a,b) QString::fromUtf8(_(a))" > $@.uih-tmp $(UIC) -tr "Q_" $< >> $@.tmp
$(UIC) -tr "Q_" $< >> $@.uih-tmp sed -i -e 's/Q_(\"_(\\\"\(.*\)\\\")"/Q_("\1"/' $@.tmp
sed -i -e 's/Q_(\"_(\\\"\(.*\)\\\")"/Q_("\1"/' $@.uih-tmp mv -f $@.tmp $@
mv $@.uih-tmp $@
SOURCES_qt4 = qt4.cpp \ SOURCES_qt4 = qt4.cpp \
menus.cpp \ menus.cpp \
...@@ -138,17 +103,15 @@ SOURCES_qt4 = qt4.cpp \ ...@@ -138,17 +103,15 @@ SOURCES_qt4 = qt4.cpp \
components/playlist/standardpanel.cpp \ components/playlist/standardpanel.cpp \
components/playlist/selector.cpp \ components/playlist/selector.cpp \
util/input_slider.cpp \ util/input_slider.cpp \
util/customwidgets.cpp \ util/customwidgets.cpp
$(NULL)
EXTRA_DIST += \ noinst_HEADERS = \
qt4.hpp \ qt4.hpp \
menus.hpp \ menus.hpp \
main_interface.hpp \ main_interface.hpp \
dialogs_provider.hpp \ dialogs_provider.hpp \
input_manager.hpp \ input_manager.hpp \
playlist_model.hpp \ playlist_model.hpp \
res.qrc \
dialogs/playlist.hpp \ dialogs/playlist.hpp \
dialogs/mediainfo.hpp \ dialogs/mediainfo.hpp \
dialogs/extended.hpp \ dialogs/extended.hpp \
...@@ -172,7 +135,10 @@ EXTRA_DIST += \ ...@@ -172,7 +135,10 @@ EXTRA_DIST += \
util/input_slider.hpp \ util/input_slider.hpp \
util/directslider.hpp \ util/directslider.hpp \
util/customwidgets.hpp \ util/customwidgets.hpp \
util/qvlcframe.hpp \ util/qvlcframe.hpp
EXTRA_DIST += \
res.qrc \
ui/equalizer.ui \ ui/equalizer.ui \
ui/video_effects.ui \ ui/video_effects.ui \
ui/open_file.ui \ ui/open_file.ui \
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment