1 # Copyright (C) 2012, 2015 The Meme Factory, Inc. http://www.meme.com/
2 # Copyright (C) 2004, 2005, 2008, 2009, 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 database functions (stored procedures)
21 # Karl O. Pinc <kop@meme.com>
25 # to install just that function.
27 # Devfault variable values.
28 include ../defaults.mk
30 # Have make look for files in the include directory
33 m4_sources = followfunc.m4 followrole.m4 mom_in_gc.m4 infants_in_gc.m4 \
34 add_social_partners.m4 infer_gc.m4 delete_gc.m4 \
35 run_integrity_queries.m4
37 function_targets := $(patsubst %.m4,%,$(m4_sources))
39 all: makefunctions destroyfunctions
41 makefunctions: maketypes.m4 $(m4_sources) macros.m4 $(INCLUDES)
42 m4 -I ../include maketypes.m4 $(m4_sources) > makefunctions
44 destroyfunctions: destroytypes.m4 destroyfunctions.m4 \
45 destroywarningfunctions.m4 $(INCLUDES)
46 m4 -I ../include destroyfunctions.m4 destroytypes.m4 \
50 rm -rf makefunctions destroyfunctions
54 reinstall: destroyfunctions makefunctions $(INCLUDES)
55 ( echo set client_min_messages TO WARNING\; ; \
56 cat destroyfunctions makefunctions; \
60 install: makefunctions
61 ( echo set client_min_messages TO WARNING\; ; \
68 destroy: destroyfunctions
69 ( echo set client_min_messages TO WARNING\; ; \
70 cat destroyfunctions ; ) \
73 # The rule that makes individual functions and install them.
74 .PHONY: $(function_targets)
76 ( echo set client_min_messages TO WARNING\; ; \
77 m4 -I ../include $@.m4 ; ) \