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>
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>
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>