cvsimport
[fvwm-themes.git] / Makefile.am
blobeb268d96d9f0593baa55709d94a53f852b62cad1
1 ## Process this file with automake to produce Makefile.in
2 ## Makefile.am for fvwm-themes.
4 AUTOMAKE_OPTIONS = foreign
5 SUBDIRS = bin debian doc rpm scripts forms locale menu-system
6 FT_DATA_SUBDIRS = themes images sounds
7 EXTRA_DIST = images.tar.gz sounds.tar.gz
8 release = 0.`date +%Y%m%d`
10 EXTRA_THEMES = @EXTRA_THEMES@
12 install-data-local:
13         FT_DATADIR=@FT_DATADIR@
14         GNOME_IMAGES_DIR=@GNOME_IMAGES_DIR@
15         SETTINGS_FILE=@SETTINGS_FILE@
16         GNOME_ICONS=@GNOME_ICONS@
17         KDE2_ICONS=@KDE2_ICONS@
18         BUILD_MENUS=@BUILD_MENUS@
19         RUN_UPDATEMENU=@RUN_UPDATEMENU@
20         UPDATE_MENU=@UPDATE_MENU@
22         $(mkinstalldirs) $(FT_DATADIR)
23         for dir in $(FT_DATA_SUBDIRS); do \
24                 chmod -R o-w,go+rX $$dir 2>/dev/null || true; \
25                 rm -rf "$(DESTDIR)$(FT_DATADIR)/$$dir"; \
26                 (if test -f $(top_srcdir)/$$dir.tar.gz; then gzip -dc $(top_srcdir)/$$dir.tar.gz || exit 201; \
27                 else cd $(top_srcdir) && $(TAR) cpf - $$dir || exit 202; fi) | \
28                 (cd "$(DESTDIR)$(FT_DATADIR)" && $(TAR) xfBp - || exit 203); \
29                 find "$(DESTDIR)$(FT_DATADIR)/$$dir" -name CVS -exec rm -r {} \; 2>/dev/null; \
30         done
32         sed -e "s,xGNOME_IMAGES_DIRx,$(GNOME_IMAGES_DIR),g" \
33                 $(DESTDIR)$(SETTINGS_FILE) > $(DESTDIR)$(SETTINGS_FILE).tmp && \
34         mv -f $(DESTDIR)$(SETTINGS_FILE).tmp $(DESTDIR)$(SETTINGS_FILE)
36         PATH="$(DESTDIR)$(bindir):$(FVWM_BINDIR):$$PATH"; \
37         $(DESTDIR)$(bindir)/fvwm-themes-config --site --reset
39         if test "$(BUILD_MENUS)" = "yes"; then \
40                 $(DESTDIR)$(bindir)/fvwm-themes-menuapp --site --build-menus --remove-popup; \
41         fi
43         if test "$(GNOME_ICONS)" = "yes"; then \
44                 $(DESTDIR)$(bindir)/fvwm-themes-images --ft-install --gnome; \
45         fi
47         if test "$(KDE2_ICONS)" = "yes"; then \
48                 $(DESTDIR)$(bindir)/fvwm-themes-images --ft-install --kde2; \
49         fi
51         if test "$(RUN_UPDATEMENU)" = "yes"; then \
52                 $(UPDATE_MENU); \
53         fi
55         @echo
56         @echo ------------------------------------------------------------------------------
57         @echo "fvwm-themes is successfully installed."
58         @test x"$(DESTDIR)" != x && echo "DESTDIR prefix is $(DESTDIR)" || true
59         @echo " themes and data: in $(FT_DATADIR)"
60         @echo " shell scripts:   in $(bindir)"
61         @echo " manual pages:    in $(mandir)"
62         @echo 'Put fvwm-themes-start as the last command of .Xclients/.xinitrc/.xsession'
63         @echo ==============================================================================
64         @echo
66 uninstall-local:
67         FT_DATADIR=@FT_DATADIR@
69         for dir in $(FT_DATA_SUBDIRS); do \
70                 rm -rf $(DESTDIR)$(FT_DATADIR)/$$dir; \
71         done
73         @echo
74         @echo ------------------------------------------------------------------------------
75         @echo "Ok, fvwm-themes is uninstalled."
76         @echo "Don't forget to come back to fvwm-themes later. :-)"
77         @echo ==============================================================================
78         @echo
80 dist-hook:
81         cp -rpd $(top_srcdir)/themes $(distdir)
82         find $(distdir)/themes -name CVS -exec rm -r {} \; 2>/dev/null || true
85 ## ---------------------------------------------------------------------------
86 ## Manage bzip2 archive together with gzip archive
87 #  Usage:
88 #    make dist2       # instead of make dist
89 #    make distcheck2  # instead of make distcheck
90 #    make distclean2  # instead of make distclean
92 cleanup-cvs:
93         find . -name '.#*' -exec rm \{\} \; >/dev/null
95 dist2: cleanup-cvs dist
96         gzip -dc $(distdir).tar.gz | bzip2 -9 >$(distdir).tar.bz2
98 distcheck2: distcheck dist2
99         @banner="$(distdir).tar.bz2 - ready for distribution"; \
100         dashes=`echo "$$banner" | sed s/./=/g`; \
101         echo "$$banner"; \
102         echo "$$dashes"
104 distclean2: cleanup-cvs distclean
106 #    make dist3 - creates main and -extra tarballs (tar.gz)
107 #    make dist4 - creates main and -extra tarballs (tar.gz and tar.bz2)
108 #    make dist5 - creates also individual themes tarballs (tar.gz)
109 #    make dist6 - creates also individual themes tarballs (tar.gz and tar.bz2)
111 dist3: cleanup-cvs dist
112         @$(TAR) xzf $(distdir).tar.gz
114         @echo "creating $(PACKAGE)-full-$(VERSION).tar.gz"
115         @mv -f $(distdir) $(PACKAGE)-full-$(VERSION)
116         @$(TAR) czf $(PACKAGE)-full-$(VERSION).tar.gz $(PACKAGE)-full-$(VERSION)
118         @rm -rf $(PACKAGE)-extra-$(VERSION)
119         @mkdir $(PACKAGE)-extra-$(VERSION)
120         @for t in $(EXTRA_THEMES); do \
121                 mv -f $(PACKAGE)-full-$(VERSION)/themes/$$t $(PACKAGE)-extra-$(VERSION)/; \
122         done
124         @echo "creating $(PACKAGE)-$(VERSION).tar.gz"
125         @rm -rf $(PACKAGE)-$(VERSION)
126         @mv -f $(PACKAGE)-full-$(VERSION) $(PACKAGE)-$(VERSION)
127         @$(TAR) czf $(PACKAGE)-$(VERSION).tar.gz $(PACKAGE)-$(VERSION)
128         @rm -r $(PACKAGE)-$(VERSION)
130         @echo "creating $(PACKAGE)-extra-$(VERSION).tar.gz"
131         @$(TAR) czf $(PACKAGE)-extra-$(VERSION).tar.gz $(PACKAGE)-extra-$(VERSION)
132         @rm -r $(PACKAGE)-extra-$(VERSION)
134 dist4: dist3
135         @echo "creating $(PACKAGE)-full-$(VERSION).tar.bz2"
136         @gzip -dc $(PACKAGE)-full-$(VERSION).tar.gz | bzip2 -9 >$(PACKAGE)-full-$(VERSION).tar.bz2
138         @echo "creating $(PACKAGE)-$(VERSION).tar.bz2"
139         @gzip -dc $(PACKAGE)-$(VERSION).tar.gz | bzip2 -9 >$(PACKAGE)-$(VERSION).tar.bz2
141         @echo "creating $(PACKAGE)-extra-$(VERSION).tar.bz2"
142         @gzip -dc $(PACKAGE)-extra-$(VERSION).tar.gz | bzip2 -9 >$(PACKAGE)-extra-$(VERSION).tar.bz2
144 dist5: dist3
145         @$(TAR) xzf $(PACKAGE)-extra-$(VERSION).tar.gz
146         @for t in $(EXTRA_THEMES); do \
147                 echo "creating ft-$$t-$(VERSION).tar.gz"; \
148                 rm -rf ft-$$t-$(VERSION); \
149                 mkdir ft-$$t-$(VERSION); \
150                 mv -f $(PACKAGE)-extra-$(VERSION)/$$t ft-$$t-$(VERSION); \
151                 $(TAR) czf ft-$$t-$(VERSION).tar.gz ft-$$t-$(VERSION); \
152                 rm -r ft-$$t-$(VERSION); \
153         done
154         @rm -r $(PACKAGE)-extra-$(VERSION)
156 dist6: dist5
157         @for t in $(EXTRA_THEMES); do \
158                 echo "creating ft-$$t-$(VERSION).tar.bz2"; \
159                 gzip -dc ft-$$t-$(VERSION).tar.gz | bzip2 -9 >ft-$$t-$(VERSION).tar.bz2; \
160         done
163 ## ---------------------------------------------------------------------------
164 ## Produce an rpm package using dist or from the given tarball
165 #  Usage:
166 #    make rpm-dist
167 #    make release=1 rpm-dist
168 #    make rpm-this
169 #    make version=2.3.22 release=2 rpm-this
170 #    make rpm-dist cparams='--enable-gnome --quiet' mparams='CFLAGS="-O2 -g"'
171 #    make rpm-dist3  # creates -base and -extra rpms
172 #    make rpm-dist5  # creates individual themes rpms
174 rpm-dist: dist3 rpm-this
176 rpm-dist3: dist3 rpm-this3
178 rpm-dist5: dist5 rpm-this-themes
180 # automatical regeneration is missing for other dirs, so do it explicitly
181 rpm-regenerate:
182         (cd rpm && $(MAKE) $(AM_MAKEFLAGS) Makefile *.spec) || exit 1
184 rpm-this: rpm-regenerate
185         (cd rpm && $(MAKE) $(AM_MAKEFLAGS) this) || exit 1
187 rpm-this3: rpm-this-base rpm-this-extra
189 rpm-this-base: rpm-regenerate
190         (cd rpm && $(MAKE) $(AM_MAKEFLAGS) this-base) || exit 1
192 rpm-this-extra: rpm-regenerate
193         (cd rpm && $(MAKE) $(AM_MAKEFLAGS) this-extra) || exit 1
195 rpm-this-themes: rpm-regenerate
196         (cd rpm && $(MAKE) $(AM_MAKEFLAGS) this-themes) || exit 1
198 ## ---------------------------------------------------------------------------
199 ## Produce a deb package
200 ## you need fakeroot and dpkg
201 #  Usage:
202 #    make deb-dist   # creates -full deb
203 #    make release=1 deb-dist
204 #    make deb-this
205 #    make version=2.3.22 release=2 deb-this
206 #    make deb-dist cparams='--enable-gnome --quiet' mparams='CFLAGS="-O2 -g"'
207 #    make deb-dist3  # creates -base and -extra debs
208 #    make deb-inplace release=1.mg  # works on sources directly
210 # automatical regeneration is missing for other dirs, so do it explicitly
211 deb-regenerate:
212         (cd debian && $(MAKE) $(AM_MAKEFLAGS) Makefile *-control) || exit 1
214 deb-dist: dist deb-this
216 deb-dist3: dist deb-this-base deb-this-extra
218 deb-this: deb-regenerate
219         $(MAKE) -f debian/Makefile $(AM_MAKEFLAGS) this
221 deb-this-base: deb-regenerate
222         $(MAKE) -f debian/Makefile $(AM_MAKEFLAGS) this-base
224 deb-this-extra: deb-regenerate
225         $(MAKE) -f debian/Makefile $(AM_MAKEFLAGS) this-extra
227 deb-inplace: deb-regenerate
228         $(MAKE) -f debian/Makefile $(AM_MAKEFLAGS) inplace
230 deb-inplace-base: deb-regenerate
231         $(MAKE) -f debian/Makefile $(AM_MAKEFLAGS) inplace-base
233 deb-inplace-extra: deb-regenerate
234         $(MAKE) -f debian/Makefile $(AM_MAKEFLAGS) inplace-extra