File: Makefile.am

package info (click to toggle)
gtk-im-libthai 0.2.2-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, sid
  • size: 1,548 kB
  • sloc: sh: 4,154; ansic: 356; makefile: 85
file content (81 lines) | stat: -rw-r--r-- 2,376 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
if PLATFORM_WIN32
no_undefined = -no-undefined
endif

MODULE_SRC =			\
	gtkimcontextthai.c 	\
	gtkimcontextthai.h	\
	imthai-libthai.c

if HAS_GTK2
INSTALL_GTK2 = yes

gtk2module_LTLIBRARIES =	\
	gtk2/im-thai-libthai.la

gtk2_im_thai_libthai_la_LDFLAGS = \
	-rpath $(gtk2moduledir) -avoid-version -module $(no_undefined)
gtk2_im_thai_libthai_la_SOURCES = $(MODULE_SRC)
gtk2_im_thai_libthai_la_CPPFLAGS = $(GTK2_CFLAGS) $(LIBTHAI_CFLAGS)
if NO_FALLBACK
gtk2_im_thai_libthai_la_CPPFLAGS += -DGTK_IM_CONTEXT_LIBTHAI_NO_FALLBACK
endif
gtk2_im_thai_libthai_la_LIBADD = $(GTK2_LIBS) $(LIBTHAI_LIBS)
else
INSTALL_GTK2 = no
endif

if HAS_GTK3
INSTALL_GTK3 = yes

gtk3module_LTLIBRARIES =	\
	gtk3/im-thai-libthai.la

gtk3_im_thai_libthai_la_LDFLAGS = \
	-rpath $(gtk3moduledir) -avoid-version -module $(no_undefined)
gtk3_im_thai_libthai_la_SOURCES = $(MODULE_SRC)
gtk3_im_thai_libthai_la_CPPFLAGS = $(GTK3_CFLAGS) $(LIBTHAI_CFLAGS)
if NO_FALLBACK
gtk3_im_thai_libthai_la_CPPFLAGS += -DGTK_IM_CONTEXT_LIBTHAI_NO_FALLBACK
endif
gtk3_im_thai_libthai_la_LIBADD = $(GTK3_LIBS) $(LIBTHAI_LIBS)
else
INSTALL_GTK3 = no
endif

# Running this if cross compiling or if DESTDIR is set is going to
# not work at all, so skip it.
install-data-hook: update-modules

uninstall-hook: update-modules

update-modules:
	@if test -z "$(DESTDIR)" ; then \
	  if [ "X$(INSTALL_GTK2)" = "Xyes" ]; then \
	    GTK2_IM_MODULE_FILE=`dirname $(gtk2moduledir)`/gtk.immodules ; \
	    if ! test -f $${GTK2_IM_MODULE_FILE} ; then \
	      GTK2_IM_MODULE_FILE=$(sysconfdir)/gtk-2.0/gtk.immodules ; \
	    fi ; \
	    if test -f $${GTK2_IM_MODULE_FILE} ; then \
	      CMD="gtk-query-immodules-2.0 > $${GTK2_IM_MODULE_FILE}" ; \
	      echo $${CMD} ; eval $${CMD} ; \
	    fi \
	  fi ; \
	  if [ "X$(INSTALL_GTK3)" = "Xyes" ]; then \
	    GTK3_IM_MODULE_FILE=`dirname $(gtk3moduledir)`/immodules.cache ; \
	    if test -f $${GTK3_IM_MODULE_FILE}; then \
	      CMD="GTK_IM_MODULE_FILE=$${GTK3_IM_MODULE_FILE}" ; \
	      CMD="$${CMD} gtk-query-immodules-3.0 --update-cache" ; \
	      echo $${CMD} ; eval $${CMD} ; \
	    fi \
	  fi \
	else \
	  echo "***" ; \
	  echo "*** Warning: gtk.immodules not built" ; \
	  echo "***" ; \
	  echo "*** Generate this file manually on host" ; \
	  echo "*** system using gtk-query-immodules-2.0" ; \
	  echo "*** and/or gtk-query-immodules-3.0" ; \
	  echo "***" ; \
        fi