1 # Copyright (C) 2010-2011 Red Hat, Inc.
3 # This program is free software: you can redistribute it and/or modify
4 # it under the terms of the GNU General Public License as published by
5 # the Free Software Foundation, either version 3 of the License, or
6 # (at your option) any later version.
8 # This program is distributed in the hope that it will be useful,
9 # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 # GNU General Public License for more details.
13 # You should have received a copy of the GNU General Public License
14 # along with this program. If not, see <http://www.gnu.org/licenses/>.
16 AM_CFLAGS = $(WARN_CFLAGS) $(WERROR_CFLAGS)
18 # FIXME: don't hard-code 2.0
19 AM_CPPFLAGS = -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include
23 SUBDIRS = lib . gnulib-tests t man
24 ACLOCAL_AMFLAGS = -I m4
26 # iwhd is short for Image WareHouse Daemon.
34 BUILT_SOURCES = iwhd-qparser.h qlexer.c
37 MAINTAINERCLEANFILES =
59 EXTRA_iwhd_SOURCES = qlexer.l
61 VERSION_no_hyphen = $$(echo $(VERSION)|tr - _)
63 MOSTLYCLEANFILES += iwhd.spec
64 MAINTAINERCLEANFILES += iwhd.spec
65 iwhd.spec: iwhd.spec.in Makefile
67 v=$$(echo $(VERSION)|tr - .); \
68 sed 's/[@]VERSION@/'"$$v"/ $< > $@-t
72 # The following rule accommodates pre-release version number strings
73 # like "0.0.273-1621" that contain a "-". Repack the tarball
74 # to one with "." substituted for any - in the version string.
77 chmod 644 $(distdir).tar.gz
80 v=$$(echo $(VERSION)|tr - .); \
81 base=$(PACKAGE)-$$v; \
83 tar xf $(distdir).tar.gz \
84 && rm -rf $$base $$tgz \
85 && mv $(distdir) $$base \
86 && tar -czf - $$base > $$tgz \
87 && rpmbuild -ta $$tgz; e=$$? \
88 rm -rf $$base $$tgz; \
91 *) rpmbuild -ta $(distdir).tar.gz ;; \
94 iwhd_CPPFLAGS = $(HAIL_CFLAGS) -I$(top_srcdir)/lib
108 MOSTLYCLEANFILES += qlexer.c
109 MAINTAINERCLEANFILES += qlexer.c
110 EXTRA_DIST += qlexer.c