mirror of
https://github.com/rkd77/elinks.git
synced 2024-12-04 14:46:47 -05:00
Fix po/Makefile w.r.t. the new value of $(srcdir) when srcdir == buildir
This commit is contained in:
parent
34588e976d
commit
bb463d17f2
22
po/Makefile
22
po/Makefile
@ -25,7 +25,7 @@ quiet_cmd_gmsgfmt = ' [$(PO_COLOR)GMSGFMT$(END_COLOR)] $(RELPATH)$(@)'
|
||||
|
||||
### The default rule
|
||||
#
|
||||
# Note: Target `all-local' must not depend on target '$(srcdir)/$(PACKAGE).pot',
|
||||
# Note: Target `all-local' must not depend on target '$(srcdir)$(PACKAGE).pot',
|
||||
# otherwise packages like GCC can not be built if only parts of the source have
|
||||
# been downloaded.
|
||||
#
|
||||
@ -45,18 +45,18 @@ all-local: $(CATALOGS)
|
||||
# This pulls in _all_ .c and .h files in the src directory. Even files that has
|
||||
# not been added to the git repo. Beware of junk entries!
|
||||
|
||||
$(srcdir)/$(POTFILES_ABS_LIST):
|
||||
$(srcdir)$(POTFILES_ABS_LIST):
|
||||
@( cd $(top_srcdir); \
|
||||
find src/ -type f -name '*.[ch]' -o -name options.inc -o -name 'actions-*.inc' | sort ) \
|
||||
> $(srcdir)/$(POTFILES_ABS_LIST)
|
||||
> $(srcdir)$(POTFILES_ABS_LIST)
|
||||
|
||||
$(srcdir)/$(PACKAGE).pot: $(srcdir)/$(POTFILES_ABS_LIST)
|
||||
$(srcdir)$(PACKAGE).pot: $(srcdir)$(POTFILES_ABS_LIST)
|
||||
$(XGETTEXT) --default-domain=$(PACKAGE) \
|
||||
--directory=$(top_srcdir) \
|
||||
--add-comments --language=C \
|
||||
--keyword=_ --keyword=N_ --keyword=n_:1,2 --keyword=N__ -f $(srcdir)/$(POTFILES_ABS_LIST) \
|
||||
--keyword=_ --keyword=N_ --keyword=n_:1,2 --keyword=N__ -f $(srcdir)$(POTFILES_ABS_LIST) \
|
||||
&& test -f $(PACKAGE).po \
|
||||
&& mv -f $(PACKAGE).po $(srcdir)/$(PACKAGE).pot
|
||||
&& mv -f $(PACKAGE).po $(srcdir)$(PACKAGE).pot
|
||||
|
||||
|
||||
### Updating po and gmo files
|
||||
@ -66,12 +66,12 @@ $(srcdir)/$(PACKAGE).pot: $(srcdir)/$(POTFILES_ABS_LIST)
|
||||
# It is possible to update only a single .po file by setting the PO variable to
|
||||
# either <lang> or <lang>.po when calling make. Example: make update-po PO=is
|
||||
|
||||
update-po: Makefile $(srcdir)/$(PACKAGE).pot
|
||||
update-po: Makefile $(srcdir)$(PACKAGE).pot
|
||||
@cd $(srcdir)
|
||||
@$(foreach lang,$(basename $(if $(strip $(PO)),$(PO),$(GMOFILES))), \
|
||||
echo -n "$(lang): "; \
|
||||
if $(MSGMERGE) $(srcdir)/$(lang).po $(srcdir)/$(PACKAGE).pot -o $(lang).new.po; then \
|
||||
mv -f $(lang).new.po $(srcdir)/$(lang).po; \
|
||||
if $(MSGMERGE) $(srcdir)$(lang).po $(srcdir)$(PACKAGE).pot -o $(lang).new.po; then \
|
||||
mv -f $(lang).new.po $(srcdir)$(lang).po; \
|
||||
else \
|
||||
echo "msgmerge failed!"; \
|
||||
rm -f $(lang).new.po; \
|
||||
@ -89,7 +89,7 @@ update-gmo: Makefile $(GMOFILES)
|
||||
check-po:
|
||||
@$(foreach lang,$(basename $(if $(strip $(PO)),$(PO),$(GMOFILES))), \
|
||||
echo -n "$(lang): "; \
|
||||
$(GMSGFMT) --check --check-accelerators="~" --verbose --statistics -o /dev/null $(srcdir)/$(lang).po; \
|
||||
$(GMSGFMT) --check --check-accelerators="~" --verbose --statistics -o /dev/null $(srcdir)$(lang).po; \
|
||||
)
|
||||
|
||||
### Installation and distribution
|
||||
@ -104,6 +104,6 @@ install-local: all-local
|
||||
)
|
||||
|
||||
clean-local:
|
||||
@rm -f $(PACKAGE).po *.new.po $(srcdir)/$(POTFILES_ABS_LIST)
|
||||
@rm -f $(PACKAGE).po *.new.po $(srcdir)$(POTFILES_ABS_LIST)
|
||||
|
||||
include $(top_srcdir)/Makefile.lib
|
||||
|
Loading…
Reference in New Issue
Block a user