Skip to content

Commit

Permalink
drop use of datestamp in compiled output
Browse files Browse the repository at this point in the history
This doesn't add that much (if any) value to the version output, and it
prevents systems from caching the results or reproducing it later on.
Drop it all.

Fixes #3.
  • Loading branch information
vapier committed Aug 8, 2015
1 parent add92bc commit d2e2d00
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 8 deletions.
2 changes: 1 addition & 1 deletion Makefile.def
Expand Up @@ -38,7 +38,7 @@ LBOPT= $(LDFLAGS)


compress: Makefile compress42.c patchlevel.h
$(CC) -o compress $(options) "-DCOMPILE_DATE=\"`date`\"" compress42.c $(LBOPT)
$(CC) -o compress $(options) compress42.c $(LBOPT)

install: compress
[ -f $(DESTDIR)$(BINDIR)/compress ] && \
Expand Down
10 changes: 5 additions & 5 deletions build
Expand Up @@ -566,9 +566,9 @@ do
echo ""
echo "Compiling compress ${version}"

echo ${CC} ${options} "-DCOMPILE_DATE=\"`date`\"" compress42.c ${LBOPT}
echo ${CC} ${options} compress42.c ${LBOPT}

if ${CC} ${options} "-DCOMPILE_DATE=\"`date`\"" compress42.c ${LBOPT}
if ${CC} ${options} compress42.c ${LBOPT}
then
echo ""
./compress -V
Expand Down Expand Up @@ -599,9 +599,9 @@ do
echo ""
echo "Compiling compress ${version}"

echo ${CC} ${options} "-DCOMPILE_DATE=\"`date`\"" compress42.c
echo ${CC} ${options} compress42.c

${CC} ${options} "-DCOMPILE_DATE=\"`date`\"" compress42.c
${CC} ${options} compress42.c
echo ""
echo ${n} "Press return to continue${c}"
read dummy
Expand Down Expand Up @@ -790,7 +790,7 @@ LBOPT=${LBOPT}


compress: Makefile compress42.c patchlevel.h
$(CC) -o compress $(options) "-DCOMPILE_DATE=\"\`date\`\"" compress42.c $(LBOPT)
$(CC) -o compress $(options) compress42.c $(LBOPT)

install: compress
[ -f \$(BINDIR)/compress ] && \\
Expand Down
3 changes: 1 addition & 2 deletions compress42.c
Expand Up @@ -286,7 +286,6 @@
# define BYTEORDER 4321
# undef NOALLIGN
# define NOALLIGN 1
# define COMPILE_DATE __DATE__
#endif /* DOS */

#ifndef O_BINARY
Expand Down Expand Up @@ -1882,7 +1881,7 @@ prratio(stream, num, den)
void
about()
{
fprintf(stderr, "Compress version: %s, compiled: %s\n", version_id, COMPILE_DATE);
fprintf(stderr, "Compress version: %s\n", version_id);
fprintf(stderr, "Compile options:\n ");
#if BYTEORDER == 4321 && NOALLIGN == 1
fprintf(stderr, "USE_BYTEORDER, ");
Expand Down

0 comments on commit d2e2d00

Please sign in to comment.