]> git.draconx.ca Git - cdecl99.git/blobdiff - Makefile.am
Document libcdecl's slice of the C namespaces.
[cdecl99.git] / Makefile.am
index 604802983aaed2754949667ec9bdcd26e6ea2968..de6c066c1064f4f82418a29721f9517854f1b4b8 100644 (file)
@@ -79,7 +79,7 @@ po/$(PACKAGE).pot: $(SOURCES)
        $(AM_V_at)$(MKDIR_P) $(@D)
        $(AM_V_GEN)$(MSGFMT) -c -o $@ $<
 
-install-data-hook: install-mo
+install-data-local: install-mo
 install-mo: $(MOFILES)
        for mo in $?; do \
                lang=`expr "$$mo" : '.*/\(.*\)\.mo' \| "$$mo" : '\(.*\)\.mo'`; \
@@ -90,13 +90,45 @@ install-mo: $(MOFILES)
                $(INSTALL_DATA) "$$mo" "$$inst/$(PACKAGE).mo" || exit $$?; \
                set +x; \
        done
-.PHONY: install-mo
+
+installdirs-local: installdirs-mo
+installdirs-mo:
+       for mo in $(MOFILES); do \
+               lang=`expr "$$mo" : '.*/\(.*\)\.mo' \| "$$mo" : '\(.*\)\.mo'`; \
+               test x"$$lang" = x"" && exit 1; \
+               inst="$(DESTDIR)$(localedir)/$$lang/LC_MESSAGES"; \
+               set -x; \
+               $(MKDIR_P) "$$inst" || exit $$?; \
+               set +x; \
+       done
+
+uninstall-local: uninstall-mo
+uninstall-mo:
+       for mo in $(ALL_MOFILES); do \
+               lang=`expr "$$mo" : '.*/\(.*\)\.mo' \| "$$mo" : '\(.*\)\.mo'`; \
+               test x"$$lang" = x"" && exit 1; \
+               inst="$(DESTDIR)$(localedir)/$$lang/LC_MESSAGES"; \
+               set -x; \
+               cd "$$inst" && rm -f '$(PACKAGE).mo'; \
+               set +x; \
+       done
+
+.PHONY: install-mo installdirs-mo uninstall-mo
 
 # These are required to prevent the builtin lex/yacc rules from
 # superseding ours...
 src/scan.c src/scan.h: src/scan.stamp
 src/parse.c src/parse.h: src/parse.stamp
 
+# The flex/bison rules refrain from updating unchanged headers for the
+# convenience of developers, but the headers must be distributed with
+# up-to-date timestamps, otherwise make will try to update them in a fresh
+# VPATH build.
+dist-hook: update-headers
+update-headers:
+       touch -c '$(distdir)/src/scan.h'
+       touch -c '$(distdir)/src/parse.h'
+
 # Supporting rules for bison/flex.
 
 BISON_V   = $(BISON_V_$(V))