Add vconf key for on-demand launching IME
[platform/core/appfw/vconf-internal-keys.git] / Makefile
1 #all:html cmd header
2 #all:init allcmd allheader allhtml vconf-internal-keys.pc
3 #all:init allcmd allheader allhtml allwrapper
4 #all:init allcmd allhtml allheader allwrapper allwrapper_impl vconf-internal-keys.h endproc
5 #all:init allcmd postproc allhtml allheader vconf-internal-keys.h endproc
6 all:init allcmd allhtml allheader vconf-internal-keys.h endproc
7
8 allcmd: $(shell find . -name "*.xml" | sort | sed 's/xml/sh/')
9 #allcmd2: $(shell find . -name "*.xml" | sed 's/xml/sh2/')
10 allheader: $(shell find . -name "*.xml" | sort | sed 's/xml/h/')
11 allhtml: $(shell find . -name "*.xml" | sort | sed 's/xml/html/')
12 #allwrapper: $(shell find . -name "*.xml" | sed 's/.xml/_wrapper.h/')
13 #allwrapper_impl: $(shell find . -name "*.xml" | sed 's/.xml/_wrapper.c/')
14
15 MODEL=$(model)
16 XMLS=$(wildcard data/*.xml)
17
18 check:
19         echo $(XMLS)
20         $(foreach var, $(XMLS), xmllint --noout --schema check.xsd $(var) || exit;)
21
22 ifneq ($(profile), )
23 xsltopt = --stringparam profile $(profile)
24 else
25 xsltopt = --stringparam profile ''
26 endif
27 ifneq ($(model), )
28 xsltopt += --stringparam target $(MODEL)
29 else
30 xsltopt += --stringparam target ''
31 endif
32
33 init:
34         @mkdir -p report
35         @mkdir -p scripts
36         @mkdir -p include
37         @find scripts -name "*.sh" -exec rm {} \;
38         @find data -name "*.sh" -exec rm {} \;
39
40 #       if [ -a ./scripts/all.sh ]; \
41 #       then \
42 #               rm ./scripts/all.sh; \
43 #       fi;
44         cp all.sh.in ./scripts/all.sh
45
46 %.html:%.xml
47         xsltproc $(xsltopt) test_report.xsl $< > $@
48         mv $@ ./report
49
50 %.sh:%.xml
51         xsltproc $(xsltopt) create_cmd.xsl $< | sed '/^$$/d' > $@
52         cat $@ >> ./scripts/all.sh
53         rm $@
54         xsltproc $(xsltopt) create_init_script.xsl $< | sed '/^$$/d' > $@
55         if [ -s $@ ]; then mv $@ ./scripts; fi
56
57
58 #%.sh2:%.xml
59 #       xsltproc $(xsltopt) create_init_script.xsl $< | sed '/^$$/d' > $@
60 #       if [ -s $@ ]; then mv $@ ./scripts; fi
61
62
63 %.h:%.xml
64         xsltproc $(xsltopt) create_header.xsl $< | sed '/^$$/d' > $@
65         mv $@ ./include
66
67 #%_wrapper.h:%.xml
68 #       xsltproc $(xsltopt) create_wrapper.xsl $< | sed '/^$$/d'  > $@
69 #       xsltproc $(xsltopt) create_wrapper.xsl $< | sed '/^$$/d'   > $@
70 #       mv $@ ./include
71
72 #%_wrapper.c:%.xml
73 #       xsltproc $(xsltopt) create_wrapper.xsl $< | sed '/^$$/d' | indent   > $@
74 #       xsltproc $(xsltopt) create_wrapper_impl.xsl $< | sed '/^$$/d'   > $@
75 #       sed -i '21 i #include \<vconf.h\>' $@
76 #       sed -i '22 i #include "vconf-internal-keys.h"' $@
77 #       sed -i '23i\\' $@
78 #       mv $@ ./wrapper
79
80 vconf-internal-keys.h:
81         echo "#ifndef __VCONF_INTERNAL_KEYS_H__" > include/vconf-internal-keys.h
82         echo "#define __VCONF_INTERNAL_KEYS_H__" >> include/vconf-internal-keys.h
83         find ./include -name "*.h" -not -name "vconf-internal-keys.h" -printf "#include \"%f\" \n" | sort >> include/vconf-internal-keys.h
84         echo "#endif            /* __VCONF_INTERNAL_KEYS_H__ */" >> include/vconf-internal-keys.h
85
86 clean:
87         #@rm -rf report scripts include *.pc
88         @rm -rf report scripts include
89         @find . -name "*.html" -print0 | xargs -0 -r rm
90         @rm data/vconf-*.sh
91         @find . -name "*.h" -print0 | xargs -0 -r rm
92
93 endproc:
94         ./remove_whitespace.sh
95
96 #vconf-internal-keys.pc:vconf-internal-keys.pc.in
97 #       sed -e 's/@PREFIX@/hello/' -e 's/@LIBDIR@/hello/' -e 's/@EXEC_PREFIX@/hello/' -e 's/@INCLUDEDIR@/hello/' -e 's/@VERSION@/hello/' vconf-internal-keys.pc.in > vconf-internal-keys.pc
98
99 install:
100 #               cp cmd.sh /opt/usr
101 #               cp ${INSTALL_ROOT}/scripts/*.sh ${INSTALL_ROOT}/opt/usr