~dobey/nwnights/trunk

« back to all changes in this revision

Viewing changes to Makefile.am

  • Committer: Rodney Dawes
  • Date: 2009-03-22 19:04:23 UTC
  • Revision ID: dobey@gnome.org-20090322190423-4jvz8ek1h81cordd
        Ignore some more files
        Add Makefile rules to render and distribute the generated PNG files
        Specify some needed variables in the configure script

Show diffs side-by-side

added added

removed removed

Lines of Context:
2
2
 
3
3
SUBDIRS = libnwntranslate po
4
4
 
 
5
icon_in_files = nwnights.svg
 
6
icon_cache = $(icon_in_files:.svg=.rendercache)
 
7
icon_files = $(shell BUILDDIR="$(builddir)"; for i in `find $$BUILDDIR -name "*.rendercache"`; do cat $$i; done)
 
8
 
5
9
desktopdir = $(datadir)/applications
6
10
desktop_in_files = nwnights.desktop.in
7
11
desktop_DATA = $(desktop_in_files:.desktop.in=.desktop)
14
18
        sed -e "s|\@NWNIGHTS_DATADIR\@|$(datadir)/games/nwnights|g" < $< > $@
15
19
        chmod +x $@
16
20
 
 
21
%.rendercache: %.svg
 
22
        for size in $(render_sizes); do \
 
23
                $(ICON_RENDER) -s $$size -o $(top_builddir) $< > $@; \
 
24
        done
 
25
 
 
26
dist-hook: $(icon_cache)
 
27
        for size in $(render_sizes); do \
 
28
                cp -a $(top_builddir)/$$size $(top_distdir)/$$size; \
 
29
        done
 
30
 
 
31
install-data-local:
 
32
        for size in $(render_sizes); do \
 
33
                for dir in `if [ -d $(top_srcdir)/$$size ]; then find $(top_srcdir)/$$size/* -type d; fi`; do \
 
34
                        for file in $(icon_files); do \
 
35
                                context="`dirname $$file`"; \
 
36
                                $(mkdir_p) $(DESTDIR)$(themedir)/$$size/$$context; \
 
37
                                $(install_sh_DATA) $(top_srcdir)/$$size/$$file $(DESTDIR)$(themedir)/$$size/$$file; \
 
38
                        done; \
 
39
                done; \
 
40
        done
 
41
 
 
42
uninstall-local:
 
43
        for size in $(render_sizes); do \
 
44
                for dir in `if [ -d $(top_srcdir)/$$size ]; then find $(top_srcdir)/$$size/* -type d; fi`; do \
 
45
                        for file in $(icon_files); do \
 
46
                                rm -f $(DESTDIR)$(themedir)/$$size/$$file; \
 
47
                        done; \
 
48
                done; \
 
49
        done
 
50
 
 
51
all: $(icon_cache)
 
52
$(render_sizes): $(icon_cache)
 
53
 
17
54
EXTRA_DIST =                    \
18
55
        nwnights.in             \
 
56
        $(icon_in_files)        \
 
57
        $(icon_cache)           \
19
58
        $(desktop_in_files)
20
59
 
21
60
CLEANFILES =            \
22
61
        $(bin_SCRIPTS)  \
23
62
        $(desktop_DATA)
24
63
 
25
 
MAINTAINERCLEANFILES =          \
 
64
MAINTAINERCLEANFILES =                  \
 
65
        $(icon_cache)                   \
26
66
        Makefile.in                     \
27
67
        aclocal.m4                      \
28
68
        config.guess                    \