1# Non-recursive Make rules. 2# 3# Copyright (C) 2013-2015 Gary V. Vaughan 4# Written by Gary V. Vaughan, 2013 5# 6# This program is free software; you can redistribute it and/or modify it 7# under the terms of the GNU General Public License as published by 8# the Free Software Foundation; either version 3, or (at your option) 9# any later version. 10# 11# This program is distributed in the hope that it will be useful, but 12# WITHOUT ANY WARRANTY; without even the implied warranty of 13# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14# General Public License for more details. 15# 16# You should have received a copy of the GNU General Public License 17# along with this program. If not, see <http://www.gnu.org/licenses/>. 18 19 20## ------------ ## 21## Environment. ## 22## ------------ ## 23 24LUA_PATH ?= ; 25LUA_CPATH ?= ; 26 27SPECL_ENV = 28CHECK_ENV = 29INSTALLCHECK_ENV = 30 31 32## ---------- ## 33## Bootstrap. ## 34## ---------- ## 35 36ACLOCAL_AMFLAGS = -I m4 37 38AM_CPPFLAGS = $(LUA_INCLUDE) 39 40 41## ------------- ## 42## Declarations. ## 43## ------------- ## 44 45EXTRA_DIST = 46EXTRA_LTLIBRARIES = 47CLEANFILES = 48DISTCLEANFILES = 49MAINTAINERCLEANFILES = 50NOTHING_ELSE = 51 52bin_SCRIPTS = 53check_local = 54dist_bin_SCRIPTS = 55dist_lua_DATA = 56doc_DATA = 57installcheck_local = 58install_exec_hooks = remove-luaexec-lafiles 59uninstall_hooks = uninstall-luaexec-modules 60lib_LTLIBRARIES = 61luaexec_LTLIBRARIES = 62man_MANS = 63save_release_files = 64 65include local.mk 66include build-aux/rockspecs.mk 67 68 69## ------------ ## 70## Local Tests. ## 71## ------------ ## 72 73check-local: $(check_local) 74 75 76## ------------- ## 77## Installation. ## 78## ------------- ## 79 80installcheck-local: $(installcheck_local) 81 82install-exec-hook: $(install_exec_hooks) 83 84# Neither Lua itself, nor LuaRocks can use .la files, and LuaRocks 85# actually moves such files aside anyway, so we just remove them from 86# the installation directory. 87remove-luaexec-lafiles: 88 @for la in $(luaexec_LTLIBRARIES); do \ 89 f=`echo "$$la" |sed 's|^.*/||'`; \ 90 echo rm -f $(DESTDIR)$(luaexecdir)/$$f; \ 91 rm -f $(DESTDIR)$(luaexecdir)/$$f; \ 92 done 93 94 95## --------------- ## 96## Uninstallation. ## 97## --------------- ## 98 99uninstall-hook: $(uninstall_hooks) 100 101# We removed the .la files from luaexecdir, so the standard uninstall, 102# with libtool --mode=uninstall, can't find everything anymore. 103uninstall-luaexec-modules: 104 @for la in $(luaexec_LTLIBRARIES); do \ 105 base=`echo "$$la" \ 106 |sed 's|^.*/\(.*\)\.la|\1|'`; \ 107 echo rm -f $(DESTDIR)$(luaexecdir)/$$base.so; \ 108 rm -f $(DESTDIR)$(luaexecdir)/$$base.so; \ 109 done 110