[SOFTAP] Add vconf key for softap
[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
7 allcmd: $(shell find . -name "*.xml" | sed 's/xml/sh/')
8 allheader: $(shell find . -name "*.xml" | sed 's/xml/h/')
9 allhtml: $(shell find . -name "*.xml" | sed 's/xml/html/')
10 #allwrapper: $(shell find . -name "*.xml" | sed 's/.xml/_wrapper.h/')
11 #allwrapper_impl: $(shell find . -name "*.xml" | sed 's/.xml/_wrapper.c/')
12
13 MODEL=$(model)
14 XMLS=$(wildcard data/*.xml)
15
16 check:
17         echo $(XMLS)
18         $(foreach var, $(XMLS), xmllint --noout --schema check.xsd $(var);)
19
20 init:
21         @mkdir -p report
22         @mkdir -p scripts
23         @mkdir -p include
24 #       @rm scripts/*.sh
25 #       @rm scripts/all.sh
26 #       @rm scripts/product.sh
27 #       @rm scripts/default.sh
28
29 %.html:%.xml
30         xsltproc test_report.xsl $< > $@
31         mv $@ ./report
32
33 %.sh:%.xml
34         xsltproc create_cmd.xsl $< | sed '/^$$/d' > $@
35         cat $@ >> ./scripts/all.sh
36         rm $@
37
38 postproc:
39         sed -i 's/^ *//' ./scripts/all.sh
40         grep . ./scripts/all.sh | grep "^#default" > scripts/default.sh
41 ifneq ($(model), )
42         grep . ./scripts/all.sh | egrep "^#$(MODEL) " > scripts/product.sh || true
43         awk '{ print $$7 }'  ./scripts/product.sh | sed 's/\//\\\//g' > scripts/duplicate.list
44         @while read -r str ; \
45         do \
46                 echo "-----------------------------------------------------" $$str; \
47                 echo sed --in-place "/$$str/d" ./scripts/default.sh; \
48                 sed --in-place "/$$str/d" ./scripts/default.sh; \
49         done < ./scripts/duplicate.list
50         cut -d ' ' -f2- ./scripts/product.sh > temp && mv temp ./scripts/product.sh
51         sed -i '1 i #!/bin/bash' ./scripts/product.sh
52 endif
53         cut -d ' ' -f2- ./scripts/default.sh > temp && mv temp ./scripts/default.sh
54         sed -i '1 i #!/bin/bash' ./scripts/default.sh
55         rm ./scripts/all.sh
56
57 %.h:%.xml
58 #       xsltproc create_header.xsl $< | sed '/^$$/d' | indent   > $@
59         xsltproc create_header.xsl $< | sed '/^$$/d' > $@
60         mv $@ ./include
61
62 #%_wrapper.h:%.xml
63 #       xsltproc create_wrapper.xsl $< | sed '/^$$/d' | indent   > $@
64 #       xsltproc create_wrapper.xsl $< | sed '/^$$/d'   > $@
65 #       mv $@ ./include
66
67 #%_wrapper.c:%.xml
68 #       xsltproc create_wrapper.xsl $< | sed '/^$$/d' | indent   > $@
69 #       xsltproc create_wrapper_impl.xsl $< | sed '/^$$/d'   > $@
70 #       sed -i '21 i #include \<vconf.h\>' $@
71 #       sed -i '22 i #include "vconf-internal-keys.h"' $@
72 #       sed -i '23i\\' $@
73 #       mv $@ ./wrapper
74
75 vconf-internal-keys.h:
76         echo "#ifndef __VCONF_INTERNAL_KEYS_H__" > include/vconf-internal-keys.h
77         echo "#define __VCONF_INTERNAL_KEYS_H__" >> include/vconf-internal-keys.h
78         find ./include -name "*.h" -not -name "vconf-internal-keys.h" -printf "#include \"%f\" \n" | sort >> include/vconf-internal-keys.h
79         echo "#endif            /* __VCONF_INTERNAL_KEYS_H__ */" >> include/vconf-internal-keys.h
80
81 clean:
82         #@rm -rf report scripts include *.pc
83         @rm -rf report scripts include
84         @find . -name "*.html" | xargs rm 
85         @find . -name "*.sh" | xargs rm 
86         @find . -name "*.h" | xargs rm 
87
88 endproc:
89         ./remove_whitespace.sh
90
91 #vconf-internal-keys.pc:vconf-internal-keys.pc.in
92 #       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
93
94 install:
95 #               cp cmd.sh /opt/usr
96 #               cp ${INSTALL_ROOT}/scripts/*.sh ${INSTALL_ROOT}/opt/usr