1## Process this file with automake to produce Makefile.in 2## $Id: Makefile.am,v 1.155 2008/10/24 00:37:13 rleigh Exp $ 3## Copyright (C) 2000-2004 Roger Leigh 4## 5## This program is free software; you can redistribute it and/or modify 6## it under the terms of the GNU General Public License as published by 7## the Free Software Foundation; either version 2, or (at your option) 8## any later version. 9## 10## This program is distributed in the hope that it will be useful, 11## but WITHOUT ANY WARRANTY; without even the implied warranty of 12## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13## GNU General Public License for more details. 14## 15## You should have received a copy of the GNU General Public License 16## along with this program; if not, write to the Free Software 17## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 18 19## Process this file with automake to produce Makefile.in. 20 21@SET_MAKE@ 22 23ACLOCAL_AMFLAGS = -I m4 -I m4local 24 25include $(top_srcdir)/scripts/global.mk 26 27 28## Variables 29 30SUBDIRS = include src samples test po man doc scripts 31DISTDIRS = m4 m4extra 32 33docdir = $(datadir)/$(PACKAGE)/doc 34 35## Rules 36 37# Libtool dependency 38libtool: $(LIBTOOL_DEPS) 39 cd $(srcdir); \ 40 $(SHELL) ./config.status --recheck 41 42# Don't list ChangeLog as a dependency here because it forces network 43# access, and because it usually runs as superuser rather than the user 44# who normally builds Gutenprint. 45install-data-local: NEWS AUTHORS COPYING README 46 $(mkdir_p) $(DESTDIR)$(docdir) 47 $(INSTALL_DATA) $(srcdir)/NEWS $(DESTDIR)$(docdir) 48 $(INSTALL_DATA) $(srcdir)/ChangeLog $(DESTDIR)$(docdir) 49 $(INSTALL_DATA) $(srcdir)/AUTHORS $(DESTDIR)$(docdir) 50 $(INSTALL_DATA) $(srcdir)/COPYING $(DESTDIR)$(docdir) 51 $(INSTALL_DATA) $(srcdir)/README $(DESTDIR)$(docdir) 52 53# This rather strange-looking code ensures that the change log is only 54# rebuilt if any of the CVS/Entries files have changed since the change log 55# was last built. 56 57ChangeLogPhony: 58 @cd $(top_srcdir) ; \ 59 for f in `find . -name Entries -print | grep CVS` ; do \ 60 if @TEST@ ! -f ChangeLogStamp -o ChangeLogStamp -ot $$f ; then \ 61 rm -f ChangeLogStamp ; \ 62 touch ChangeLogStamp ; \ 63 fi ; \ 64 done 65 66ChangeLogStamp: ChangeLogPhony 67 @@TRUE@ 68 69ChangeLog: ChangeLogStamp 70 @cd $(top_srcdir) ; \ 71 if test -f $(top_builddir)/.noupdate ; then \ 72 echo "$@: .noupdate found: NOT updating $@ from CVS" ; \ 73 elif test -d CVS ; then \ 74 echo "$@: Updating $@ from CVS" ; \ 75 cvs log | $(PERL) scripts/mkchlog -e @sourceforge.net -X src/xml/escp2/resolutions -s '^(guten|gimp-|)print-[0-9]+_' > $@.tmp ; \ 76 if test -s $@.tmp ; then \ 77 mv $@.tmp $@ ; \ 78 else \ 79 echo "$@: Failed to update $@ ['touch .noupdate' to skip]" ; \ 80 $(RM) $@.tmp ; \ 81 exit 1 ; \ 82 fi \ 83 elif test -s $@ ; then \ 84 echo "$@: This is not a CVS version of Gutenprint" ; \ 85 echo "$@: Not updating $@ from CVS!" ; \ 86 else \ 87 echo "$@: No $@ or $@ of zero size found!" ; \ 88 echo "$@: Failed to update $@ ['touch .noupdate' to skip]" ; \ 89 exit 1 ; \ 90 fi 91 92configure.in: 93 $(LN_S) $(srcdir)/configure.ac $(srcdir)/configure.in 94 95dist-time-check: 96 @current_date=`date +%Y%m%d`; \ 97 configure_date=`ls -l --time-style=+%Y%m%d $(top_builddir)/configure | awk '{print $$6}'`; \ 98 echo "Checking that 'configure' was built today."; \ 99 if test "$$current_date" != "$$configure_date" ; then \ 100 echo "configure is out of date -- rerun ./autogen.sh first!"; \ 101 exit 1; \ 102 fi 103 104dist-hook: dist-time-check 105 for dir in $(DISTDIRS) ; do \ 106 if test -d $(srcdir)/$$dir ; then \ 107 mkdir $(distdir)/$$dir; \ 108 for dirfile in $(srcdir)/$$dir/*; do \ 109 if test -f $$dirfile ; then \ 110 cp -p $$dirfile $(distdir)/$$dir; \ 111 fi \ 112 done \ 113 fi \ 114 done 115# Remove configure.in (libtool bug workaround) 116 $(RM) -f $(distdir)/configure.in 117# Remove any backup files found in distdir 118 $(FIND) $(distdir) -name '.*' -print | xargs $(RM) -rf 119 $(FIND) $(distdir) -name '#*' -print | xargs $(RM) -rf 120 $(FIND) $(distdir) -name '*~' -print | xargs $(RM) -rf 121 122install-cups: all 123 cd src/cups ; \ 124 $(MAKE) install 125 126install-ghost: all 127 cd src/ghost ; \ 128 $(MAKE) install 129 130install-gimp: all 131 cd src/gimp ; \ 132 $(MAKE) install 133 134docs: 135 cd doc ; \ 136 $(MAKE) docs 137 138html: 139 cd doc ; \ 140 $(MAKE) html 141 142ps: 143 cd doc ; \ 144 $(MAKE) ps 145 146pdf: 147 cd doc ; \ 148 $(MAKE) pdf 149 150snapshot: 151 $(MAKE) dist distdir=$(PACKAGE)`date +"%Y%m%d"` 152 153## Clean 154 155CLEANSCRIPTS = \ 156 scripts/depcomp \ 157 scripts/install-sh \ 158 scripts/ltconfig \ 159 scripts/mdate-sh \ 160 scripts/missing \ 161 scripts/mkinstalldirs 162 163CLEANMFOUR = \ 164 m4/codeset.m4 \ 165 m4/gettext.m4 \ 166 m4/glibc21.m4 \ 167 m4/iconv.m4 \ 168 m4/intdiv0.m4 \ 169 m4/inttypes_h.m4 \ 170 m4/inttypes.m4 \ 171 m4/inttypes-pri.m4 \ 172 m4/isc-posix.m4 \ 173 m4/lcmessage.m4 \ 174 m4/lib-ld.m4 \ 175 m4/lib-link.m4 \ 176 m4/lib-prefix.m4 \ 177 m4/progtest.m4 \ 178 m4/stdint_h.m4 \ 179 m4/uintmax_t.m4 \ 180 m4/ulonglong.m4 181 182CLEANPO = \ 183 po/boldquot.sed \ 184 po/en@boldquot.header \ 185 po/en@quot.header \ 186 po/insert-header.sin \ 187 po/Makevars.template \ 188 po/quot.sed \ 189 po/remove-potcdate.sin \ 190 po/Rules-quot 191 192CLEANFILES = .noupdate ChangeLog.tmp 193 194MAINTAINERCLEANFILES = \ 195 ABOUT-NLS \ 196 INSTALL \ 197 aclocal.m4 \ 198 config.h.in \ 199 configure \ 200 configure.in \ 201 Makefile.in \ 202 stamp-h.in \ 203 stamp-h1.in \ 204 stamp-h2.in \ 205 stamp-h3.in \ 206 stamp-h4.in \ 207 $(CLEANSCRIPTS) \ 208 $(CLEANMFOUR) \ 209 $(CLEANPO) 210 211EXTRA_DIST = autogen.sh ChangeLogStamp README.package 212 213.PHONY: deb html install-cups install-gimp install-ghost snapshot ChangeLog Phony dist-time-check 214 215