af7326cffd8b10114b2317deb5f08a7f32f9f6e0
[synfig.git] / Makefile.am
1 # $Id$
2
3 MAINTAINERCLEANFILES = \
4         COPYING \
5         INSTALL \
6         config/ltmain.sh \
7         doxygen.cfg \
8         config/config.guess \
9         config/config.sub \
10         config/ltmain.sh \
11         config/install-sh \
12         config/mkinstalldirs \
13         config/aclocal.m4 \
14         config/missing \
15         config/texinfo.tex \
16         config/depcomp \
17         aclocal.m4 \
18         config.h.in \
19         configure \
20         stamp-h.in \
21         Makefile.in \
22         config.log \
23         config.status \
24         .doc_stamp \
25         .DS_Store
26
27 SUBDIRS = \
28         build_tools \
29         src \
30         images \
31         po
32
33 EXTRA_DIST = \
34         COPYING \
35         TODO \
36         m4/subs.m4 \
37         doxygen.cfg.in \
38         doxygen.cfg \
39         macosxbuild.sh \
40         win32build.sh \
41         win32inst.nsi.in \
42         config/package \
43         config/depcomp \
44         m4/cxx_macros.m4 \
45         m4/ETL.m4 \
46         ChangeLog.old \
47         synfigstudio.xml.in \
48         synfigstudio-thumbnailer.schemas.in
49
50
51 # Desktop entry
52 desktopdir = $(prefix)/share/applications
53 desktop_DATA = synfigstudio.desktop
54
55 # @INTLTOOL_DESKTOP_RULE@
56
57 mimedir              = $(prefix)/share/mime-info
58 mime_DATA            = synfigstudio.keys synfigstudio.mime
59
60 # Icon
61 icondir                 = $(datadir)/pixmaps
62 icon_DATA               = images/synfig_icon.png images/sif_icon.png
63
64 ACLOCAL_AMFLAGS=-I m4
65
66 GREP=grep
67 PRINTF=printf
68 SH=sh
69 DOXYGEN=doxygen
70 #SVN_REPOSITORY=@SVN_REPOSITORY@
71
72 SVN=svn
73 TAG=@PACKAGE_TARNAME@_@VERSION_MAJ@_@VERSION_MIN@_@VERSION_REV@
74
75
76 tagstable:
77         -$(SVN) delete $(SVN_REPOSITORY)/tags/stable -m "Stable Tag: Removing old tag"
78         $(SVN) copy $(top_srcdir) $(SVN_REPOSITORY)/tags/stable -m "Stable Tag: Copying everything over"
79
80 tagrelease:
81         $(SVN) copy $(top_srcdir) $(SVN_REPOSITORY)/tags/$(TAG) -m "Release $(TAG)"
82
83 ChangeLog:
84         -svn update
85         svn2cl --include-rev || touch ChangeLog
86
87 stats:
88         -@echo
89         -@echo  -- Stats
90         -@echo
91         -@$(PRINTF) "Total lines: "
92         -@wc -l $(shell find $(top_srcdir)/src -name '*.[ch]*' | $(GREP) -v libavcodec) | $(GREP) total
93         -@$(PRINTF) "Total size: "
94         -@du -hcs $(shell find $(top_srcdir)/src -name '*.[ch]*' | $(GREP) -v libavcodec) | $(GREP) total
95         -@echo 
96
97 listfixmes:
98         -@echo
99         -@echo  -- List of pending FIXMEs
100         -@echo
101         -@$(GREP) FIXME -n $(shell find $(top_srcdir) -name '*.[ch]*' | grep -v svn)
102         -@echo
103
104 listhacks:
105         -@echo
106         -@echo  -- List of pending HACKs
107         -@echo
108         -@$(GREP) HACK -n $(shell find $(top_srcdir) -name '*.[ch]*' | grep -v svn)
109         -@echo
110
111 run: check
112
113 .doc_stamp: doxygen.cfg
114         $(DOXYGEN) doxygen.cfg
115         touch .doc_stamp
116
117 package-win32: all win32inst.nsi
118         convert images/installer_logo.png bmp3:images/installer_logo.bmp
119         make -C images sif_icon.ico synfig_icon.ico
120         grep -v -e 'installer_logo' -e 'sif_icon' images/images.nsh >images/images.nsh.tmp
121         grep -v -e 'installer_logo' -e 'sif_icon' images/unimages.nsh >images/unimages.nsh.tmp
122         mv -f images/images.nsh.tmp images/images.nsh
123         mv -f images/unimages.nsh.tmp images/unimages.nsh
124         makensis win32inst.nsi
125
126 package-osx: all pkg-info/macosx/synfig-studio.info
127         [ -d pkg_root ] && $(RMDIR) pkg_root || true
128         convert images/installer_logo_osx.png $(srcdir)/pkg-info/macosx/studio-resources/background.tif
129         make install prefix="`pwd`/pkg_root"
130         $(srcdir)/config/package pkg_root pkg-info/macosx/synfig-studio.info -r $(srcdir)/pkg-info/macosx/studio-resources
131 if WIN32_PKG    
132 package: package-win32
133 else
134 if MACOSX_PKG
135 package: package-osx
136 endif
137 endif
138
139 html: .doc_stamp
140
141 rtf: .doc_stamp
142
143 docs: pdf html
144
145 .PHONY: stats tagstable tagrelease listfixmes listhacks check docs pdf html rtf