ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/server/lib/Makefile.am
Revision: 1.29
Committed: Sun May 27 17:45:51 2007 UTC (17 years ago) by root
Branch: MAIN
CVS Tags: rel-2_1
Changes since 1.28: +1 -0 lines
Log Message:
create maps directory when installing

File Contents

# User Rev Content
1 root 1.23 # Copyright (C) 2007 Marc Alexander Lehmann
2 root 1.1 # Copyright (C) 2001 Mark Wedel & Crossfire Development Team
3     # Copyright (C) 1992 Frank Tore Johansen
4     #
5     # This program is free software; you can redistribute it and/or modify
6     # it under the terms of the GNU General Public License as published by
7     # the Free Software Foundation; either version 2 of the License, or
8     # (at your option) any later version.
9     #
10     # This program is distributed in the hope that it will be useful,
11     # but WITHOUT ANY WARRANTY; without even the implied warranty of
12     # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13     # GNU General Public License for more details.
14     #
15     # You should have received a copy of the GNU General Public License
16     # along with this program; if not, write to the Free Software
17     # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
18     #
19 root 1.17 # The authors can be reached via e-mail to crossfire@schmorp.de
20 root 1.1
21     pkgstatedir = @pkgstatedir@
22     pkgconfdir = @pkgconfdir@
23    
24 root 1.27 nobase_dist_pkgdata_DATA = artifacts def_help formulae races \
25 root 1.25 attackmess materials cf.pm jeweler.yaml
26 root 1.1
27 root 1.24 pmdir = $(pkgdatadir)/cf
28     dist_pm_DATA = cf/pod.pm
29    
30     admdir = $(pkgdatadir)/adm
31     dist_adm_DATA = adm/map_info adm/map_expand.pl adm/mapslitter.pl adm/archsearch.pl adm/collect_images.pl
32    
33     CONF_FILES = settings motd dm_file forbid exp_table news rules config
34 root 1.26 VAR_FILES = highscore bookarch temp.maps
35 root 1.28 EXTRA_DIST = README $(CONF_FILES)
36 root 1.1
37 root 1.28 MAINTAINERCLEANFILES = Makefile.in
38 root 1.1
39     PERL = @PERL@
40    
41 root 1.25 install-data-local: jeweler.yaml
42 root 1.1 @$(NORMAL_INSTALL)
43 root 1.29 $(mkinstalldirs) -m 755 $(DESTDIR)$(pkgdatadir)/maps
44 root 1.28 $(mkinstalldirs) -m 755 $(DESTDIR)$(pkgconfdir)
45 root 1.1 for i in $(CONF_FILES); do \
46     if [ ! -f $(DESTDIR)$(pkgconfdir)/$$i ]; then \
47     echo "Installing $$i"; \
48     $(INSTALL_DATA) $(srcdir)/$$i $(DESTDIR)$(pkgconfdir); \
49     fi \
50     done
51 root 1.24 $(mkinstalldirs) -m 755 $(DESTDIR)$(pkgstatedir)
52 root 1.1 for i in $(VAR_FILES) ; do \
53     touch $(DESTDIR)$(pkgstatedir)/$$i ; \
54     done
55 root 1.24 @for i in datafiles players unique-items template-maps maps random db tmp; do \
56 root 1.1 if [ ! -d $(DESTDIR)$(pkgstatedir)/$$i ]; then \
57     echo "Creating directory $(pkgstatedir)/$$i"; \
58 root 1.24 $(mkinstalldirs) -m 755 $(DESTDIR)$(pkgstatedir)/$$i; \
59 root 1.1 fi; \
60     done
61    
62     # Uninstall unchanged config/var files so make distcheck is happy
63     # but leave changed file, so no configuration/game state is lost
64     uninstall-local:
65     -for i in $(CONF_FILES); do \
66     if test ! -f $(DESTDIR)$(pkgconfdir)/$$i ; then \
67     continue ; \
68     fi ; \
69     if diff -q $(srcdir)/$$i $(DESTDIR)$(pkgconfdir)/$$i ; then \
70     rm -f $(DESTDIR)$(pkgconfdir)/$$i ; \
71     fi ; \
72     done
73     -for i in $(VAR_FILES) ; do \
74     if test ! -f $(DESTDIR)$(pkgstatedir)/$$i ; then \
75     continue ;\
76     fi ; \
77 root 1.18 if ! [ -s "$(DESTDIR)$(pkgstatedir)/$$i" ] ; then \
78 root 1.1 rm -f $(DESTDIR)$(pkgstatedir)/$$i ; \
79     fi ; \
80     done
81    
82