1 # Copyright (C) 2012 The Meme Factory, Inc. http://www.meme.com/
2 # Copyright (C) 2010, 2011 Karl O. Pinc <kop@meme.com>
4 # This file is part of Gombe-MI.
6 # Gombe-MI is free software; you can redistribute it and/or modify
7 # it under the terms of the GNU General Public License as published by
8 # the Free Software Foundation; either version 3 of the License, or
9 # (at your option) any later version.
11 # This program is distributed in the hope that it will be useful,
12 # but WITHOUT ANY WARRANTY; without even the implied warranty of
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 # GNU General Public License for more details.
16 # You should have received a copy of the GNU General Public License
17 # along with Gombe-MI. If not, see <http://www.gnu.org/licenses/>.
19 # Makefile for xml views
21 # Karl O. Pinc <kop@meme.com>
23 # Have make look for files in the db include directory
25 VPATH = ../../db/include
27 # Where the doc dir is.
30 # XMLLINT command used to validate xml.
31 include $(DOC_PATH)/xmllint.mk
33 # Get VIEW_NAMES and M4_VIEWS variables.
35 MAKEDEPENDS := Makefile $(DOC_PATH)/xmllint.mk \
36 $(DOC_PATH)/xmllint-wrapper views.mk
38 # Dependenciees of those files that m4 include m4_macros.m4
39 M4DEPENDS := m4_macros.m4 m4_m4iterators.m4
41 # Each VIEW_SOURCE must also have a dia document with the same prefix.
42 # (Unless doc/diagrams/image_targets.mk defines an exception)
43 VIEW_SOURCES = $(VIEW_NAMES:%=%.xml)
45 VIEW_VALIDATES = $(VIEW_SOURCES:%.xml=validate/%)
47 TARGETS = $(M4_VIEWS:%=%.xml)
55 ../constants: constants.m4
56 $(MAKE) -C .. constants
61 validate_xml: validate $(VIEW_VALIDATES)
64 if [ ! -d validate ] ; then mkdir validate ; fi
67 # Validate all the views.
68 # As the makefile always validates before constructing
69 # the target this takes care of all the validation xml file dependencies.
70 $(VIEW_VALIDATES): validate/%: %.xml validate $(MAKEDEPENDS) ../constants
75 rm -rf $(TARGETS) validate