Browse Source

Compile MIME magic file

This partially resolves Bug 2217

Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
pull/1/head
Slávek Banko 3 years ago
parent
commit
026a0ccdcd
2 changed files with 17 additions and 2 deletions
  1. 11
    1
      tdeio/CMakeLists.txt
  2. 6
    1
      tdeio/Makefile.am

+ 11
- 1
tdeio/CMakeLists.txt View File

@@ -36,7 +36,17 @@ link_directories(
36 36
 
37 37
 ##### other data ################################
38 38
 
39
-install( FILES tdeio.magic DESTINATION ${CONFIG_INSTALL_DIR}/magic )
39
+add_custom_command(
40
+  OUTPUT tdeio.magic.mgc
41
+  COMMAND file -C -m ${CMAKE_CURRENT_SOURCE_DIR}/tdeio.magic
42
+)
43
+
44
+add_custom_target(
45
+  tdeio_magic_mgc
46
+  ALL DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/tdeio.magic.mgc
47
+)
48
+
49
+install( FILES tdeio.magic ${CMAKE_CURRENT_BINARY_DIR}/tdeio.magic.mgc DESTINATION ${CONFIG_INSTALL_DIR}/magic )
40 50
 
41 51
 install( FILES
42 52
     application.desktop kurifilterplugin.desktop

+ 6
- 1
tdeio/Makefile.am View File

@@ -35,7 +35,7 @@ libtdeio_la_LIBADD = kssl/libkssl.la tdeio/libtdeiocore.la \
35 35
 	$(LIBZ) $(LIBFAM) $(LIBVOLMGT) $(ACL_LIBS) $(LIB_QT) $(LIB_TDECORE) $(top_builddir)/dcop/libDCOP.la $(LIB_X11)
36 36
 
37 37
 magicdir = $(kde_confdir)/magic
38
-magic_DATA = tdeio.magic
38
+magic_DATA = tdeio.magic tdeio.magic.mgc
39 39
 
40 40
 kde_servicetypes_DATA = application.desktop kurifilterplugin.desktop \
41 41
                         kcomprfilter.desktop kscan.desktop kdatatool.desktop \
@@ -64,6 +64,11 @@ messages:
64 64
 	$(XGETTEXT) `find . ../tdeioslave -name "*.cpp" -o -name "*.cc" -o -name "*.h"` -o $(podir)/tdeio.pot
65 65
 	rm -f rc.cpp
66 66
 
67
+SUFFIXES = .magic .magic.mgc
68
+
69
+.magic.magic.mgc:
70
+	(cd `dirname $@` && file -C -m $<)
71
+
67 72
 DOXYGEN_REFERENCES = tdecore tdefx kjs dcop tdeui tdeio/tdeio tdeio/tdefile
68 73
 DOXYGEN_EXCLUDE = kssl/kssl
69 74
 include ../admin/Doxyfile.am

Loading…
Cancel
Save