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 activitiesdir = $(pkgdatadir)/data/activities
nobase_dist_activities_DATA = $(srcdir)/*/*/*
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;
MAINTAINERCLEANFILES = Makefile.in MAINTAINERCLEANFILES = Makefile.in

View File

@ -1,38 +1,7 @@
emoticonsdir = $(pkgdatadir)/data/emoticons emoticonsdir = $(pkgdatadir)/data/emoticons
nobase_dist_emoticons_DATA = \
emoticons_DATA = $(srcdir)/*/*.png \
$(srcdir)/*/*.gif \
EMOTICONS_DIRS = ** $(srcdir)/*/emoticons.py
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;
MAINTAINERCLEANFILES = Makefile.in MAINTAINERCLEANFILES = Makefile.in

View File

@ -1,39 +1,10 @@
iconsetdir = $(pkgdatadir)/data/iconsets iconsetdir = $(pkgdatadir)/data/iconsets
nobase_dist_iconset_DATA = \
iconset_DATA = $(srcdir)/*/16x16/* \
$(srcdir)/*/32x32/* \
ICONSET_DIRS = **/{16x16,32x32,48x48} \ $(srcdir)/*/48x48/* \
transports/**/{16x16,32x32,48x48} $(srcdir)/transports/*/16x16/* \
$(srcdir)/transports/*/32x32/* \
ICONSET_FILES = **/{16x16,32x32,48x48}/{*.gif,*.png} \ $(srcdir)/transports/*/48x48/*
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;
MAINTAINERCLEANFILES = Makefile.in MAINTAINERCLEANFILES = Makefile.in

View File

@ -1,38 +1,4 @@
moodsdir = $(pkgdatadir)/data/moods moodsdir = $(pkgdatadir)/data/moods
nobase_dist_moods_DATA = $(srcdir)/*/*
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;
MAINTAINERCLEANFILES = Makefile.in MAINTAINERCLEANFILES = Makefile.in

View File

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

View File

@ -1,38 +1,4 @@
iconsdir = $(pkgdatadir)/icons iconsdir = $(pkgdatadir)/icons
nobase_dist_icons_DATA = $(srcdir)/*/*/*/*
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;
MAINTAINERCLEANFILES = Makefile.in MAINTAINERCLEANFILES = Makefile.in