Mercurial > pidgin.yaz
comparison Makefile.am @ 28012:cc8f641d2fde
Add the MTN revision in the Pidgin About and finch --version dialogs.
Main idea taken from monotone's own hook, but I left out the full revision
stuff for now.
author | Elliott Sales de Andrade <qulogic@pidgin.im> |
---|---|
date | Sat, 25 Jul 2009 06:49:18 +0000 |
parents | 4b8c4870b13a |
children | 558ce0b09e0e |
comparison
equal
deleted
inserted
replaced
28007:ed3184cc557d | 28012:cc8f641d2fde |
---|---|
14 gaim.pc.in \ | 14 gaim.pc.in \ |
15 gaim-uninstalled.pc.in \ | 15 gaim-uninstalled.pc.in \ |
16 intltool-extract.in \ | 16 intltool-extract.in \ |
17 intltool-merge.in \ | 17 intltool-merge.in \ |
18 intltool-update.in \ | 18 intltool-update.in \ |
19 package_revision.h \ | |
19 pidgin.apspec.in \ | 20 pidgin.apspec.in \ |
20 pidgin.spec.in \ | 21 pidgin.spec.in \ |
21 pidgin.desktop.in \ | 22 pidgin.desktop.in \ |
22 po/Makefile.mingw \ | 23 po/Makefile.mingw \ |
23 valgrind-suppressions | 24 valgrind-suppressions |
24 | 25 |
25 noinst_HEADERS = config.h | 26 noinst_HEADERS = config.h package_revision.h |
26 | 27 |
27 dist-hook: pidgin.spec | 28 dist-hook: pidgin.spec |
28 cp pidgin.spec $(distdir) | 29 cp pidgin.spec $(distdir) |
29 rm $(distdir)/config.h | 30 rm $(distdir)/config.h |
30 | 31 |
84 | 85 |
85 if INSTALL_I18N | 86 if INSTALL_I18N |
86 PO_DIR=po | 87 PO_DIR=po |
87 endif | 88 endif |
88 | 89 |
89 SUBDIRS = libpurple doc $(GNT_DIR) $(GTK_DIR) m4macros $(PO_DIR) share/ca-certs share/sounds | 90 # This is phony, so that we always try to rebuild it. If it succeeds |
91 # in calculating changes, it produces its target; otherwise, its | |
92 # target does not exist. | |
93 .PHONY: package_revision_raw.txt | |
94 # if both attempts fail, then we need to remove the empty file that > | |
95 # creates, and also make sure that the shell command exits | |
96 # successfully; the rm -f ensures both | |
97 package_revision_raw.txt: | |
98 REAL_BLDDIR=$$PWD/$(top_builddir); \ | |
99 (cd $(srcdir) && $$REAL_BLDDIR/mtn --root=. automate get_base_revision_id) 2>/dev/null >$@ \ | |
100 || (cd $(srcdir) && mtn --root=. automate get_base_revision_id) 2>/dev/null >$@ \ | |
101 || rm -f $@ | |
102 package_revision.h: package_revision_raw.txt | |
103 if [ -f $< ]; then \ | |
104 sed 's/^\(.\+\)$$/#define REVISION "\1"/' $< > $@; \ | |
105 fi | |
106 if [ ! -f $@ -a -f $(srcdir)/$@ ]; then \ | |
107 cp $(srcdir)/$@ $@; \ | |
108 fi | |
109 [ -f $@ ] || echo "#define REVISION \"unknown\"" > $@ | |
110 | |
111 # This is a magic directive copy-and-pasted, then modified, from the | |
112 # automake 1.9 manual, section 13.4, "Checking the distribution". | |
113 # Normally, 'distcheck' does a clean build, and then afterwards runs | |
114 # 'distclean', and 'distclean' is supposed to remove everything that | |
115 # the build created. However, we have some targets (package_revision.txt) | |
116 # that we distribute, but then always attempt to rebuild optimistically, and | |
117 # then if that fails fall back on the distributed versions. This | |
118 # means that 'distclean' should _not_ remove those files, since they | |
119 # are distributed, yet building the package will generate those files, | |
120 # thus automake thinks that 'distclean' _should_ remove those files, | |
121 # and 'distcheck' gets cranky if we don't. So basically what this | |
122 # line does is tell 'distcheck' to shut up and ignore those two files. | |
123 distcleancheck_listfiles = find . -type f -a ! -name package_revision.h | |
124 | |
125 SUBDIRS = . libpurple doc $(GNT_DIR) $(GTK_DIR) m4macros $(PO_DIR) share/ca-certs share/sounds | |
90 | 126 |
91 docs: Doxyfile | 127 docs: Doxyfile |
92 if HAVE_DOXYGEN | 128 if HAVE_DOXYGEN |
93 @echo "Running doxygen..." | 129 @echo "Running doxygen..." |
94 @doxygen | 130 @doxygen |