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

Last change on this file since 4570 was 4569, checked in by joerg, 13 years ago

map-icons: expand Makefile, so we will no longer need wildcard, since
this only works on GNU make systems

  • Property svn:executable set to *
File size: 1.7 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  >>$makefile
37echo "EXTRA_DIST= \\" >>$makefile
38for theme in square.big square.small svg japan classic.small classic.big nickw ; do 
39    find $theme -type d | grep -v /.svn | sort | while read dir; do
40        # if no files in dir
41        #echo $dir/*.png | grep -q -e '\*' && continue
42
43        name=${dir//-/_}
44        name=${name//\//_}
45        echo '  $('$name'_DATA)' "\\" >>$makefile
46    done
47done
48
49echo '  CMakeLists.txt'  "\\">>$makefile
50echo '  icons.xml'  "\\">>$makefile
51echo '  overview.de.html'  "\\">>$makefile
52echo '  overview.en.html'  "\\">>$makefile
53echo '  README.icons'  "\\">>$makefile
54echo '  update_icons.pl'  "\\">>$makefile
55echo '  create_makefile.sh' >>$makefile
Note: See TracBrowser for help on using the repository browser.