Mirror of the Rel4tion website/wiki source, view at <http://rel4tion.org>

[[ 🗃 ^yEzqv rel4tion-wiki ]] :: [📥 Inbox] [📤 Outbox] [🐤 Followers] [🤝 Collaborators] [🛠 Commits]

Clone

HTTPS: git clone https://vervis.peers.community/repos/yEzqv

SSH: git clone USERNAME@vervis.peers.community:yEzqv

Branches

Tags

master :: projects / code-skeleton / features /

makefile-am.mdwn

The following target, including the comments, comes from the top-level Makefile.am of the “GNU hello” example program. It seems to work on files ending with .c and .h, which is not portable because I use C++ and it just won’t work for me. Besides allowing to choose other file extensions (like hpp and cpp) it can be nice to:

  1. Make it scan other files which need translation, like the gschema files, Glade xml files, other data files translated with gettext, etc.
  2. Move the updated complete script to a separate file (to include in dist), and then maybe make the po-check target simply call the script

[[!format make """ # Verify that all source files using () are listed in po/POTFILES.in. # The idea is to run this before making pretests, as well as official # releases, so that translators will be sure to have all the messages. # (From coreutils.) po-check: if test -f po/POTFILES.in; then
grep -E -v ‘^(#|
$$)' po/POTFILES.in \ | grep -v '^src/false\.c$$
’ | sort > $@-1;
files=;
for file in
$$($(CVS_LIST_EXCEPT)) `find * -name '*.[ch]'`; do \ case $$
file in
djgpp/* | man/) continue;;
esac;
case
$$file in \ *.[ch]) \ base=`expr " $$
file" : ’ (.
)..’`;
{ test -f
base.l||test − f
base.y; } && continue;;
esac;
files=“
files
file”;
done;
grep -E -l ’N?
|gettext )([^)"](“|
)′
files
| sort -u > $@-2;
diff -u $@-1 $@-2 || exit 1;
rm -f $@-1 $@-2;
fi”""]]

[See repo JSON]