]> Pileus Git - ~andy/gtk/blob - Makefile.am
replace uses of test -e with more portable test -f
[~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         po/README.tools         \
24         po/README.translators   \
25         po/desk.pl              \
26         po/makefile.mingw       \
27         po/update.pl            \
28         po/po2tbl.sed.in        \
29         examples/aspectframe/Makefile  \
30         examples/aspectframe/aspectframe.c  \
31         examples/Makefile  \
32         examples/README.1ST  \
33         examples/extract.awk  \
34         examples/extract.sh  \
35         examples/arrow/Makefile \
36         examples/arrow/arrow.c  \
37         examples/base/Makefile  \
38         examples/base/base.c  \
39         examples/buttonbox/Makefile \
40         examples/buttonbox/buttonbox.c  \
41         examples/buttons/Makefile  \
42         examples/buttons/buttons.c  \
43         examples/buttons/info.xpm  \
44         examples/calendar/Makefile  \
45         examples/calendar/calendar.c  \
46         examples/clist/Makefile  \
47         examples/clist/clist.c  \
48         examples/entry/Makefile  \
49         examples/entry/entry.c  \
50         examples/eventbox/Makefile  \
51         examples/eventbox/eventbox.c  \
52         examples/filesel/Makefile  \
53         examples/filesel/filesel.c  \
54         examples/gtkdial/Makefile  \
55         examples/gtkdial/dial_test.c  \
56         examples/gtkdial/gtkdial.c  \
57         examples/gtkdial/gtkdial.h  \
58         examples/helloworld/Makefile  \
59         examples/helloworld/helloworld.c  \
60         examples/helloworld2/Makefile  \
61         examples/helloworld2/helloworld2.c  \
62         examples/label/Makefile \
63         examples/label/label.c  \
64         examples/list/Makefile  \
65         examples/list/list.c  \
66         examples/menu/Makefile  \
67         examples/menu/menu.c  \
68         examples/menu/itemfactory.c  \
69         examples/notebook/Makefile  \
70         examples/notebook/notebook.c  \
71         examples/packbox/Makefile  \
72         examples/packbox/packbox.c  \
73         examples/paned/Makefile  \
74         examples/paned/paned.c  \
75         examples/pixmap/Makefile  \
76         examples/pixmap/pixmap.c  \
77         examples/progressbar/Makefile  \
78         examples/progressbar/progressbar.c  \
79         examples/radiobuttons/Makefile  \
80         examples/radiobuttons/radiobuttons.c  \
81         examples/rangewidgets/Makefile  \
82         examples/rangewidgets/rangewidgets.c  \
83         examples/rulers/Makefile  \
84         examples/rulers/rulers.c  \
85         examples/scribble-simple/Makefile  \
86         examples/scribble-simple/scribble-simple.c  \
87         examples/scribble-xinput/Makefile       \
88         examples/scribble-xinput/scribble-xinput.c      \
89         examples/scrolledwin/Makefile  \
90         examples/scrolledwin/scrolledwin.c  \
91         examples/selection/Makefile  \
92         examples/selection/gettargets.c  \
93         examples/selection/setselection.c  \
94         examples/statusbar/Makefile  \
95         examples/statusbar/statusbar.c  \
96         examples/table/Makefile  \
97         examples/table/table.c  \
98         examples/text/Makefile  \
99         examples/text/text.c  \
100         examples/tictactoe/Makefile  \
101         examples/tictactoe/tictactoe.c  \
102         examples/tictactoe/tictactoe.h  \
103         examples/tictactoe/ttt_test.c  \
104         examples/tree/Makefile  \
105         examples/tree/tree.c  \
106         examples/wheelbarrow/Makefile  \
107         examples/wheelbarrow/wheelbarrow.c  \
108         examples/fixed/fixed.c  \
109         examples/fixed/Makefile  \
110         examples/frame/frame.c  \
111         examples/frame/Makefile  \
112         examples/spinbutton/spinbutton.c  \
113         examples/spinbutton/Makefile  \
114         examples/find-examples.sh
115
116 GDKTARGET=@gdktarget@
117
118 ## Copy .pc files to target-specific names
119 gtk+-$(GDKTARGET)-2.0.pc: gtk+-2.0.pc
120         rm -f gtk+-$(GDKTARGET)-2.0.pc && \
121         cp gtk+-2.0.pc gtk+-$(GDKTARGET)-2.0.pc
122
123 gdk-$(GDKTARGET)-2.0.pc: gdk-2.0.pc
124         rm -f gdk-$(GDKTARGET)-2.0.pc && \
125         cp gdk-2.0.pc gdk-$(GDKTARGET)-2.0.pc
126
127 gtk+-$(GDKTARGET)-2.0-uninstalled.pc: gtk+-2.0-uninstalled.pc
128         rm -f gtk+-$(GDKTARGET)-2.0-uninstalled.pc && \
129         cp gtk+-2.0-uninstalled.pc gtk+-$(GDKTARGET)-2.0-uninstalled.pc
130
131 gdk-$(GDKTARGET)-2.0-uninstalled.pc: gdk-2.0-uninstalled.pc
132         rm -f gdk-$(GDKTARGET)-2.0-uninstalled.pc && \
133         cp gdk-2.0-uninstalled.pc gdk-$(GDKTARGET)-2.0-uninstalled.pc
134
135 pkgconfigdir = $(libdir)/pkgconfig
136 pkgconfig_DATA= gdk-pixbuf-2.0.pc gdk-$(GDKTARGET)-2.0.pc gtk+-$(GDKTARGET)-2.0.pc
137
138 DISTCLEANFILES =                                \
139         gtk+-$(GDKTARGET)-2.0.pc                \
140         gdk-$(GDKTARGET)-2.0.pc                 \
141         gtk+-$(GDKTARGET)-2.0-uninstalled.pc    \
142         gdk-$(GDKTARGET)-2.0-uninstalled.pc
143
144 ## copy the default target for this platform to gdk-2.0.pc and gtk+-2.0.pc
145 DEFAULT_GDKTARGET=x11
146 install-data-hook:
147         (cd $(DESTDIR)$(pkgconfigdir) && \
148          test -f gdk-$(DEFAULT_GDKTARGET)-2.0.pc && \
149          test -f gtk+-$(DEFAULT_GDKTARGET)-2.0.pc && \
150          rm -f gdk-2.0.pc && cp -f gdk-$(DEFAULT_GDKTARGET)-2.0.pc gdk-2.0.pc && \
151          rm -f gtk+-2.0.pc && cp -f gtk+-$(DEFAULT_GDKTARGET)-2.0.pc gtk+-2.0.pc) || \
152         (cd $(DESTDIR)$(pkgconfigdir) && \
153          rm -f gdk-2.0.pc && cp -f gdk-$(GDKTARGET)-2.0.pc gdk-2.0.pc && \
154          rm -f gtk+-2.0.pc && cp -f gtk+-$(GDKTARGET)-2.0.pc gtk+-2.0.pc)
155
156 dist-hook: gtk+.spec
157         if test -f $(srcdir)/INSTALL.in && test -f $(srcdir)/README.in ; then \
158              CONFIG_FILES="INSTALL:$(srcdir)/INSTALL.in README:$(srcdir)/README.in" \
159              CONFIG_HEADERS= \
160              $(SHELL) config.status \
161              && cp INSTALL README $(distdir) ; \
162         fi \
163         && cp gtk+.spec $(distdir)
164
165 .PHONY: files release sanity snapshot
166
167 files:
168         @files=`ls $(DISTFILES) 2> /dev/null `; for p in $$files; do \
169           echo $$p; \
170         done
171         @for subdir in $(SUBDIRS); do \
172           files=`cd $$subdir; $(MAKE) files | grep -v "make\[[1-9]\]"`; \
173           for file in $$files; do \
174             echo $$subdir/$$file; \
175           done; \
176         done
177
178 release:
179         rm -rf .deps */.deps
180         $(MAKE) distcheck
181
182 sanity:
183         ./sanity_check $(VERSION)
184
185
186 snapshot:
187         $(MAKE) dist distdir=$(PACKAGE)-snap`date +"%Y%m%d"`