| 1 |
## Process this file with automake to produce Makefile.in |
| 2 |
## Copyright (C) 2000-2004 Roger Leigh |
| 3 |
## |
| 4 |
## This program is free software; you can redistribute it and/or modify |
| 5 |
## it under the terms of the GNU General Public License as published by |
| 6 |
## the Free Software Foundation; either version 2, or (at your option) |
| 7 |
## any later version. |
| 8 |
## |
| 9 |
## This program is distributed in the hope that it will be useful, |
| 10 |
## but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 11 |
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 12 |
## GNU General Public License for more details. |
| 13 |
## |
| 14 |
## You should have received a copy of the GNU General Public License |
| 15 |
## along with this program. If not, see <https://www.gnu.org/licenses/>. |
| 16 |
|
| 17 |
## Process this file with automake to produce Makefile.in. |
| 18 |
|
| 19 |
@SET_MAKE@ |
| 20 |
|
| 21 |
ACLOCAL_AMFLAGS = -I m4 -I m4local |
| 22 |
|
| 23 |
include $(top_srcdir)/scripts/global.mk |
| 24 |
|
| 25 |
|
| 26 |
## Variables |
| 27 |
|
| 28 |
BUILT_SOURCES = src/xml/xmli18n-tmp.h |
| 29 |
SUBDIRS = include src samples test po man doc scripts |
| 30 |
DISTDIRS = m4 m4extra |
| 31 |
CONFIGSUMMARYDIR=$(pkglibdir)/@GUTENPRINT_MAJOR_VERSION@.@GUTENPRINT_MINOR_VERSION@ |
| 32 |
|
| 33 |
docdir = $(datadir)/$(PACKAGE)/doc |
| 34 |
|
| 35 |
src/xml/xmli18n-tmp.h: |
| 36 |
$(MAKE) -C src/xml |
| 37 |
|
| 38 |
## Rules |
| 39 |
|
| 40 |
# Libtool dependency |
| 41 |
libtool: $(LIBTOOL_DEPS) |
| 42 |
cd $(srcdir); \ |
| 43 |
$(SHELL) ./config.status --recheck |
| 44 |
|
| 45 |
# Don't list ChangeLog as a dependency here because it forces network |
| 46 |
# access, and because it usually runs as superuser rather than the user |
| 47 |
# who normally builds Gutenprint. |
| 48 |
# Don't list config.summary either because it's generated by configure. |
| 49 |
install-data-local: NEWS AUTHORS COPYING README |
| 50 |
$(MKDIR_P) $(DESTDIR)$(docdir) |
| 51 |
$(INSTALL_DATA) $(srcdir)/NEWS $(DESTDIR)$(docdir) |
| 52 |
$(INSTALL_DATA) $(srcdir)/ChangeLog $(DESTDIR)$(docdir) |
| 53 |
$(INSTALL_DATA) $(srcdir)/AUTHORS $(DESTDIR)$(docdir) |
| 54 |
$(INSTALL_DATA) $(srcdir)/COPYING $(DESTDIR)$(docdir) |
| 55 |
$(INSTALL_DATA) $(srcdir)/README $(DESTDIR)$(docdir) |
| 56 |
$(MKDIR_P) $(DESTDIR)$(CONFIGSUMMARYDIR) |
| 57 |
$(INSTALL_DATA) config.summary $(DESTDIR)$(CONFIGSUMMARYDIR) |
| 58 |
|
| 59 |
# git log is local, so it's fast enough that we don't need to |
| 60 |
# engage in any subterfuge like we did with CVS. It's really fast |
| 61 |
# when we use a static file from the pre-Git era (since there are no |
| 62 |
# live branches from that time) to save a lot of diffs. |
| 63 |
|
| 64 |
# This isn't really the right spot for these checks. |
| 65 |
# It's perfectly legal to update the change log even if NEWS |
| 66 |
# or configure is out of date. But it greatly reduces build spew |
| 67 |
# to do it here, and manually updating the changelog is not a |
| 68 |
# normal thing to do. |
| 69 |
ChangeLog: dist-time-check dist-news-check |
| 70 |
if [ -d .git -a -f ChangeLog.pre-5.2.11 ] ; then \ |
| 71 |
$(MAKE) -C scripts mkgitlog; \ |
| 72 |
scripts/mkgitlog -i ChangeLog.pre-5.2.11 -r gutenprint-5_2_11 > ChangeLog; \ |
| 73 |
fi |
| 74 |
|
| 75 |
dist: src/xml/xmli18n-tmp.h |
| 76 |
|
| 77 |
dist-time-check: |
| 78 |
@if [ "$(top_srcdir)/configure" -ot "$(top_srcdir)/configure.ac" ] ; then \ |
| 79 |
echo 1>&2; \ |
| 80 |
echo "****************************************************************" 1>&2; \ |
| 81 |
echo "*** configure is out of date (older than configure.ac) -- rerun ./autogen.sh first!" 1>&2; \ |
| 82 |
echo "****************************************************************" 1>&2; \ |
| 83 |
echo 1>&2; \ |
| 84 |
exit 1; \ |
| 85 |
fi |
| 86 |
|
| 87 |
# This would normally be done by AM_INIT_AUTOMAKE. However, |
| 88 |
# we don't want to do this if we're building a snapshot, because |
| 89 |
# we don't want to update the NEWS file for each snapshot and |
| 90 |
# there's no convenient way I've found to conditionalize the |
| 91 |
# automake options. |
| 92 |
dist-news-check: |
| 93 |
@if [ "$$STP_BUILD_SNAPSHOT" = "" ] ; then \ |
| 94 |
case "`sed 15q $(srcdir)/NEWS`" in \ |
| 95 |
*$(VERSION)*) : ;; \ |
| 96 |
*) \ |
| 97 |
echo 1>&2; \ |
| 98 |
echo "****************************************************************" 1>&2; \ |
| 99 |
echo "*** NEWS not updated to $(VERSION); not releasing" 1>&2; \ |
| 100 |
echo "****************************************************************" 1>&2; \ |
| 101 |
echo 1>&2; \ |
| 102 |
exit 1; \ |
| 103 |
esac ; \ |
| 104 |
fi |
| 105 |
|
| 106 |
git-version-stamp: |
| 107 |
if [ -d .git ] ; then scripts/gversion > /dev/null; fi |
| 108 |
|
| 109 |
dist-hook: dist-time-check dist-news-check git-version-stamp |
| 110 |
for dir in $(DISTDIRS) ; do \ |
| 111 |
if test -d $(srcdir)/$$dir ; then \ |
| 112 |
mkdir $(distdir)/$$dir; \ |
| 113 |
for dirfile in $(srcdir)/$$dir/*; do \ |
| 114 |
if test -f $$dirfile ; then \ |
| 115 |
cp -p $$dirfile $(distdir)/$$dir; \ |
| 116 |
fi \ |
| 117 |
done \ |
| 118 |
fi \ |
| 119 |
done |
| 120 |
# Remove any backup files found in distdir |
| 121 |
$(FIND) $(distdir) -name '.*' -print | xargs $(RM) -rf |
| 122 |
$(FIND) $(distdir) -name '#*' -print | xargs $(RM) -rf |
| 123 |
$(FIND) $(distdir) -name '*~' -print | xargs $(RM) -rf |
| 124 |
|
| 125 |
snapshot: scripts/gversion git-version-stamp |
| 126 |
$(MAKE) dist distdir=$(PACKAGE)-$(VERSION)-`date +"%Y%m%d%H%M%S"` |
| 127 |
|
| 128 |
################################################################# |
| 129 |
# TESTING # |
| 130 |
################################################################# |
| 131 |
|
| 132 |
CPUS=`scripts/count-cpus` |
| 133 |
|
| 134 |
# STP_PROFILE=full |
| 135 |
MAKECHECK=STP_TEST_SUITE=1 /usr/bin/time $(MAKE) -k -s -j$(CPUS) DISTCHECK_CONFIGURE_FLAGS=NO_PKGCONFIG_PATHS=1 check |
| 136 |
MAKEDISTCHECK=STP_TEST_SUITE=1 STP_TEST_DIST=1 /usr/bin/time $(MAKE) -k -s -j$(CPUS) DISTCHECK_CONFIGURE_FLAGS=NO_PKGCONFIG_PATHS=1 distcheck |
| 137 |
MAKECHECK_PARALLEL=STP_PARALLEL=$(CPUS) $(MAKECHECK) |
| 138 |
MAKEDISTCHECK_PARALLEL=STP_PARALLEL=$(CPUS) $(MAKEDISTCHECK) |
| 139 |
|
| 140 |
# ...but we can't do |
| 141 |
# AM_TESTS_ENVIRONMENT=STP_PARALLEL=$(shell scripts/count-cpus) |
| 142 |
# because $(shell...) is (still only) a GNU extension, which we |
| 143 |
# want to avoid. And we can't do |
| 144 |
# AM_TESTS_ENVIRONMENT=STP_PARALLEL=`scripts/count-cpus` |
| 145 |
# because all expansions are lazy, so anything not in the root directory |
| 146 |
# won't find the script. And we can't even do |
| 147 |
# AM_TESTS_ENVIRONMENT=STP_PARALLEL=`(at)TOP_BUILDDIR(at)scripts/count-cpus` |
| 148 |
# because TOP_BUILDDIR itself is a relative path. And, just to make it |
| 149 |
# even more fun, we won't be able to do |
| 150 |
# AM_TESTS_ENVIRONMENT!= |
| 151 |
# syntax even if POSIX approves it because it's only present in GNU make 4, |
| 152 |
# but Apple doesn't use that. |
| 153 |
|
| 154 |
# check-%: is a GNU make extension, so we have to explicitly list the targets |
| 155 |
# of interest. Bah humbug. |
| 156 |
|
| 157 |
CHECK_TARGETS=check-parallel check-minimal check-fast check-full |
| 158 |
CHECK_VALGRIND_TARGETS=check-valgrind check-valgrind-minimal check-valgrind-fast |
| 159 |
|
| 160 |
$(CHECK_TARGETS) $(CHECK_VALGRIND_TARGETS): |
| 161 |
STP_TEST_PROFILE=`echo $@ |sed -e s/check-// -e s/-/_/g -e s/parallel//` $(MAKECHECK_PARALLEL) |
| 162 |
|
| 163 |
|
| 164 |
DISTCHECK_TARGETS=distcheck-parallel distcheck-minimal distcheck-fast distcheck-full |
| 165 |
DISTCHECK_VALGRIND_TARGETS=distcheck-valgrind distcheck-valgrind-minimal distcheck-valgrind-fast |
| 166 |
|
| 167 |
$(DISTCHECK_TARGETS) $(DISTCHECK_VALGRIND_TARGETS): |
| 168 |
STP_TEST_PROFILE=`echo $@ |sed -e s/distcheck-// -e s/-/_/g -e s/parallel//` $(MAKEDISTCHECK_PARALLEL) |
| 169 |
|
| 170 |
|
| 171 |
checksums: scripts/count-cpus |
| 172 |
STP_PARALLEL=$(CPUS) $(MAKE) -j$(CPUS) -C src/testpattern checksums-release |
| 173 |
|
| 174 |
build-release: scripts/build-release scripts/count-cpus |
| 175 |
STP_PARALLEL=$(CPUS) /usr/bin/time scripts/build-release |
| 176 |
|
| 177 |
sanity: scripts/build-release scripts/count-cpus |
| 178 |
STP_PARALLEL=$(CPUS) /usr/bin/time scripts/build-release preflight check_git check_git_builds |
| 179 |
|
| 180 |
## Clean |
| 181 |
|
| 182 |
CLEANMFOUR = \ |
| 183 |
m4/* |
| 184 |
|
| 185 |
CLEANPO = \ |
| 186 |
po/ChangeLog \ |
| 187 |
po/gutenprint.pot \ |
| 188 |
po/Makefile.in.in \ |
| 189 |
po/boldquot.sed \ |
| 190 |
po/[email protected] \ |
| 191 |
po/[email protected] \ |
| 192 |
po/insert-header.sin \ |
| 193 |
po/Makevars.template \ |
| 194 |
po/quot.sed \ |
| 195 |
po/remove-potcdate.sin \ |
| 196 |
po/Rules-quot \ |
| 197 |
po/*~ |
| 198 |
|
| 199 |
CLEANFILES = .noupdate |
| 200 |
|
| 201 |
MAINTAINERCLEANFILES = \ |
| 202 |
ABOUT-NLS \ |
| 203 |
ChangeLog \ |
| 204 |
INSTALL \ |
| 205 |
aclocal.m4 \ |
| 206 |
config.h.in \ |
| 207 |
config.h.in~ \ |
| 208 |
config.rpath \ |
| 209 |
configure \ |
| 210 |
git-version-stamp \ |
| 211 |
Makefile.in \ |
| 212 |
stamp-h.in \ |
| 213 |
stamp-h1.in \ |
| 214 |
stamp-h2.in \ |
| 215 |
stamp-h3.in \ |
| 216 |
stamp-h4.in \ |
| 217 |
$(CLEANMFOUR) \ |
| 218 |
$(CLEANPO) |
| 219 |
|
| 220 |
distclean-local: |
| 221 |
-rm -f config.summary |
| 222 |
|
| 223 |
uninstall-local: |
| 224 |
-rm -f $(DESTDIR)$(CONFIGSUMMARYDIR)/config.summary |
| 225 |
|
| 226 |
EXTRA_DIST = autogen.sh README.package git-version-stamp |
| 227 |
|
| 228 |
.PHONY: deb html install-cups install-gimp snapshot ChangeLog Phony dist-time-check git-version-stamp |