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