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