Add vconfkey for detecting H/W keyboard input
[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" | sed 's/xml/sh/')
9 allheader: $(shell find . -name "*.xml" | sed 's/xml/h/')
10 allhtml: $(shell find . -name "*.xml" | sed 's/xml/html/')
11 #allwrapper: $(shell find . -name "*.xml" | sed 's/.xml/_wrapper.h/')
12 #allwrapper_impl: $(shell find . -name "*.xml" | sed 's/.xml/_wrapper.c/')
13
14 MODEL=$(model)
15 XMLS=$(wildcard data/*.xml)
16
17 check:
18         echo $(XMLS)
19         $(foreach var, $(XMLS), xmllint --noout --schema check.xsd $(var);)
20
21 ifneq ($(model), )
22 xsltopt=--stringparam target $(MODEL)
23 else
24 xsltopt=--stringparam target ''
25 endif
26 init:
27         @mkdir -p report
28         @mkdir -p scripts
29         @mkdir -p include
30         if [ -a ./scripts/all.sh ]; \
31         then \
32                 rm ./scripts/all.sh; \
33         fi;
34
35 %.html:%.xml
36         xsltproc $(xsltopt) test_report.xsl $< > $@
37         mv $@ ./report
38
39 %.sh:%.xml
40         xsltproc $(xsltopt) create_cmd.xsl $< | sed '/^$$/d' > $@
41         cat $@ >> ./scripts/all.sh
42         rm $@
43
44 %.h:%.xml
45         xsltproc $(xsltopt) create_header.xsl $< | sed '/^$$/d' > $@
46         mv $@ ./include
47
48 #%_wrapper.h:%.xml
49 #       xsltproc $(xsltopt) create_wrapper.xsl $< | sed '/^$$/d'  > $@
50 #       xsltproc $(xsltopt) create_wrapper.xsl $< | sed '/^$$/d'   > $@
51 #       mv $@ ./include
52
53 #%_wrapper.c:%.xml
54 #       xsltproc $(xsltopt) create_wrapper.xsl $< | sed '/^$$/d' | indent   > $@
55 #       xsltproc $(xsltopt) create_wrapper_impl.xsl $< | sed '/^$$/d'   > $@
56 #       sed -i '21 i #include \<vconf.h\>' $@
57 #       sed -i '22 i #include "vconf-internal-keys.h"' $@
58 #       sed -i '23i\\' $@
59 #       mv $@ ./wrapper
60
61 vconf-internal-keys.h:
62         echo "#ifndef __VCONF_INTERNAL_KEYS_H__" > include/vconf-internal-keys.h
63         echo "#define __VCONF_INTERNAL_KEYS_H__" >> include/vconf-internal-keys.h
64         find ./include -name "*.h" -not -name "vconf-internal-keys.h" -printf "#include \"%f\" \n" | sort >> include/vconf-internal-keys.h
65         echo "#endif            /* __VCONF_INTERNAL_KEYS_H__ */" >> include/vconf-internal-keys.h
66
67 clean:
68         #@rm -rf report scripts include *.pc
69         @rm -rf report scripts include
70         @find . -name "*.html" | xargs rm
71         @find . -name "*.sh" | xargs rm
72         @find . -name "*.h" | xargs rm
73
74 endproc:
75         sed -i '1 i #!/bin/bash' ./scripts/all.sh
76         ./remove_whitespace.sh
77
78 #vconf-internal-keys.pc:vconf-internal-keys.pc.in
79 #       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
80
81 install:
82 #               cp cmd.sh /opt/usr
83 #               cp ${INSTALL_ROOT}/scripts/*.sh ${INSTALL_ROOT}/opt/usr