2012-05-06 17:48:10 +02:00
|
|
|
# Makefile for autospec
|
|
|
|
# Copyright (C) 2012 by Davide Madrisan <davide.madrisan@gmail.com>
|
|
|
|
|
|
|
|
# This program is free software; you can redistribute it and/or modify it under
|
|
|
|
# the terms of version 2 of the GNU General Public License as published by the
|
|
|
|
# Free Software Foundation.
|
|
|
|
#
|
|
|
|
# This program is distributed in the hope that it will be useful, but WITHOUT
|
|
|
|
# ANY WARRANTY, to the extent permitted by law; without even the implied
|
|
|
|
# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
|
|
|
# See the GNU General Public License for more details.
|
|
|
|
#
|
|
|
|
# You should have received a copy of the GNU General Public License along with
|
|
|
|
# this program; if not, write to the Free Software Foundation, Inc.,
|
|
|
|
# 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
|
|
|
|
|
|
|
|
srcdir = ..
|
|
|
|
|
|
|
|
include $(srcdir)/Makefile.env
|
|
|
|
|
2012-11-11 19:35:04 +01:00
|
|
|
pck_confs_infiles := $(wildcard *.conf.in)
|
|
|
|
pck_confs := \
|
|
|
|
$(wildcard *.conf) $(patsubst %.conf.in,%.conf,$(wildcard *.conf.in))
|
2012-05-06 17:48:10 +02:00
|
|
|
|
2012-11-11 19:35:04 +01:00
|
|
|
pck_color_themes := $(wildcard color-theme.*)
|
2012-11-10 21:01:37 +01:00
|
|
|
|
2012-05-06 17:48:10 +02:00
|
|
|
all:
|
|
|
|
|
2012-11-10 21:01:37 +01:00
|
|
|
check: $(pck_confs) $(pck_color_themes)
|
|
|
|
@for f in $(pck_confs) $(pck_color_themes); do\
|
2012-05-06 17:48:10 +02:00
|
|
|
echo -n "checking $$f... ";\
|
|
|
|
bash -n $$f \
|
|
|
|
&& echo "[PASSED]" || { echo "[FAILED]"; exit 1; };\
|
|
|
|
done
|
|
|
|
|
2012-11-10 21:01:37 +01:00
|
|
|
install: $(pck_confs) $(pck_color_themes)
|
2012-05-06 17:48:10 +02:00
|
|
|
@$(INSTALL_DIR) $(DESTDIR)$(confdir)
|
2012-11-10 21:01:37 +01:00
|
|
|
for f in $(pck_confs) $(pck_color_themes); do\
|
2012-05-06 17:48:10 +02:00
|
|
|
if [ $${f} = "autospec.conf" ]; then\
|
|
|
|
$(INSTALL_DATA) $${f} $(DESTDIR)$(sysconfdir)/$${f};\
|
|
|
|
else\
|
|
|
|
$(INSTALL_DATA) $${f} $(DESTDIR)$(confdir)/$${f};\
|
|
|
|
fi;\
|
|
|
|
done
|
|
|
|
|
|
|
|
uninstall:
|
|
|
|
for f in $(pck_confs); do\
|
|
|
|
rm -f $(DESTDIR)$(confdir)/$${f};\
|
|
|
|
done
|
|
|
|
|
|
|
|
clean:
|
|
|
|
rm -f $(patsubst %.in,%,$(pck_confs_infiles))
|