From f01a3a72726949e9e784839803a15a6bcee783f2 Mon Sep 17 00:00:00 2001 From: Bruno Tarquini Date: Sat, 28 Nov 2009 12:54:38 +0100 Subject: [PATCH] autotools: cleanup Makefile.am for data/* and icons. use autotools tricks: nobase_ prefix -> hiearchical installation dist_ prefix -> include files in dist archive --- data/activities/Makefile.am | 36 +------------------------------ data/emoticons/Makefile.am | 39 ++++----------------------------- data/iconsets/Makefile.am | 43 ++++++------------------------------- data/moods/Makefile.am | 36 +------------------------------ data/pixmaps/Makefile.am | 24 +++++++++------------ icons/Makefile.am | 36 +------------------------------ 6 files changed, 24 insertions(+), 190 deletions(-) diff --git a/data/activities/Makefile.am b/data/activities/Makefile.am index ab1eb1751..a0f242a53 100644 --- a/data/activities/Makefile.am +++ b/data/activities/Makefile.am @@ -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 diff --git a/data/emoticons/Makefile.am b/data/emoticons/Makefile.am index 9835dcd6e..1415a2caf 100644 --- a/data/emoticons/Makefile.am +++ b/data/emoticons/Makefile.am @@ -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 diff --git a/data/iconsets/Makefile.am b/data/iconsets/Makefile.am index c609e3df6..d83643525 100644 --- a/data/iconsets/Makefile.am +++ b/data/iconsets/Makefile.am @@ -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 diff --git a/data/moods/Makefile.am b/data/moods/Makefile.am index 0caed1d81..174466374 100644 --- a/data/moods/Makefile.am +++ b/data/moods/Makefile.am @@ -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 diff --git a/data/pixmaps/Makefile.am b/data/pixmaps/Makefile.am index d59751a10..ae122a971 100644 --- a/data/pixmaps/Makefile.am +++ b/data/pixmaps/Makefile.am @@ -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 diff --git a/icons/Makefile.am b/icons/Makefile.am index bdea3806a..fb75f0ef3 100644 --- a/icons/Makefile.am +++ b/icons/Makefile.am @@ -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