Added vconf value for data usage in wearable Settings App.
[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 ($(model), )
23 xsltopt=--stringparam target $(MODEL)
24 else
25 xsltopt=--stringparam target ''
26 endif
27 init:
28         @mkdir -p report
29         @mkdir -p scripts
30         @mkdir -p include
31         @find scripts -name "*.sh" -exec rm {} \;
32         @find data -name "*.sh" -exec rm {} \;
33
34 #       if [ -a ./scripts/all.sh ]; \
35 #       then \
36 #               rm ./scripts/all.sh; \
37 #       fi;
38         cp all.sh.in ./scripts/all.sh
39
40 %.html:%.xml
41         xsltproc $(xsltopt) test_report.xsl $< > $@
42         mv $@ ./report
43
44 %.sh:%.xml
45         xsltproc $(xsltopt) create_cmd.xsl $< | sed '/^$$/d' > $@
46         cat $@ >> ./scripts/all.sh
47         rm $@
48         xsltproc $(xsltopt) create_init_script.xsl $< | sed '/^$$/d' > $@
49         if [ -s $@ ]; then mv $@ ./scripts; fi
50
51
52 #%.sh2:%.xml
53 #       xsltproc $(xsltopt) create_init_script.xsl $< | sed '/^$$/d' > $@
54 #       if [ -s $@ ]; then mv $@ ./scripts; fi
55
56
57 %.h:%.xml
58         xsltproc $(xsltopt) create_header.xsl $< | sed '/^$$/d' > $@
59         mv $@ ./include
60
61 #%_wrapper.h:%.xml
62 #       xsltproc $(xsltopt) create_wrapper.xsl $< | sed '/^$$/d'  > $@
63 #       xsltproc $(xsltopt) create_wrapper.xsl $< | sed '/^$$/d'   > $@
64 #       mv $@ ./include
65
66 #%_wrapper.c:%.xml
67 #       xsltproc $(xsltopt) create_wrapper.xsl $< | sed '/^$$/d' | indent   > $@
68 #       xsltproc $(xsltopt) create_wrapper_impl.xsl $< | sed '/^$$/d'   > $@
69 #       sed -i '21 i #include \<vconf.h\>' $@
70 #       sed -i '22 i #include "vconf-internal-keys.h"' $@
71 #       sed -i '23i\\' $@
72 #       mv $@ ./wrapper
73
74 vconf-internal-keys.h:
75         echo "#ifndef __VCONF_INTERNAL_KEYS_H__" > include/vconf-internal-keys.h
76         echo "#define __VCONF_INTERNAL_KEYS_H__" >> include/vconf-internal-keys.h
77         find ./include -name "*.h" -not -name "vconf-internal-keys.h" -printf "#include \"%f\" \n" | sort >> include/vconf-internal-keys.h
78         echo "#endif            /* __VCONF_INTERNAL_KEYS_H__ */" >> include/vconf-internal-keys.h
79
80 clean:
81         #@rm -rf report scripts include *.pc
82         @rm -rf report scripts include
83         @find . -name "*.html" -print0 | xargs -0 -r rm
84         @rm data/vconf-*.sh
85         @find . -name "*.h" -print0 | xargs -0 -r rm
86
87 endproc:
88         ./remove_whitespace.sh
89
90 #vconf-internal-keys.pc:vconf-internal-keys.pc.in
91 #       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
92
93 install:
94 #               cp cmd.sh /opt/usr
95 #               cp ${INSTALL_ROOT}/scripts/*.sh ${INSTALL_ROOT}/opt/usr