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