source: subversion/applications/share/map-icons/create_makefile.sh @ 6809

Last change on this file since 6809 was 4572, checked in by joerg, 12 years ago

map-icons: add icons.xml to Makefile to be be installed

  • Property svn:executable set to *
File size: 1.8 KB
Line 
1#!/bin/bash
2# Create example for Makefile.am
3makefile="Makefile.am"
4
5echo "" >$makefile
6echo "########################################################" >>$makefile
7echo "# This Makefile is autogenerated!!!!" >>$makefile
8echo "#" >>$makefile
9echo "# to recreate it please use ./create_makefile.sh" >>$makefile
10echo "#" >>$makefile
11echo "# This Makefile is autogenerated!!!!" >>$makefile
12echo "########################################################" >>$makefile
13echo "" >>$makefile
14echo "" >>$makefile
15echo "" >>$makefile
16for theme in square.big square.small svg japan classic.small classic.big nickw ; do 
17    find $theme -type d | grep -v /.svn | sort | while read dir; do
18        # if no files in dir
19        name=${dir//-/_}
20        name=${name//\//_}
21        echo "" >>$makefile
22        echo -n $name'_DATA =' >>$makefile
23        for type in png svg ; do
24                echo $dir/*.$type | grep -q -e '\*' && continue
25                for file in $dir/*.$type; do
26                    echo -n " $file" >>$makefile
27                done
28        done
29        echo "" >>$makefile
30        echo $name'dir = $(datadir)/map-icons/'$dir >>$makefile
31    done
32    echo  >>$makefile
33done
34
35echo '' >>$makefile
36echo 'icons.xml_DATA = icons.xml' >>$makefile
37echo 'icons.xmldir = $(datadir)/map-icons/' >>$makefile
38
39echo  >>$makefile
40echo  >>$makefile
41echo "EXTRA_DIST= \\" >>$makefile
42for theme in square.big square.small svg japan classic.small classic.big nickw ; do 
43    find $theme -type d | grep -v /.svn | sort | while read dir; do
44        # if no files in dir
45        #echo $dir/*.png | grep -q -e '\*' && continue
46
47        name=${dir//-/_}
48        name=${name//\//_}
49        echo '  $('$name'_DATA)' "\\" >>$makefile
50    done
51done
52
53echo '  $(icons.xml_DATA)'  "\\">>$makefile
54echo '  CMakeLists.txt'  "\\">>$makefile
55echo '  overview.de.html'  "\\">>$makefile
56echo '  overview.en.html'  "\\">>$makefile
57echo '  README.icons'  "\\">>$makefile
58echo '  update_icons.pl'  "\\">>$makefile
59echo '  create_makefile.sh' >>$makefile
Note: See TracBrowser for help on using the repository browser.