lrzip/lzma/C
Eli Schwartz dc6342ea61
build: fix incorrect use of shell commands in handmade libtool file
The "echo" command was soft-deprecated from the shell programming
language in ~1992. There is no way to use it correctly if:

- the "-e" or "-n" or "-E" or any other options are used
- backslash escape sequences are used
- the printed string contains shell variables containing either of the
  above

In recognition of the fact that echo was historically used in many
scripts, some of which avoided these issues and therefore succeeded when
run, the "echo" command was NOT marked as obsolescent, out of fear that
marking it as obsolescent would lead to vendors removing "echo" entirely
and breaking existing scripts (or at least, the subset of scripts which
managed to work correctly).

However, it is warned against, that after 1992 you should avoid writing
new code that uses "echo" and instead use "printf".

printf has an actual definition of its behavior, which echo did not, and
that behavior is to interpret backslash escapes in the first parameter,
which is necessary by this Makefile.am in order to embed newlines into
the generated libtool file. Simply replacing "echo -e" with "printf"
will therefore correctly and reliably do the intended functionality. We
also add one final embedded newline to avoid producing a file without an
end-of-line character on the last line of the file.

Fixes: https://github.com/ckolivas/lrzip/issues/257
Signed-off-by: Eli Schwartz <eschwartz@gentoo.org>
2025-02-06 10:53:48 -05:00
..
7zCrc.c Initial import 2010-03-29 10:07:08 +11:00
7zCrc.h Initial import 2010-03-29 10:07:08 +11:00
7zCrcT8.c Initial import 2010-03-29 10:07:08 +11:00
Alloc.c Update to lzma 920 library. 2011-09-15 08:26:07 +10:00
Alloc.h Update to lzma 920 library. 2011-09-15 08:26:07 +10:00
basetyps.h Remove more whitespace 2011-03-10 09:34:01 +11:00
LzFind.c Update to lzma 920 library. 2011-09-15 08:26:07 +10:00
LzFind.h Fix windows EOL & update authors 2010-04-25 16:18:47 +10:00
LzFindMt.c Rename lrzip.h to lrzip_core.h to cope with case insensitive filesystems not working with Lrzip.h vs lrzip.h 2012-07-07 21:39:40 +10:00
LzFindMt.h Update to lzma 920 library. 2011-09-15 08:26:07 +10:00
LzHash.h Fix windows EOL & update authors 2010-04-25 16:18:47 +10:00
LzmaDec.c Update to lzma 920 library. 2011-09-15 08:26:07 +10:00
LzmaDec.h Update to lzma 920 library. 2011-09-15 08:26:07 +10:00
LzmaEnc.c Rename lrzip.h to lrzip_core.h to cope with case insensitive filesystems not working with Lrzip.h vs lrzip.h 2012-07-07 21:39:40 +10:00
LzmaEnc.h Fix windows EOL & update authors 2010-04-25 16:18:47 +10:00
LzmaLib.c Fix warnings in LzmaLib.c 2015-03-10 21:24:45 +11:00
LzmaLib.h Update to lzma 920 library. 2011-09-15 08:26:07 +10:00
Makefile.am build: fix incorrect use of shell commands in handmade libtool file 2025-02-06 10:53:48 -05:00
MyGuidDef.h Fix Types.h missing which breaks typedefs on macosx. 2012-07-07 22:06:13 +10:00
MyWindows.h Initial import 2010-03-29 10:07:08 +11:00
Threads.c Fix warning. 2021-02-16 14:05:22 +11:00
Threads.h Initial import 2010-03-29 10:07:08 +11:00
Types.h Update to lzma 920 library. 2011-09-15 08:26:07 +10:00
windows.h Remove more whitespace 2011-03-10 09:34:01 +11:00