]> Pileus Git - ~andy/gtk/blob - Makefile.am
Don't distribute gtk-zip.sh, but do distribute gtk-zip.sh.in.
[~andy/gtk] / Makefile.am
1 ## Makefile.am for GTK+
2
3 SRC_SUBDIRS = gdk-pixbuf gdk gtk modules demos tests contrib
4 SUBDIRS = po $(SRC_SUBDIRS) docs build m4macros
5
6 # require automake 1.4
7 AUTOMAKE_OPTIONS = 1.4
8
9 EXTRA_DIST =                    \
10         HACKING                 \
11         gtk+.spec.in            \
12         makecopyright           \
13         NEWS.pre-1-0            \
14         ChangeLog.pre-1-0       \
15         ChangeLog.pre-1-2       \
16         ChangeLog.pre-2-0       \
17         README.cvs-commits      \
18         README.win32            \
19         config.h.win32          \
20         gtk-zip.sh.in           \
21         sanitize-la.sh          \
22         po/README.translators   \
23         po/makefile.mingw       \
24         po/po2tbl.sed.in        \
25         examples/aspectframe/Makefile  \
26         examples/aspectframe/aspectframe.c  \
27         examples/Makefile  \
28         examples/README.1ST  \
29         examples/extract.awk  \
30         examples/extract.sh  \
31         examples/arrow/Makefile \
32         examples/arrow/arrow.c  \
33         examples/base/Makefile  \
34         examples/base/base.c  \
35         examples/buttonbox/Makefile \
36         examples/buttonbox/buttonbox.c  \
37         examples/buttons/Makefile  \
38         examples/buttons/buttons.c  \
39         examples/buttons/info.xpm  \
40         examples/calendar/Makefile  \
41         examples/calendar/calendar.c  \
42         examples/clist/Makefile  \
43         examples/clist/clist.c  \
44         examples/entry/Makefile  \
45         examples/entry/entry.c  \
46         examples/eventbox/Makefile  \
47         examples/eventbox/eventbox.c  \
48         examples/filesel/Makefile  \
49         examples/filesel/filesel.c  \
50         examples/gtkdial/Makefile  \
51         examples/gtkdial/dial_test.c  \
52         examples/gtkdial/gtkdial.c  \
53         examples/gtkdial/gtkdial.h  \
54         examples/helloworld/Makefile  \
55         examples/helloworld/helloworld.c  \
56         examples/helloworld2/Makefile  \
57         examples/helloworld2/helloworld2.c  \
58         examples/label/Makefile \
59         examples/label/label.c  \
60         examples/list/Makefile  \
61         examples/list/list.c  \
62         examples/menu/Makefile  \
63         examples/menu/menu.c  \
64         examples/menu/itemfactory.c  \
65         examples/notebook/Makefile  \
66         examples/notebook/notebook.c  \
67         examples/packbox/Makefile  \
68         examples/packbox/packbox.c  \
69         examples/paned/Makefile  \
70         examples/paned/paned.c  \
71         examples/pixmap/Makefile  \
72         examples/pixmap/pixmap.c  \
73         examples/progressbar/Makefile  \
74         examples/progressbar/progressbar.c  \
75         examples/radiobuttons/Makefile  \
76         examples/radiobuttons/radiobuttons.c  \
77         examples/rangewidgets/Makefile  \
78         examples/rangewidgets/rangewidgets.c  \
79         examples/rulers/Makefile  \
80         examples/rulers/rulers.c  \
81         examples/scribble-simple/Makefile  \
82         examples/scribble-simple/scribble-simple.c  \
83         examples/scribble-xinput/Makefile       \
84         examples/scribble-xinput/scribble-xinput.c      \
85         examples/scrolledwin/Makefile  \
86         examples/scrolledwin/scrolledwin.c  \
87         examples/selection/Makefile  \
88         examples/selection/gettargets.c  \
89         examples/selection/setselection.c  \
90         examples/statusbar/Makefile  \
91         examples/statusbar/statusbar.c  \
92         examples/table/Makefile  \
93         examples/table/table.c  \
94         examples/text/Makefile  \
95         examples/text/text.c  \
96         examples/tictactoe/Makefile  \
97         examples/tictactoe/tictactoe.c  \
98         examples/tictactoe/tictactoe.h  \
99         examples/tictactoe/ttt_test.c  \
100         examples/tree/Makefile  \
101         examples/tree/tree.c  \
102         examples/wheelbarrow/Makefile  \
103         examples/wheelbarrow/wheelbarrow.c  \
104         examples/fixed/fixed.c  \
105         examples/fixed/Makefile  \
106         examples/frame/frame.c  \
107         examples/frame/Makefile  \
108         examples/spinbutton/spinbutton.c  \
109         examples/spinbutton/Makefile  \
110         examples/find-examples.sh
111
112 GDKTARGET=@gdktarget@
113
114 ## Copy .pc files to target-specific names
115 gtk+-$(GDKTARGET)-2.0.pc: gtk+-2.0.pc
116         rm -f gtk+-$(GDKTARGET)-2.0.pc && \
117         cp gtk+-2.0.pc gtk+-$(GDKTARGET)-2.0.pc
118
119 gdk-$(GDKTARGET)-2.0.pc: gdk-2.0.pc
120         rm -f gdk-$(GDKTARGET)-2.0.pc && \
121         cp gdk-2.0.pc gdk-$(GDKTARGET)-2.0.pc
122
123 gtk+-$(GDKTARGET)-2.0-uninstalled.pc: gtk+-2.0-uninstalled.pc
124         rm -f gtk+-$(GDKTARGET)-2.0-uninstalled.pc && \
125         cp gtk+-2.0-uninstalled.pc gtk+-$(GDKTARGET)-2.0-uninstalled.pc
126
127 gdk-$(GDKTARGET)-2.0-uninstalled.pc: gdk-2.0-uninstalled.pc
128         rm -f gdk-$(GDKTARGET)-2.0-uninstalled.pc && \
129         cp gdk-2.0-uninstalled.pc gdk-$(GDKTARGET)-2.0-uninstalled.pc
130
131 pkgconfigdir = $(libdir)/pkgconfig
132 pkgconfig_DATA= gdk-pixbuf-2.0.pc gdk-$(GDKTARGET)-2.0.pc gtk+-$(GDKTARGET)-2.0.pc
133
134 DISTCLEANFILES =                                \
135         gtk+-$(GDKTARGET)-2.0.pc                \
136         gdk-$(GDKTARGET)-2.0.pc                 \
137         gtk+-$(GDKTARGET)-2.0-uninstalled.pc    \
138         gdk-$(GDKTARGET)-2.0-uninstalled.pc
139
140 ## copy the default target for this platform to gdk-2.0.pc and gtk+-2.0.pc
141 DEFAULT_GDKTARGET=x11
142 install-data-hook:
143         (cd $(DESTDIR)$(pkgconfigdir) && \
144          test -f gdk-$(DEFAULT_GDKTARGET)-2.0.pc && \
145          test -f gtk+-$(DEFAULT_GDKTARGET)-2.0.pc && \
146          rm -f gdk-2.0.pc && cp -f gdk-$(DEFAULT_GDKTARGET)-2.0.pc gdk-2.0.pc && \
147          rm -f gtk+-2.0.pc && cp -f gtk+-$(DEFAULT_GDKTARGET)-2.0.pc gtk+-2.0.pc) || \
148         (cd $(DESTDIR)$(pkgconfigdir) && \
149          rm -f gdk-2.0.pc && cp -f gdk-$(GDKTARGET)-2.0.pc gdk-2.0.pc && \
150          rm -f gtk+-2.0.pc && cp -f gtk+-$(GDKTARGET)-2.0.pc gtk+-2.0.pc)
151
152 dist-hook: gtk+.spec
153         if test -f $(srcdir)/INSTALL.in && test -f $(srcdir)/README.in ; then \
154              CONFIG_FILES="INSTALL:$(srcdir)/INSTALL.in README:$(srcdir)/README.in" \
155              CONFIG_HEADERS= \
156              $(SHELL) config.status \
157              && cp INSTALL README $(distdir) ; \
158         fi \
159         && cp gtk+.spec $(distdir)
160
161 .PHONY: files release sanity snapshot
162
163 files:
164         @files=`ls $(DISTFILES) 2> /dev/null `; for p in $$files; do \
165           echo $$p; \
166         done
167         @for subdir in $(SUBDIRS); do \
168           files=`cd $$subdir; $(MAKE) files | grep -v "make\[[1-9]\]"`; \
169           for file in $$files; do \
170             echo $$subdir/$$file; \
171           done; \
172         done
173
174 release:
175         rm -rf .deps */.deps
176         $(MAKE) distcheck
177
178 sanity:
179         ./sanity_check $(VERSION)
180
181
182 snapshot:
183         $(MAKE) dist distdir=$(PACKAGE)-snap`date +"%Y%m%d"`
184
185
186 # This is a version of the automake-1.4 distcheck rule modified
187 # to pass --enable-gtk-doc to ./configure
188 #
189 mydistcheck: dist
190         -rm -rf $(distdir)
191         GZIP=$(GZIP_ENV) $(TAR) zxf $(distdir).tar.gz
192         mkdir $(distdir)/=build
193         mkdir $(distdir)/=inst
194         dc_install_base=`cd $(distdir)/=inst && pwd`; \
195         cd $(distdir)/=build \
196           && ../configure --srcdir=.. --prefix=$$dc_install_base --enable-gtk-doc \
197           && $(MAKE) $(AM_MAKEFLAGS) \
198           && $(MAKE) $(AM_MAKEFLAGS) dvi \
199           && $(MAKE) $(AM_MAKEFLAGS) check \
200           && $(MAKE) $(AM_MAKEFLAGS) install \
201           && $(MAKE) $(AM_MAKEFLAGS) installcheck \
202           && $(MAKE) $(AM_MAKEFLAGS) dist
203         -rm -rf $(distdir)
204         @banner="$(distdir).tar.gz is ready for distribution"; \
205         dashes=`echo "$$banner" | sed s/./=/g`; \
206         echo "$$dashes"; \
207         echo "$$banner"; \
208         echo "$$dashes"