Initial revision
[mikachu/openbox.git] / nls / C / Makefile.am
1 # nls/C/Makefile.am for Openbox
2
3 NLSTEST = @NLS@
4 CLEANFILES = openbox.cat
5 MAINTAINERCLEANFILES = Makefile.in Translation.m
6 DISTCLEANFILES = Translation.m
7 MFILES = @srcdir@/BaseDisplay.m @srcdir@/Basemenu.m @srcdir@/Configmenu.m @srcdir@/Icon.m @srcdir@/Image.m @srcdir@/Screen.m @srcdir@/Slit.m @srcdir@/Toolbar.m @srcdir@/Window.m @srcdir@/Windowmenu.m @srcdir@/Workspace.m @srcdir@/Workspacemenu.m @srcdir@/openbox.m @srcdir@/common.m @srcdir@/main.m @srcdir@/bsetroot.m
8
9 all-local: Translation.m openbox.cat
10 install-data-local: openbox.cat
11         @if test x$(NLSTEST) = "x-DNLS"; then \
12                 echo "Installing catalog in $(DESTDIR)$(pkgdatadir)/nls/C"; \
13                 $(mkinstalldirs) $(DESTDIR)$(pkgdatadir)/nls/C; \
14                 $(INSTALL_DATA) openbox.cat $(DESTDIR)$(pkgdatadir)/nls/C; \
15                 rm -f $(DESTDIR)$(pkgdatadir)/nls/US_ASCII; \
16                 ln -f -ss C $(DESTDIR)$(pkgdatadir)/nls/US_ASCII; \
17                 rm -f $(DESTDIR)$(pkgdatadir)/nls/POSIX; \
18                 ln -f -s C $(DESTDIR)$(pkgdatadir)/nls/POSIX; \
19                 rm -f $(DESTDIR)$(pkgdatadir)/nls/en_US; \
20                 ln -f -s C $(DESTDIR)$(pkgdatadir)/nls/en_US; \
21                 rm -f $(DESTDIR)$(pkgdatadir)/nls/en; \
22                 ln -f -s C $(DESTDIR)$(pkgdatadir)/nls/en; \
23         fi
24 uninstall-local:
25         @if test x$(NLSTEST) = "x-DNLS"; then \
26                 rm -f $(DESTDIR)$(pkgdatadir)/nls/C/openbox.cat; \
27                 rm -f $(DESTDIR)$(pkgdatadir)/nls/US_ASCII; \
28                 rm -f $(DESTDIR)$(pkgdatadir)/nls/POSIX; \
29                 rm -f $(DESTDIR)$(pkgdatadir)/nls/en_US; \
30                 rm -f $(DESTDIR)$(pkgdatadir)/nls/en; \
31                 rmdir $(DESTDIR)$(pkgdatadir)/nls/C; \
32         fi
33
34 # note... when adding new catalogs... you do not need the
35 # header=../openbox-nls.h which is passed to awk... we
36 # only need to generate it once.
37
38 Translation.m: $(MFILES)
39         awk -f @srcdir@/../convert.awk header=../openbox-nls.h \
40                 output=Translation.m $(MFILES)
41
42 openbox.cat: Translation.m
43         @if test x$(NLSTEST) = "x-DNLS"; then \
44                 $(gencat_cmd) openbox.cat Translation.m; \
45         fi
46
47 distclean-local:
48         rm -f *\~