Commit graph

27 commits

Author SHA1 Message Date
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
Bernhard M. Wiedemann 0c6f6b5723
Avoid executable stack (#243)
without this patch, the rpmlint check for executable stack
failed the build on openSUSE.
2023-04-28 10:25:04 +10:00
Con Kolivas ef8773132e Minor makefile cleanups. 2021-02-16 15:51:36 +11:00
Con Kolivas 3818727a72 Fix warning. 2021-02-16 14:05:22 +11:00
Con Kolivas 786cdf3463 Fix make install with asm. 2021-02-15 23:25:20 +11:00
Con Kolivas f27facbb16 Fix distdir to include ASM files. 2021-02-15 22:45:37 +11:00
Peter Hyman f5c19dbde8 Fix so that debugger will load and Assembler code will debug. 2020-11-14 16:30:28 -06:00
Fabrice Fontaine 844b8c057c lzma/C/Makefile.am: fix install with asm
Commit 3734448abc fixed the build failure
due to .libs being missing but it raises a build failure when .libs is
already there:

nasm -I../ASM/x86/ -Dx64 -f elf64 -o 7zCrcOpt_asm.o ../../lzma/ASM/x86/7zCrcOpt_asm.asm
mkdir .libs
mkdir: cannot create directory '.libs': File exists

Fix this error by adding -p argument to mkdir

Fixes:
- http://autobuild.buildroot.org/results/1ca6db24ef26c57d4c129de7e98383e7e58b366b

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
2020-05-22 18:42:19 +02:00
Fabrice Fontaine 3734448abc lzma/C/Makefile.am: fix install with asm
Since commit 9f16f65705, build with asm
can fail on:

nasm -I../ASM/x86/ -Dx64 -f elf64 -o 7zCrcOpt_asm.o ../../lzma/ASM/x86/7zCrcOpt_asm.asm
  CC       LzmaEnc.lo
  CC       LzmaLib.lo
  CC       Alloc.lo
  CC       Threads.lo
cp 7zCrcOpt_asm.o .libs/
cp: cannot create regular file '.libs/': Not a directory
make[4]: *** [Makefile:678: 7zCrcOpt_asm.lo] Error 1
make[4]: *** Waiting for unfinished jobs....

So create .libs directory before copying 7zCrcOpt_asm.o

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
2020-05-16 09:33:48 +02:00
Peter Hyman db8d1d56e7 HOTFIX for compiling with --disable-asm or no assembler present 2019-12-02 12:30:26 -06:00
Peter Hyman 9f16f65705 Update and bring back Assembler code for CRC check. 2019-11-25 08:44:46 -06:00
Con Kolivas 2e36d2a580 Fix warnings in LzmaLib.c 2015-03-10 21:24:45 +11:00
Con Kolivas 00236b16cb Fix Types.h missing which breaks typedefs on macosx. 2012-07-07 22:06:13 +10:00
Con Kolivas 184a8f0025 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
ckolivas 11f869dabe Fix Lrzip.h not being installed into include directory and make distcheck failing. 2012-03-15 11:16:57 +11:00
ckolivas e6ae7c528a Add __maybe_unused macro and use to stop warnings from lzma dummy allocs. 2012-03-07 12:58:58 +11:00
Con Kolivas 71bb72f5da Update to lzma 920 library. 2011-09-15 08:26:07 +10:00
Con Kolivas a901b015bf Revert "Try endian swap on dicSize."
This reverts commit 74b0b71e0b.

Broken crap.
2011-03-22 20:49:51 +11:00
ckolivas 74b0b71e0b Try endian swap on dicSize. 2011-03-22 18:15:18 +11:00
Con Kolivas 844d85bd19 Remove more whitespace 2011-03-10 09:34:01 +11:00
ckolivas 6e72b520a9 Fix failed build on make distdir. 2011-03-08 13:06:24 +11:00
Con Kolivas 556803752b Fix windows EOL to unix on lzma.txt. 2011-03-07 12:52:12 +11:00
Con Kolivas 5eaa1cc42b Updated autotools/conf system courtesy of Michael Blumenkrantz <mike@zentific.com>. 2011-02-27 00:17:29 +11:00
Con Kolivas e3916090a4 Fix more CRLF EOL 2010-04-25 16:20:51 +10:00
Con Kolivas b31b370b01 Fix windows EOL & update authors 2010-04-25 16:18:47 +10:00
Con Kolivas b62e67b43d lzma/C/Types.h~: Remove a backup file 2010-03-31 00:33:37 +11:00
Con Kolivas 6dcceb0b1b Initial import 2010-03-29 10:07:08 +11:00