mirror of
https://github.com/rkd77/elinks.git
synced 2025-04-18 00:47:36 -04: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
|
### 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
|
# otherwise packages like GCC can not be built if only parts of the source have
|
||||||
# been downloaded.
|
# 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
|
# 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!
|
# not been added to the git repo. Beware of junk entries!
|
||||||
|
|
||||||
$(srcdir)/$(POTFILES_ABS_LIST):
|
$(srcdir)$(POTFILES_ABS_LIST):
|
||||||
@( cd $(top_srcdir); \
|
@( cd $(top_srcdir); \
|
||||||
find src/ -type f -name '*.[ch]' -o -name options.inc -o -name 'actions-*.inc' | sort ) \
|
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) \
|
$(XGETTEXT) --default-domain=$(PACKAGE) \
|
||||||
--directory=$(top_srcdir) \
|
--directory=$(top_srcdir) \
|
||||||
--add-comments --language=C \
|
--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 \
|
&& test -f $(PACKAGE).po \
|
||||||
&& mv -f $(PACKAGE).po $(srcdir)/$(PACKAGE).pot
|
&& mv -f $(PACKAGE).po $(srcdir)$(PACKAGE).pot
|
||||||
|
|
||||||
|
|
||||||
### Updating po and gmo files
|
### 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
|
# 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
|
# 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)
|
@cd $(srcdir)
|
||||||
@$(foreach lang,$(basename $(if $(strip $(PO)),$(PO),$(GMOFILES))), \
|
@$(foreach lang,$(basename $(if $(strip $(PO)),$(PO),$(GMOFILES))), \
|
||||||
echo -n "$(lang): "; \
|
echo -n "$(lang): "; \
|
||||||
if $(MSGMERGE) $(srcdir)/$(lang).po $(srcdir)/$(PACKAGE).pot -o $(lang).new.po; then \
|
if $(MSGMERGE) $(srcdir)$(lang).po $(srcdir)$(PACKAGE).pot -o $(lang).new.po; then \
|
||||||
mv -f $(lang).new.po $(srcdir)/$(lang).po; \
|
mv -f $(lang).new.po $(srcdir)$(lang).po; \
|
||||||
else \
|
else \
|
||||||
echo "msgmerge failed!"; \
|
echo "msgmerge failed!"; \
|
||||||
rm -f $(lang).new.po; \
|
rm -f $(lang).new.po; \
|
||||||
@ -89,7 +89,7 @@ update-gmo: Makefile $(GMOFILES)
|
|||||||
check-po:
|
check-po:
|
||||||
@$(foreach lang,$(basename $(if $(strip $(PO)),$(PO),$(GMOFILES))), \
|
@$(foreach lang,$(basename $(if $(strip $(PO)),$(PO),$(GMOFILES))), \
|
||||||
echo -n "$(lang): "; \
|
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
|
### Installation and distribution
|
||||||
@ -104,6 +104,6 @@ install-local: all-local
|
|||||||
)
|
)
|
||||||
|
|
||||||
clean-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
|
include $(top_srcdir)/Makefile.lib
|
||||||
|
Loading…
x
Reference in New Issue
Block a user