autotools: cleanup Makefile.am for data/* and icons.

use autotools tricks:
nobase_ prefix -> hiearchical installation
dist_ prefix -> include files in dist archive
This commit is contained in:
Bruno Tarquini 2009-11-28 12:54:38 +01:00
parent 6123687dda
commit f01a3a7272
6 changed files with 24 additions and 190 deletions

View File

@ -1,38 +1,4 @@
activitiesdir = $(pkgdatadir)/data/activities
activities_DATA =
ACTIVITIES_DIRS = **/**
ACTIVITIES_FILES = **/**/{*.png,*.gif}
install-data-local:
@for d in $$(cd $(srcdir); echo $(ACTIVITIES_DIRS));do \
if test -d $(srcdir)/$$d;then \
echo " $(mkinstalldirs) $(DESTDIR)$(pkgdatadir)/data/activities/$$d"; \
$(mkinstalldirs) $(DESTDIR)$(pkgdatadir)/data/activities/$$d || exit 1; \
fi; \
done; \
for f in $$(cd $(srcdir); echo $(ACTIVITIES_FILES));do \
if test -f $(srcdir)/$$f; then \
echo " $(INSTALL_DATA) $(srcdir)/$$f $(DESTDIR)$(pkgdatadir)/data/activities/$$f"; \
$(INSTALL_DATA) $(srcdir)/$$f $(DESTDIR)$(pkgdatadir)/data/activities/$$f || exit 1; \
fi; \
done;
dist-hook:
@for d in $$(cd $(srcdir); echo $(ACTIVITIES_DIRS));do \
if test -d $(srcdir)/$$d;then \
echo " $(mkdir_p) $(distdir)/$$d"; \
$(mkdir_p) $(distdir)/$$d || exit 1; \
fi; \
done; \
for f in $$(cd $(srcdir); echo $(ACTIVITIES_FILES));do \
if test -f $(srcdir)/$$f; then \
echo " cp -pR $(srcdir)/$$f $(distdir)/$$f"; \
cp -pR $(srcdir)/$$f $(distdir)/$$f || exit 1; \
fi; \
done;
nobase_dist_activities_DATA = $(srcdir)/*/*/*
MAINTAINERCLEANFILES = Makefile.in

View File

@ -1,38 +1,7 @@
emoticonsdir = $(pkgdatadir)/data/emoticons
emoticons_DATA =
EMOTICONS_DIRS = **
EMOTICONS_FILES = **/{*.png,*.gif,emoticons.py}
install-data-local:
@for d in $$(cd $(srcdir); echo $(EMOTICONS_DIRS));do \
if test -d $(srcdir)/$$d;then \
echo " $(mkinstalldirs) $(DESTDIR)$(pkgdatadir)/data/emoticons/$$d"; \
$(mkinstalldirs) $(DESTDIR)$(pkgdatadir)/data/emoticons/$$d || exit 1; \
fi; \
done; \
for f in $$(cd $(srcdir); echo $(EMOTICONS_FILES));do \
if test -f $(srcdir)/$$f; then \
echo " $(INSTALL_DATA) $(srcdir)/$$f $(DESTDIR)$(pkgdatadir)/data/emoticons/$$f"; \
$(INSTALL_DATA) $(srcdir)/$$f $(DESTDIR)$(pkgdatadir)/data/emoticons/$$f || exit 1; \
fi; \
done;
dist-hook:
@for d in $$(cd $(srcdir); echo $(EMOTICONS_DIRS));do \
if test -d $(srcdir)/$$d;then \
echo " $(mkdir_p) $(distdir)/$$d"; \
$(mkdir_p) $(distdir)/$$d || exit 1; \
fi; \
done; \
for f in $$(cd $(srcdir); echo $(EMOTICONS_FILES));do \
if test -f $(srcdir)/$$f; then \
echo " cp -pR $(srcdir)/$$f $(distdir)/$$f"; \
cp -pR $(srcdir)/$$f $(distdir)/$$f || exit 1; \
fi; \
done;
nobase_dist_emoticons_DATA = \
$(srcdir)/*/*.png \
$(srcdir)/*/*.gif \
$(srcdir)/*/emoticons.py
MAINTAINERCLEANFILES = Makefile.in

View File

@ -1,39 +1,10 @@
iconsetdir = $(pkgdatadir)/data/iconsets
iconset_DATA =
ICONSET_DIRS = **/{16x16,32x32,48x48} \
transports/**/{16x16,32x32,48x48}
ICONSET_FILES = **/{16x16,32x32,48x48}/{*.gif,*.png} \
transports/**/{16x16,32x32,48x48}/{*.gif,*.png}
install-data-local:
@for d in $$(cd $(srcdir); echo $(ICONSET_DIRS));do \
if test -d $(srcdir)/$$d;then \
echo " $(mkinstalldirs) $(DESTDIR)$(pkgdatadir)/data/iconsets/$$d"; \
$(mkinstalldirs) $(DESTDIR)$(pkgdatadir)/data/iconsets/$$d || exit 1; \
fi; \
done
for f in $$(cd $(srcdir); echo $(ICONSET_FILES));do \
if test -f $(srcdir)/$$f; then \
echo " $(INSTALL_DATA) $(srcdir)/$$f $(DESTDIR)$(pkgdatadir)/data/iconsets/$$f"; \
$(INSTALL_DATA) $(srcdir)/$$f $(DESTDIR)$(pkgdatadir)/data/iconsets/$$f || exit 1; \
fi; \
done;
dist-hook:
@for d in $$(cd $(srcdir); echo $(ICONSET_DIRS));do \
if test -d $(srcdir)/$$d;then \
echo " $(mkdir_p) $(distdir)/$$d"; \
$(mkdir_p) $(distdir)/$$d || exit 1; \
fi; \
done
for f in $$(cd $(srcdir); echo $(ICONSET_FILES));do \
if test -f $(srcdir)/$$f; then \
echo " cp -pR $(srcdir)/$$f $(distdir)/$$f"; \
cp -pR $(srcdir)/$$f $(distdir)/$$f || exit 1; \
fi; \
done;
nobase_dist_iconset_DATA = \
$(srcdir)/*/16x16/* \
$(srcdir)/*/32x32/* \
$(srcdir)/*/48x48/* \
$(srcdir)/transports/*/16x16/* \
$(srcdir)/transports/*/32x32/* \
$(srcdir)/transports/*/48x48/*
MAINTAINERCLEANFILES = Makefile.in

View File

@ -1,38 +1,4 @@
moodsdir = $(pkgdatadir)/data/moods
moods_DATA =
MOODS_DIRS = **
MOODS_FILES = **/{*.png,*.gif}
install-data-local:
@for d in $$(cd $(srcdir); echo $(MOODS_DIRS));do \
if test -d $(srcdir)/$$d;then \
echo " $(mkinstalldirs) $(DESTDIR)$(pkgdatadir)/data/moods/$$d"; \
$(mkinstalldirs) $(DESTDIR)$(pkgdatadir)/data/moods/$$d || exit 1; \
fi; \
done; \
for f in $$(cd $(srcdir); echo $(MOODS_FILES));do \
if test -f $(srcdir)/$$f; then \
echo " $(INSTALL_DATA) $(srcdir)/$$f $(DESTDIR)$(pkgdatadir)/data/moods/$$f"; \
$(INSTALL_DATA) $(srcdir)/$$f $(DESTDIR)$(pkgdatadir)/data/moods/$$f || exit 1; \
fi; \
done;
dist-hook:
@for d in $$(cd $(srcdir); echo $(MOODS_DIRS));do \
if test -d $(srcdir)/$$d;then \
echo " $(mkdir_p) $(distdir)/$$d"; \
$(mkdir_p) $(distdir)/$$d || exit 1; \
fi; \
done; \
for f in $$(cd $(srcdir); echo $(MOODS_FILES));do \
if test -f $(srcdir)/$$f; then \
echo " cp -pR $(srcdir)/$$f $(distdir)/$$f"; \
cp -pR $(srcdir)/$$f $(distdir)/$$f || exit 1; \
fi; \
done;
nobase_dist_moods_DATA = $(srcdir)/*/*
MAINTAINERCLEANFILES = Makefile.in

View File

@ -1,19 +1,15 @@
pixmapsdir = $(pkgdatadir)/data/pixmaps
pixmaps_DATA = $(srcdir)/*.png \
gajim.svg \
gajim.ico
pixmapseventsdir = $(pkgdatadir)/data/pixmaps/events
pixmapsevents_DATA = $(srcdir)/events/*.png
pixmapsagentsdir = $(pkgdatadir)/data/pixmaps/agents
pixmapsagents_DATA = $(srcdir)/agents/*.png
EXTRA_DIST = $(pixmaps_DATA) $(pixmapsevents_DATA) $(pixmapsagents_DATA)
nobase_dist_pixmaps_DATA = \
$(srcdir)/events/*.png \
$(srcdir)/agents/*.png \
$(srcdir)/*.png \
$(srcdir)/gajim.svg \
$(srcdir)/gajim.ico
gajimpixmapdir = $(datadir)/pixmaps
gajimpixmap_DATA = gajim.png \
gajim.svg \
gajim_about.png
gajimpixmap_DATA = \
$(srcdir)/gajim.png \
$(srcdir)/gajim.svg \
$(srcdir)/gajim_about.png
MAINTAINERCLEANFILES = Makefile.in

View File

@ -1,38 +1,4 @@
iconsdir = $(pkgdatadir)/icons
icons_DATA =
ICONS_DIRS = **/**/**
ICONS_FILES = **/**/**/{*.png,*.svg}
install-data-local:
@for d in $$(cd $(srcdir); echo $(ICONS_DIRS));do \
if test -d $(srcdir)/$$d;then \
echo " $(mkinstalldirs) $(DESTDIR)$(pkgdatadir)/icons/$$d"; \
$(mkinstalldirs) $(DESTDIR)$(pkgdatadir)/icons/$$d || exit 1; \
fi; \
done; \
for f in $$(cd $(srcdir); echo $(ICONS_FILES));do \
if test -f $(srcdir)/$$f; then \
echo " $(INSTALL_DATA) $(srcdir)/$$f $(DESTDIR)$(pkgdatadir)/icons/$$f"; \
$(INSTALL_DATA) $(srcdir)/$$f $(DESTDIR)$(pkgdatadir)/icons/$$f || exit 1; \
fi; \
done;
dist-hook:
@for d in $$(cd $(srcdir); echo $(ICONS_DIRS));do \
if test -d $(srcdir)/$$d;then \
echo " $(mkdir_p) $(distdir)/$$d"; \
$(mkdir_p) $(distdir)/$$d || exit 1; \
fi; \
done; \
for f in $$(cd $(srcdir); echo $(ICONS_FILES));do \
if test -f $(srcdir)/$$f; then \
echo " cp -pR $(srcdir)/$$f $(distdir)/$$f"; \
cp -pR $(srcdir)/$$f $(distdir)/$$f || exit 1; \
fi; \
done;
nobase_dist_icons_DATA = $(srcdir)/*/*/*/*
MAINTAINERCLEANFILES = Makefile.in