joewing / jwm

Joe's Window Manager
http://joewing.net/projects/jwm
MIT License
520 stars 84 forks source link

Translations not installing - automake (GNU automake) 1.16.2 #565

Closed 01micko closed 2 years ago

01micko commented 2 years ago

Sorry this is a duplicate of #556

I do not think this is a JWM bug!

It appears to be a gettext/automake bug.

possible work around

--- autogen.sh.orig 2022-05-14 15:12:23.091734737 +1000
+++ autogen.sh  2022-05-14 14:57:02.587762031 +1000
@@ -3,3 +3,4 @@
 automake -ac
 autoreconf -fi
 touch config.rpath
+sed -i 's/@mkdir_p@/@MKDIR_P@/' po/Makefile.in.in

Take a look at this:

po/Makefile.in.in (this looks fine)

# We use $(mkdir_p).
# In automake <= 1.9.x, $(mkdir_p) is defined either as "mkdir -p --" or as
# "$(mkinstalldirs)" or as "$(install_sh) -d". For these automake versions,
# @install_sh@ does not start with $(SHELL), so we add it.
# In automake >= 1.10, @mkdir_p@ is derived from ${MKDIR_P}, which is defined
# either as "/path/to/mkdir -p" or ".../install-sh -c -d". For these automake
# versions, $(mkinstalldirs) and $(install_sh) are unused.
mkinstalldirs = $(SHELL) @install_sh@ -d
install_sh = $(SHELL) @install_sh@
MKDIR_P = @MKDIR_P@
mkdir_p = @mkdir_p@

po/Makefile.in ( @mkdir_p@ is not resolved, but we aren't there yet)

# We use $(mkdir_p).
# In automake <= 1.9.x, $(mkdir_p) is defined either as "mkdir -p --" or as
# "$(mkinstalldirs)" or as "$(install_sh) -d". For these automake versions,
# @install_sh@ does not start with $(SHELL), so we add it.
# In automake >= 1.10, @mkdir_p@ is derived from ${MKDIR_P}, which is defined
# either as "/path/to/mkdir -p" or ".../install-sh -c -d". For these automake
# versions, $(mkinstalldirs) and $(install_sh) are unused.
mkinstalldirs = $(SHELL) @install_sh@ -d
install_sh = $(SHELL) @install_sh@
MKDIR_P = /bin/mkdir -p
mkdir_p = @mkdir_p@

po/Makefile (@mkdir_p@ ought to be resolved by now or we are in a broken state for installation)

# We use $(mkdir_p).
# In automake <= 1.9.x, $(mkdir_p) is defined either as "mkdir -p --" or as
# "$(mkinstalldirs)" or as "$(install_sh) -d". For these automake versions,
# @install_sh@ does not start with $(SHELL), so we add it.
# In automake >= 1.10, @mkdir_p@ is derived from ${MKDIR_P}, which is defined
# either as "/path/to/mkdir -p" or ".../install-sh -c -d". For these automake
# versions, $(mkinstalldirs) and $(install_sh) are unused.
mkinstalldirs = $(SHELL) @install_sh@ -d
install_sh = $(SHELL) @install_sh@
MKDIR_P = /bin/mkdir -p
mkdir_p = @mkdir_p@

I'd like to hear from anyone who can reproduce this and quote your automake --version please. I need to make sure that this isn't something wrong with my setup (and BTW, I'm running latest git with a patch for po/pt_BR.po removing the tilde from the first 4 comments. See #564 )

joewing commented 2 years ago

I think it might be your setup. This works fine for me, even without changing anything. I'm using automake 1.16.4 and gettext 0.21.

01micko commented 2 years ago

Well, I've done a proper fix at my end and it works, both for 2.4.1 and latest git pull.

See, https://www.gnu.org/software/automake/manual/html_node/Public-Macros.html#index-AM_005fINIT_005fAUTOMAKE-1

I'm sure it doesn't harm anything so I'll issue a PR for this and for #564