~ubuntu-branches/ubuntu/wily/hamster-applet/wily

« back to all changes in this revision

Viewing changes to gnome-doc-utils.make

  • Committer: Krzysztof Klimonda
  • Date: 2010-05-14 14:48:33 UTC
  • mfrom: (1.5.1 upstream)
  • mto: This revision was merged to the branch mainline in revision 22.
  • Revision ID: kklimonda@syntaxhighlighted.com-20100514144833-uyn06wrtyrsobf07
New upstream release. (LP: #580522)

Show diffs side-by-side

added added

removed removed

Lines of Context:
266
266
.PHONY: po
267
267
po: $(_DOC_POFILES)
268
268
 
 
269
## @ _DOC_MOFILES
 
270
## The .mo files used for translating the document
 
271
_DOC_MOFILES = $(patsubst %.po,%.mo,$(_DOC_POFILES))
 
272
 
 
273
.PHONY: mo
 
274
mo: $(_DOC_MOFILES)
 
275
 
269
276
## @ _DOC_LC_MODULES
270
277
## The top-level documentation files in all other locales
271
278
_DOC_LC_MODULES = $(if $(DOC_MODULE),                                           \
332
339
            $(_xml2po) -m $(_xml2po_mode) -e -u $(notdir $@) $$docs); \
333
340
        fi
334
341
 
 
342
$(_DOC_MOFILES): %.mo: %.po
 
343
        @if ! test -d $(dir $@); then \
 
344
          echo "mkdir $(dir $@)"; \
 
345
          mkdir "$(dir $@)"; \
 
346
        fi
 
347
        msgfmt -o $@ $<
 
348
 
335
349
# FIXME: fix the dependancy
336
350
# FIXME: hook xml2po up
337
 
$(_DOC_LC_DOCS) : $(_DOC_POFILES)
 
351
$(_DOC_LC_DOCS) : $(_DOC_MOFILES)
338
352
$(_DOC_LC_DOCS) : $(_DOC_C_DOCS)
339
353
        if ! test -d $(dir $@); then mkdir $(dir $@); fi
340
354
        if [ -f "C/$(notdir $@)" ]; then d="../"; else d="$(_DOC_ABS_SRCDIR)/"; fi; \
341
 
        po="$(dir $@)$(patsubst %/$(notdir $@),%,$@).po"; \
342
 
        if [ -f "$${po}" ]; then po="../$${po}"; else po="$(_DOC_ABS_SRCDIR)/$${po}"; fi; \
 
355
        mo="$(dir $@)$(patsubst %/$(notdir $@),%,$@).mo"; \
 
356
        if [ -f "$${mo}" ]; then mo="../$${mo}"; else mo="$(_DOC_ABS_SRCDIR)/$${mo}"; fi; \
343
357
        (cd $(dir $@) && \
344
 
          $(_xml2po) -m $(_xml2po_mode) -e -p "$${po}" \
 
358
          $(_xml2po) -m $(_xml2po_mode) -e -t "$${mo}" \
345
359
            "$${d}C/$(notdir $@)" > $(notdir $@).tmp && \
346
360
            cp $(notdir $@).tmp $(notdir $@) && rm -f $(notdir $@).tmp)
347
361
 
386
400
clean-doc-dsk: ; rm -f $(_DOC_DSK_DB) $(_DOC_DSK_HTML)
387
401
clean-doc-lc:
388
402
        rm -f $(_DOC_LC_DOCS)
 
403
        rm -f $(_DOC_MOFILES)
389
404
        @list='$(_DOC_POFILES)'; for po in $$list; do \
390
405
          if ! test "$$po" -ef "$(srcdir)/$$po"; then \
391
406
            echo "rm -f $$po"; \
392
407
            rm -f "$$po"; \
393
408
          fi; \
394
409
        done
 
410
#       .xml2.po.mo cleaning is obsolete as of 0.18.1 and could be removed in 0.20.x
395
411
        @for lc in C $(_DOC_REAL_LINGUAS); do \
396
412
          if test -f "$$lc/.xml2po.mo"; then \
397
413
            echo "rm -f $$lc/.xml2po.mo"; \