From a8e88fd0056a53ef40209a7b5c06665180a59a5c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sl=C3=A1vek=20Banko?= Date: Mon, 11 Jan 2016 01:53:29 +0100 Subject: Compile MIME magic file This partially resolves Bug 2217 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Slávek Banko (cherry picked from commit 026a0ccdcdd054f227682f7e37dceef68173c6f9) --- kio/CMakeLists.txt | 12 +++++++++++- kio/Makefile.am | 7 ++++++- 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/kio/CMakeLists.txt b/kio/CMakeLists.txt index ae7759747..2e84efcd8 100644 --- a/kio/CMakeLists.txt +++ b/kio/CMakeLists.txt @@ -35,7 +35,17 @@ link_directories( ##### other data ################################ -install( FILES kio.magic DESTINATION ${CONFIG_INSTALL_DIR}/magic ) +add_custom_command( + OUTPUT kio.magic.mgc + COMMAND file -C -m ${CMAKE_CURRENT_SOURCE_DIR}/kio.magic +) + +add_custom_target( + kio_magic_mgc + ALL DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/kio.magic.mgc +) + +install( FILES kio.magic ${CMAKE_CURRENT_BINARY_DIR}/kio.magic.mgc DESTINATION ${CONFIG_INSTALL_DIR}/magic ) install( FILES application.desktop kurifilterplugin.desktop diff --git a/kio/Makefile.am b/kio/Makefile.am index 05d9a72b1..e5502e8b3 100644 --- a/kio/Makefile.am +++ b/kio/Makefile.am @@ -35,7 +35,7 @@ libkio_la_LIBADD = kssl/libkssl.la kio/libkiocore.la \ $(LIBZ) $(LIBFAM) $(LIBVOLMGT) $(ACL_LIBS) $(LIB_QT) $(LIB_KDECORE) $(top_builddir)/dcop/libDCOP.la $(LIB_X11) magicdir = $(kde_confdir)/magic -magic_DATA = kio.magic +magic_DATA = kio.magic kio.magic.mgc kde_servicetypes_DATA = application.desktop kurifilterplugin.desktop \ kcomprfilter.desktop kscan.desktop kdatatool.desktop \ @@ -64,6 +64,11 @@ messages: $(XGETTEXT) `find . ../kioslave -name "*.cpp" -o -name "*.cc" -o -name "*.h"` -o $(podir)/kio.pot rm -f rc.cpp +SUFFIXES = .magic .magic.mgc + +.magic.magic.mgc: + (cd `dirname $@` && file -C -m $<) + DOXYGEN_REFERENCES = kdecore kdefx kjs dcop kdeui kio/kio kio/kfile DOXYGEN_EXCLUDE = kssl/kssl include ../admin/Doxyfile.am -- cgit v1.2.1