moved finding of data files from configure.ac to Makefile.am

This commit is contained in:
Yann Dirson 2004-09-01 19:07:18 +00:00
parent 7865079b1c
commit ae34dee522
2 changed files with 38 additions and 16 deletions

View file

@ -2,10 +2,44 @@ ISUBDIRS = icons
SUBDIRS = intl po m4 src $(ISUBDIRS)
pkgdatadir=$(datadir)/@DATADIR@
findfilterflags=-name CVS -prune -o -name ".cvs*" -o -name ".\#*" -o -type d
if LITE
findmoredata=;find images $(extrawesnothdatadirs) $(findfilterflags) -o -path "images/misc/tutorial*" -o -path "images/misc/story*" -o -print
else
findmoredata=;find images music $(extrawesnothdatadirs) $(findfilterflags) -o -print
endif
finddata=find data fonts sounds $(extrawesnothdatadirs) $(findfilterflags) -o -print \
$(findmoredata)
install-data-local:
@$(NORMAL_INSTALL)
test -z "$(pkgdatadir)" || $(mkdir_p) "$(DESTDIR)$(pkgdatadir)"
srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
( $(finddata) ) | while read p; do \
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
case $$p in \
$(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
*) f=$$p;; \
esac; \
echo " $(install_sh_DATA) '$$d$$p' '$(DESTDIR)$(pkgdatadir)/$$f'"; \
$(install_sh_DATA) "$$d$$p" "$(DESTDIR)$(pkgdatadir)/$$f"; \
done
uninstall-local:
@$(NORMAL_UNINSTALL)
@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
( $(finddata) ) | while read p; do \
case $$p in \
$(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
*) f=$$p;; \
esac; \
echo " rm -f '$(DESTDIR)$(pkgdatadir)/$$f'"; \
rm -f "$(DESTDIR)$(pkgdatadir)/$$f"; \
done
dist_noinst_DATA = @MANUAL_FILES@ copyright changelog wesnoth.dsp wesnoth.dsw \
@UTIL_FILES@
nobase_dist_pkgdata_DATA = @DATA_FILES@ @FONT_FILES@ @IMAGE_FILES@ \
@MUSIC_FILES@ @SOUND_FILES@
dist_man6_MANS = doc/man/wesnoth.6 doc/man/wesnothd.6 doc/man/wesnoth_editor.6
uninstall-hook:
@ -26,7 +60,7 @@ binary-dist:
@cd $(BINARY_STAGING) ; tar cf - * | gzip -c >$(BINARY_DIST)
@rm -rf $(BINARY_STAGING)
@echo "Precompiled binary tarball is in $(BINARY_DIST)"
data-dist:
@rm -rf $(BINARY_STAGING) $(DATA_DIST)
@make install-data DESTDIR=$(BINARY_STAGING)

View file

@ -525,22 +525,10 @@ fi
MANUAL_FILES=`ls MANUAL*`
MANUAL_FILES=`echo $MANUAL_FILES`
DATA_FILES=`find data -name CVS -prune -o -name ".cvs*" -o -name ".#*" -o -type d -o -print`
DATA_FILES=`echo $DATA_FILES`
FONT_FILES=`find fonts -name CVS -prune -o -name ".cvs*" -o -name ".#*" -o -type d -o -print`
FONT_FILES=`echo $FONT_FILES`
AM_CONDITIONAL([LITE], [test "x$lite" = "xyes"])
if test "x$lite" = "xyes"; then
PACKAGE=$PACKAGE-lite
IMAGE_FILES=`find images -name CVS -prune -o -name ".cvs*" -o -name ".#*" -o -path "images/misc/tutorial*" -o -path "images/misc/story*" -o -type d -o -print`
MUSIC_FILES=""
else
IMAGE_FILES=`find images -name CVS -prune -o -name ".cvs*" -o -name ".#*" -o -type d -o -print`
MUSIC_FILES=`find music -name CVS -prune -o -name ".cvs*" -o -name ".#*" -o -type d -o -print`
MUSIC_FILES=`echo $MUSIC_FILES`
fi
IMAGE_FILES=`echo $IMAGE_FILES`
SOUND_FILES=`find sounds -name CVS -prune -o -name ".cvs*" -o -name ".#*" -o -type d -o -print`
SOUND_FILES=`echo $SOUND_FILES`
UTIL_FILES=`find utils -name CVS -prune -o -name ".cvs*" -o -name ".#*" -o -type d -o -print`
UTIL_FILES=`echo $UTIL_FILES`