mirror of
https://git.savannah.gnu.org/git/gperf.git
synced 2025-12-02 21:19:24 +00:00
Add support for reproducible builds.
Suggested by Richard Purdie <richard.purdie@linuxfoundation.org> in <https://lists.gnu.org/archive/html/bug-gperf/2022-07/msg00000.html>. * autogen.sh: Import also lib/filename.h. * Makefile.in (IMPORTED_FILES): Add lib/filename.h. * src/options.cc: Include filename.h. (Options::print_options): Print only the base name of the program name. * tests/*.exp: Update.
This commit is contained in:
11
ChangeLog
11
ChangeLog
@@ -1,3 +1,14 @@
|
|||||||
|
2022-07-05 Bruno Haible <bruno@clisp.org>
|
||||||
|
|
||||||
|
Add support for reproducible builds.
|
||||||
|
Suggested by Richard Purdie <richard.purdie@linuxfoundation.org> in
|
||||||
|
<https://lists.gnu.org/archive/html/bug-gperf/2022-07/msg00000.html>.
|
||||||
|
* autogen.sh: Import also lib/filename.h.
|
||||||
|
* Makefile.in (IMPORTED_FILES): Add lib/filename.h.
|
||||||
|
* src/options.cc: Include filename.h.
|
||||||
|
(Options::print_options): Print only the base name of the program name.
|
||||||
|
* tests/*.exp: Update.
|
||||||
|
|
||||||
2022-05-22 Bruno Haible <bruno@clisp.org>
|
2022-05-22 Bruno Haible <bruno@clisp.org>
|
||||||
|
|
||||||
Add GNU Project notice.
|
Add GNU Project notice.
|
||||||
|
|||||||
@@ -67,7 +67,8 @@ SOURCE_FILES = \
|
|||||||
IMPORTED_FILES = \
|
IMPORTED_FILES = \
|
||||||
COPYING INSTALL \
|
COPYING INSTALL \
|
||||||
build-aux/install-sh build-aux/mkinstalldirs \
|
build-aux/install-sh build-aux/mkinstalldirs \
|
||||||
build-aux/compile build-aux/ar-lib
|
build-aux/compile build-aux/ar-lib \
|
||||||
|
lib/filename.h
|
||||||
# List of distributed files generated by autotools or Makefile.devel.
|
# List of distributed files generated by autotools or Makefile.devel.
|
||||||
GENERATED_FILES = configure
|
GENERATED_FILES = configure
|
||||||
# List of distributed files generated by "make".
|
# List of distributed files generated by "make".
|
||||||
|
|||||||
@@ -10,7 +10,7 @@
|
|||||||
# in a gnulib checkout, or
|
# in a gnulib checkout, or
|
||||||
# - an internet connection.
|
# - an internet connection.
|
||||||
|
|
||||||
# Copyright (C) 2003-2021 Free Software Foundation, Inc.
|
# Copyright (C) 2003-2022 Free Software Foundation, Inc.
|
||||||
#
|
#
|
||||||
# This program is free software: you can redistribute it and/or modify
|
# This program is free software: you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
@@ -30,7 +30,8 @@
|
|||||||
GNULIB_REPO_URL="https://git.savannah.gnu.org/gitweb/?p=gnulib.git;a=blob_plain;hb=HEAD;f="
|
GNULIB_REPO_URL="https://git.savannah.gnu.org/gitweb/?p=gnulib.git;a=blob_plain;hb=HEAD;f="
|
||||||
|
|
||||||
for file in build-aux/install-sh build-aux/mkinstalldirs \
|
for file in build-aux/install-sh build-aux/mkinstalldirs \
|
||||||
build-aux/compile build-aux/ar-lib; do
|
build-aux/compile build-aux/ar-lib \
|
||||||
|
lib/filename.h; do
|
||||||
if test -n "$GNULIB_TOOL"; then
|
if test -n "$GNULIB_TOOL"; then
|
||||||
$GNULIB_TOOL --copy-file $file $file
|
$GNULIB_TOOL --copy-file $file $file
|
||||||
else
|
else
|
||||||
|
|||||||
3
lib/.gitignore
vendored
3
lib/.gitignore
vendored
@@ -1,3 +1,6 @@
|
|||||||
|
# Files brought in by gnulib-tool:
|
||||||
|
/filename.h
|
||||||
|
|
||||||
# Files generated by the autotools:
|
# Files generated by the autotools:
|
||||||
/configure
|
/configure
|
||||||
|
|
||||||
|
|||||||
@@ -26,6 +26,7 @@
|
|||||||
#include <string.h> /* declares strcmp() */
|
#include <string.h> /* declares strcmp() */
|
||||||
#include <ctype.h> /* declares isdigit() */
|
#include <ctype.h> /* declares isdigit() */
|
||||||
#include <limits.h> /* defines CHAR_MAX */
|
#include <limits.h> /* defines CHAR_MAX */
|
||||||
|
#include "filename.h"
|
||||||
#include "getopt.h"
|
#include "getopt.h"
|
||||||
#include "version.h"
|
#include "version.h"
|
||||||
|
|
||||||
@@ -280,6 +281,16 @@ Options::print_options () const
|
|||||||
{
|
{
|
||||||
const char *arg = _argument_vector[i];
|
const char *arg = _argument_vector[i];
|
||||||
|
|
||||||
|
if (i == 0)
|
||||||
|
{
|
||||||
|
/* _argument_vector[0] is the program name. Print only its base name.
|
||||||
|
This is useful for reproducible builds. */
|
||||||
|
const char *p = arg + strlen (arg);
|
||||||
|
while (p > arg && ! ISSLASH (p[-1]))
|
||||||
|
p--;
|
||||||
|
arg = p;
|
||||||
|
}
|
||||||
|
|
||||||
/* Escape arg if it contains shell metacharacters. */
|
/* Escape arg if it contains shell metacharacters. */
|
||||||
if (*arg == '-')
|
if (*arg == '-')
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/* C code produced by gperf version 3.2 */
|
/* C code produced by gperf version 3.2 */
|
||||||
/* Command-line: ../src/gperf -L C -F ', 0, 0' -j1 -i 1 -g -o -t -G -N is_reserved_word -k'1,3,$' */
|
/* Command-line: gperf -L C -F ', 0, 0' -j1 -i 1 -g -o -t -G -N is_reserved_word -k'1,3,$' */
|
||||||
|
|
||||||
#if !((' ' == 32) && ('!' == 33) && ('"' == 34) && ('#' == 35) \
|
#if !((' ' == 32) && ('!' == 33) && ('"' == 34) && ('#' == 35) \
|
||||||
&& ('%' == 37) && ('&' == 38) && ('\'' == 39) && ('(' == 40) \
|
&& ('%' == 37) && ('&' == 38) && ('\'' == 39) && ('(' == 40) \
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/* ANSI-C code produced by gperf version 3.2 */
|
/* ANSI-C code produced by gperf version 3.2 */
|
||||||
/* Command-line: ../src/gperf -C -E -G -I -t */
|
/* Command-line: gperf -C -E -G -I -t */
|
||||||
/* Computed positions: -k'1-11,22,$' */
|
/* Computed positions: -k'1-11,22,$' */
|
||||||
|
|
||||||
#if !((' ' == 32) && ('!' == 33) && ('"' == 34) && ('#' == 35) \
|
#if !((' ' == 32) && ('!' == 33) && ('"' == 34) && ('#' == 35) \
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/* C code produced by gperf version 3.2 */
|
/* C code produced by gperf version 3.2 */
|
||||||
/* Command-line: ../src/gperf -L C -F ', 0, 0, 0' -D -E -S1 -j1 -i 1 -g -o -t -k'*' */
|
/* Command-line: gperf -L C -F ', 0, 0, 0' -D -E -S1 -j1 -i 1 -g -o -t -k'*' */
|
||||||
|
|
||||||
#if !((' ' == 32) && ('!' == 33) && ('"' == 34) && ('#' == 35) \
|
#if !((' ' == 32) && ('!' == 33) && ('"' == 34) && ('#' == 35) \
|
||||||
&& ('%' == 37) && ('&' == 38) && ('\'' == 39) && ('(' == 40) \
|
&& ('%' == 37) && ('&' == 38) && ('\'' == 39) && ('(' == 40) \
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/* C code produced by gperf version 3.2 */
|
/* C code produced by gperf version 3.2 */
|
||||||
/* Command-line: ../src/gperf -L C -F ', 0, 0' -j1 -g -o -t -N is_reserved_word -k'1,4,7,$' */
|
/* Command-line: gperf -L C -F ', 0, 0' -j1 -g -o -t -N is_reserved_word -k'1,4,7,$' */
|
||||||
|
|
||||||
#if !((' ' == 32) && ('!' == 33) && ('"' == 34) && ('#' == 35) \
|
#if !((' ' == 32) && ('!' == 33) && ('"' == 34) && ('#' == 35) \
|
||||||
&& ('%' == 37) && ('&' == 38) && ('\'' == 39) && ('(' == 40) \
|
&& ('%' == 37) && ('&' == 38) && ('\'' == 39) && ('(' == 40) \
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/* ANSI-C code produced by gperf version 3.2 */
|
/* ANSI-C code produced by gperf version 3.2 */
|
||||||
/* Command-line: ../src/gperf -g -o -j1 -t -N is_reserved_word */
|
/* Command-line: gperf -g -o -j1 -t -N is_reserved_word */
|
||||||
/* Computed positions: -k'1,$' */
|
/* Computed positions: -k'1,$' */
|
||||||
|
|
||||||
#if !((' ' == 32) && ('!' == 33) && ('"' == 34) && ('#' == 35) \
|
#if !((' ' == 32) && ('!' == 33) && ('"' == 34) && ('#' == 35) \
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/* ANSI-C code produced by gperf version 3.2 */
|
/* ANSI-C code produced by gperf version 3.2 */
|
||||||
/* Command-line: ../src/gperf -t */
|
/* Command-line: gperf -t */
|
||||||
/* Computed positions: -k'1,3' */
|
/* Computed positions: -k'1,3' */
|
||||||
|
|
||||||
#if !((' ' == 32) && ('!' == 33) && ('"' == 34) && ('#' == 35) \
|
#if !((' ' == 32) && ('!' == 33) && ('"' == 34) && ('#' == 35) \
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/* C code produced by gperf version 3.2 */
|
/* C code produced by gperf version 3.2 */
|
||||||
/* Command-line: ../src/gperf -L C -F ', 0' -t -j1 -i 1 -g -o -N java_keyword -k'1,3,$' */
|
/* Command-line: gperf -L C -F ', 0' -t -j1 -i 1 -g -o -N java_keyword -k'1,3,$' */
|
||||||
|
|
||||||
#if !((' ' == 32) && ('!' == 33) && ('"' == 34) && ('#' == 35) \
|
#if !((' ' == 32) && ('!' == 33) && ('"' == 34) && ('#' == 35) \
|
||||||
&& ('%' == 37) && ('&' == 38) && ('\'' == 39) && ('(' == 40) \
|
&& ('%' == 37) && ('&' == 38) && ('\'' == 39) && ('(' == 40) \
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/* ANSI-C code produced by gperf version 3.2 */
|
/* ANSI-C code produced by gperf version 3.2 */
|
||||||
/* Command-line: ../src/gperf -C -E -G -I -t */
|
/* Command-line: gperf -C -E -G -I -t */
|
||||||
/* Computed positions: -k'1-3,5,$' */
|
/* Computed positions: -k'1-3,5,$' */
|
||||||
|
|
||||||
#if !((' ' == 32) && ('!' == 33) && ('"' == 34) && ('#' == 35) \
|
#if !((' ' == 32) && ('!' == 33) && ('"' == 34) && ('#' == 35) \
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/* ANSI-C code produced by gperf version 3.2 */
|
/* ANSI-C code produced by gperf version 3.2 */
|
||||||
/* Command-line: ../src/gperf -n -k1-8 -l */
|
/* Command-line: gperf -n -k1-8 -l */
|
||||||
|
|
||||||
#if !((' ' == 32) && ('!' == 33) && ('"' == 34) && ('#' == 35) \
|
#if !((' ' == 32) && ('!' == 33) && ('"' == 34) && ('#' == 35) \
|
||||||
&& ('%' == 37) && ('&' == 38) && ('\'' == 39) && ('(' == 40) \
|
&& ('%' == 37) && ('&' == 38) && ('\'' == 39) && ('(' == 40) \
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/* ANSI-C code produced by gperf version 3.2 */
|
/* ANSI-C code produced by gperf version 3.2 */
|
||||||
/* Command-line: ../src/gperf -j1 -i 1 -g -o -t -N is_reserved_word -k'1,3,$' */
|
/* Command-line: gperf -j1 -i 1 -g -o -t -N is_reserved_word -k'1,3,$' */
|
||||||
|
|
||||||
#if !((' ' == 32) && ('!' == 33) && ('"' == 34) && ('#' == 35) \
|
#if !((' ' == 32) && ('!' == 33) && ('"' == 34) && ('#' == 35) \
|
||||||
&& ('%' == 37) && ('&' == 38) && ('\'' == 39) && ('(' == 40) \
|
&& ('%' == 37) && ('&' == 38) && ('\'' == 39) && ('(' == 40) \
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/* ANSI-C code produced by gperf version 3.2 */
|
/* ANSI-C code produced by gperf version 3.2 */
|
||||||
/* Command-line: ../src/gperf -m5 */
|
/* Command-line: gperf -m5 */
|
||||||
/* Computed positions: -k'1-2' */
|
/* Computed positions: -k'1-2' */
|
||||||
|
|
||||||
#if !((' ' == 32) && ('!' == 33) && ('"' == 34) && ('#' == 35) \
|
#if !((' ' == 32) && ('!' == 33) && ('"' == 34) && ('#' == 35) \
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/* ANSI-C code produced by gperf version 3.2 */
|
/* ANSI-C code produced by gperf version 3.2 */
|
||||||
/* Command-line: ../src/gperf -m5 */
|
/* Command-line: gperf -m5 */
|
||||||
/* Computed positions: -k'1-2' */
|
/* Computed positions: -k'1-2' */
|
||||||
|
|
||||||
#if !((' ' == 32) && ('!' == 33) && ('"' == 34) && ('#' == 35) \
|
#if !((' ' == 32) && ('!' == 33) && ('"' == 34) && ('#' == 35) \
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/* ANSI-C code produced by gperf version 3.2 */
|
/* ANSI-C code produced by gperf version 3.2 */
|
||||||
/* Command-line: ../src/gperf -m5 --ignore-case */
|
/* Command-line: gperf -m5 --ignore-case */
|
||||||
/* Computed positions: -k'1-2' */
|
/* Computed positions: -k'1-2' */
|
||||||
|
|
||||||
#if !((' ' == 32) && ('!' == 33) && ('"' == 34) && ('#' == 35) \
|
#if !((' ' == 32) && ('!' == 33) && ('"' == 34) && ('#' == 35) \
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/* ANSI-C code produced by gperf version 3.2 */
|
/* ANSI-C code produced by gperf version 3.2 */
|
||||||
/* Command-line: ../src/gperf -D -t -k'1,$' */
|
/* Command-line: gperf -D -t -k'1,$' */
|
||||||
|
|
||||||
#if !((' ' == 32) && ('!' == 33) && ('"' == 34) && ('#' == 35) \
|
#if !((' ' == 32) && ('!' == 33) && ('"' == 34) && ('#' == 35) \
|
||||||
&& ('%' == 37) && ('&' == 38) && ('\'' == 39) && ('(' == 40) \
|
&& ('%' == 37) && ('&' == 38) && ('\'' == 39) && ('(' == 40) \
|
||||||
|
|||||||
Reference in New Issue
Block a user