1## $Id: Makefile.am,v 1.53 2010/08/07 02:30:38 rlk Exp $ 2## Copyright (C) 2000 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, write to the Free Software 16## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 18## Process this file with automake to produce Makefile.in. 19 20@SET_MAKE@ 21 22include $(top_srcdir)/scripts/global.mk 23 24 25## Variables 26 27DISTDIRS = foomatic-templates-ijs 28LOCAL_CPPFLAGS = $(GUTENPRINT_CFLAGS) 29 30if BUILD_FOOMATIC_3 31BUILD_FOOMATIC = 1 32endif 33 34STP_ENV= STP_MODULE_PATH=$(top_builddir)/src/main/.libs:$(top_builddir)/src/main STP_DATA_PATH=$(top_srcdir)/src/xml 35 36LC_C_ENV= LC_ALL=C LANG=C LANGUAGE=C 37 38FOOMATIC_GENERATOR= $(STP_ENV) $(LC_C_ENV) ./foomatic-generator 39 40## Programs 41 42if BUILD_FOOMATIC 43noinst_PROGRAMS = printer_options printer_margins paper_sizes gutenprint-version \ 44 printers 45endif 46 47printer_options_SOURCES = printer_options.c 48printer_options_LDADD = $(GUTENPRINT_LIBS) 49 50printer_margins_SOURCES = printer_margins.c 51printer_margins_LDADD = $(GUTENPRINT_LIBS) 52 53gutenprint_version_SOURCES = gutenprint-version.c 54gutenprint_version_LDADD = $(GUTENPRINT_LIBS) 55 56paper_sizes_SOURCES = paper_sizes.c 57paper_sizes_LDADD = $(GUTENPRINT_LIBS) 58 59printers_SOURCES = printers.c 60printers_LDADD = $(GUTENPRINT_LIBS) 61 62 63## Rules 64 65if BUILD_FOOMATIC 66INSTALL_DATA_LOCAL_DEPS = foomatic-data 67else 68INSTALL_DATA_LOCAL_DEPS = 69endif 70 71if BUILD_FOOMATIC_3 72FOOMATIC_GENERATOR_FOOMATIC_3_OPTS = -f 3 73else 74FOOMATIC_GENERATOR_FOOMATIC_3_OPTS = 75endif 76 77all-local: $(INSTALL_DATA_LOCAL_DEPS) 78 79install-data-local: $(INSTALL_DATA_LOCAL_DEPS) 80 if test -n "$(INSTALL_DATA_LOCAL_DEPS)" ; then \ 81 $(MAKE) install-kit FOOMATIC_DB=foomatic-db/gutenprint-ijs.@GUTENPRINT_MAJOR_VERSION@.@GUTENPRINT_MINOR_VERSION@ ; \ 82 $(MAKE) install-kit FOOMATIC_DB=foomatic-db/gutenprint-ijs-simplified.@GUTENPRINT_MAJOR_VERSION@.@GUTENPRINT_MINOR_VERSION@ ; \ 83 fi 84 85install-kit: 86 if test -n "$(DESTDIR)" ; then \ 87 $(mkdir_p) $(DESTDIR)`$(FOOMATIC_KITLOAD) -l` ; \ 88 $(FOOMATIC_KITLOAD) -f -d $(DESTDIR) -k $(FOOMATIC_DB) ; \ 89 else \ 90 $(FOOMATIC_KITLOAD) -f -k $(FOOMATIC_DB) ; \ 91 fi 92 93clean-local: 94 -$(RM) -r foomatic-db 95 96foomatic-data: foomatic-stamp 97 98foomatic-stamp: foomatic-generator $(noinst_PROGRAMS) mk_printerlist $(top_builddir)/src/xml/xml-stamp 99 -$(RM) -r foomatic-db 100 $(FOOMATIC_GENERATOR) -t $(srcdir)/foomatic-templates $(FOOMATIC_GENERATOR_EXTRA_OPTS) $(FOOMATIC_GENERATOR_FOOMATIC_3_OPTS) 101 $(FOOMATIC_GENERATOR) -s -t $(srcdir)/foomatic-templates $(FOOMATIC_GENERATOR_EXTRA_OPTS) $(FOOMATIC_GENERATOR_FOOMATIC_3_OPTS) 102 touch foomatic-stamp 103 104dist-hook: 105 for dir in $(DISTDIRS) ; do \ 106 if test -d $(srcdir)/$$dir ; then \ 107 mkdir $(distdir)/$$dir; \ 108 for dirfile in $(srcdir)/$$dir/*.xml; do \ 109 if test -f $$dirfile ; then \ 110 cp -p $$dirfile $(distdir)/$$dir; \ 111 fi \ 112 done \ 113 fi \ 114 done 115 116$(top_builddir)/src/xml/xml-stamp: 117 cd $(top_builddir)/src/xml; $(MAKE) xml-stamp 118 119## Clean 120 121CLEANFILES = foomatic-stamp 122MAINTAINERCLEANFILES = Makefile.in 123