mirror of
https://github.com/mirror/make.git
synced 2025-01-27 12:51:07 +08:00
Change the version.
Update to require new gettext. Change hash.c to by K&R. Redo some strings to make i18n simpler.
This commit is contained in:
parent
f2ceb0d68a
commit
ee3a4f9dd6
18
ChangeLog
18
ChangeLog
@ -1,8 +1,26 @@
|
|||||||
|
2002-08-08 Paul D. Smith <psmith@gnu.org>
|
||||||
|
|
||||||
|
* configure.in: Require a newer version of gettext.
|
||||||
|
|
||||||
|
* misc.c (perror_with_name): Translate the format string (for
|
||||||
|
right-to-left language support).
|
||||||
|
(pfatal_with_name): Ditto.
|
||||||
|
|
||||||
|
* main.c: Create a static array of strings to store the usage
|
||||||
|
text. This is done to facilitate translations.
|
||||||
|
(struct command_switch): Remove argdesc and description fields.
|
||||||
|
(switches): Remove values for obsolete fields.
|
||||||
|
(print_usage): Print each element of the usage array.
|
||||||
|
|
||||||
|
* hash.c: Change function definitions to be K&R style.
|
||||||
|
|
||||||
2002-08-02 Paul D. Smith <psmith@gnu.org>
|
2002-08-02 Paul D. Smith <psmith@gnu.org>
|
||||||
|
|
||||||
* NEWS: Remove the mention of .TARGETS; we aren't going to publish
|
* NEWS: Remove the mention of .TARGETS; we aren't going to publish
|
||||||
this one because it's too hard to get right. We'll look at it for
|
this one because it's too hard to get right. We'll look at it for
|
||||||
a future release.
|
a future release.
|
||||||
|
* main.c (main): Don't create the .TARGETS variable.
|
||||||
|
* variable.c (handle_special_var): Don't handle .TARGETS.
|
||||||
|
|
||||||
2002-08-01 Paul D. Smith <psmith@gnu.org>
|
2002-08-01 Paul D. Smith <psmith@gnu.org>
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
# Process this file with autoconf to produce a configure script.
|
# Process this file with autoconf to produce a configure script.
|
||||||
|
|
||||||
AC_INIT(GNU make,3.80rc1,bug-make@gnu.org)
|
AC_INIT(GNU make,3.80b2,bug-make@gnu.org)
|
||||||
|
|
||||||
AC_PREREQ(2.53)
|
AC_PREREQ(2.53)
|
||||||
|
|
||||||
@ -32,7 +32,7 @@ AC_MINIX
|
|||||||
|
|
||||||
# Enable gettext, in "external" mode.
|
# Enable gettext, in "external" mode.
|
||||||
|
|
||||||
GETTEXT_VERSION=0.11.3-pre2
|
AM_GNU_GETTEXT_VERSION(0.11.5)
|
||||||
AM_GNU_GETTEXT([external])
|
AM_GNU_GETTEXT([external])
|
||||||
|
|
||||||
# This test must come as early as possible after the compiler configuration
|
# This test must come as early as possible after the compiler configuration
|
||||||
|
73
hash.c
73
hash.c
@ -41,8 +41,12 @@ void *hash_deleted_item = &hash_deleted_item;
|
|||||||
given size. */
|
given size. */
|
||||||
|
|
||||||
void
|
void
|
||||||
hash_init (struct hash_table* ht, unsigned long size,
|
hash_init (ht, size, hash_1, hash_2, hash_cmp)
|
||||||
hash_func_t hash_1, hash_func_t hash_2, hash_cmp_func_t hash_cmp)
|
struct hash_table* ht;
|
||||||
|
unsigned long size;
|
||||||
|
hash_func_t hash_1;
|
||||||
|
hash_func_t hash_2;
|
||||||
|
hash_cmp_func_t hash_cmp;
|
||||||
{
|
{
|
||||||
ht->ht_size = round_up_2 (size);
|
ht->ht_size = round_up_2 (size);
|
||||||
ht->ht_empty_slots = ht->ht_size;
|
ht->ht_empty_slots = ht->ht_size;
|
||||||
@ -67,7 +71,11 @@ hash_init (struct hash_table* ht, unsigned long size,
|
|||||||
/* Load an array of items into `ht'. */
|
/* Load an array of items into `ht'. */
|
||||||
|
|
||||||
void
|
void
|
||||||
hash_load (struct hash_table* ht, void *item_table, unsigned long cardinality, unsigned long size)
|
hash_load (ht, item_table, cardinality, size)
|
||||||
|
struct hash_table* ht;
|
||||||
|
void *item_table;
|
||||||
|
unsigned long cardinality;
|
||||||
|
unsigned long size;
|
||||||
{
|
{
|
||||||
char *items = (char *) item_table;
|
char *items = (char *) item_table;
|
||||||
while (cardinality--)
|
while (cardinality--)
|
||||||
@ -83,7 +91,9 @@ hash_load (struct hash_table* ht, void *item_table, unsigned long cardinality, u
|
|||||||
ht_fill on insertion. */
|
ht_fill on insertion. */
|
||||||
|
|
||||||
void **
|
void **
|
||||||
hash_find_slot (struct hash_table* ht, void const *key)
|
hash_find_slot (ht, key)
|
||||||
|
struct hash_table* ht;
|
||||||
|
void const *key;
|
||||||
{
|
{
|
||||||
void **slot;
|
void **slot;
|
||||||
void **deleted_slot = 0;
|
void **deleted_slot = 0;
|
||||||
@ -118,14 +128,18 @@ hash_find_slot (struct hash_table* ht, void const *key)
|
|||||||
}
|
}
|
||||||
|
|
||||||
void *
|
void *
|
||||||
hash_find_item (struct hash_table* ht, void const *key)
|
hash_find_item (ht, key)
|
||||||
|
struct hash_table* ht;
|
||||||
|
void const *key;
|
||||||
{
|
{
|
||||||
void **slot = hash_find_slot (ht, key);
|
void **slot = hash_find_slot (ht, key);
|
||||||
return ((HASH_VACANT (*slot)) ? 0 : *slot);
|
return ((HASH_VACANT (*slot)) ? 0 : *slot);
|
||||||
}
|
}
|
||||||
|
|
||||||
void *
|
void *
|
||||||
hash_insert (struct hash_table* ht, void *item)
|
hash_insert (ht, item)
|
||||||
|
struct hash_table* ht;
|
||||||
|
void *item;
|
||||||
{
|
{
|
||||||
void **slot = hash_find_slot (ht, item);
|
void **slot = hash_find_slot (ht, item);
|
||||||
void *old_item = slot ? *slot : 0;
|
void *old_item = slot ? *slot : 0;
|
||||||
@ -134,7 +148,10 @@ hash_insert (struct hash_table* ht, void *item)
|
|||||||
}
|
}
|
||||||
|
|
||||||
void *
|
void *
|
||||||
hash_insert_at (struct hash_table* ht, void *item, void const *slot)
|
hash_insert_at (ht, item, slot)
|
||||||
|
struct hash_table* ht;
|
||||||
|
void *item;
|
||||||
|
void const *slot;
|
||||||
{
|
{
|
||||||
void *old_item = *(void **) slot;
|
void *old_item = *(void **) slot;
|
||||||
if (HASH_VACANT (old_item))
|
if (HASH_VACANT (old_item))
|
||||||
@ -155,14 +172,18 @@ hash_insert_at (struct hash_table* ht, void *item, void const *slot)
|
|||||||
}
|
}
|
||||||
|
|
||||||
void *
|
void *
|
||||||
hash_delete (struct hash_table* ht, void const *item)
|
hash_delete (ht, item)
|
||||||
|
struct hash_table* ht;
|
||||||
|
void const *item;
|
||||||
{
|
{
|
||||||
void **slot = hash_find_slot (ht, item);
|
void **slot = hash_find_slot (ht, item);
|
||||||
return hash_delete_at (ht, slot);
|
return hash_delete_at (ht, slot);
|
||||||
}
|
}
|
||||||
|
|
||||||
void *
|
void *
|
||||||
hash_delete_at (struct hash_table* ht, void const *slot)
|
hash_delete_at (ht, slot)
|
||||||
|
struct hash_table* ht;
|
||||||
|
void const *slot;
|
||||||
{
|
{
|
||||||
void *item = *(void **) slot;
|
void *item = *(void **) slot;
|
||||||
if (!HASH_VACANT (item))
|
if (!HASH_VACANT (item))
|
||||||
@ -176,7 +197,8 @@ hash_delete_at (struct hash_table* ht, void const *slot)
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
hash_free_items (struct hash_table* ht)
|
hash_free_items (ht)
|
||||||
|
struct hash_table* ht;
|
||||||
{
|
{
|
||||||
void **vec = ht->ht_vec;
|
void **vec = ht->ht_vec;
|
||||||
void **end = &vec[ht->ht_size];
|
void **end = &vec[ht->ht_size];
|
||||||
@ -192,7 +214,8 @@ hash_free_items (struct hash_table* ht)
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
hash_delete_items (struct hash_table* ht)
|
hash_delete_items (ht)
|
||||||
|
struct hash_table* ht;
|
||||||
{
|
{
|
||||||
void **vec = ht->ht_vec;
|
void **vec = ht->ht_vec;
|
||||||
void **end = &vec[ht->ht_size];
|
void **end = &vec[ht->ht_size];
|
||||||
@ -206,7 +229,9 @@ hash_delete_items (struct hash_table* ht)
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
hash_free (struct hash_table* ht, int free_items)
|
hash_free (ht, free_items)
|
||||||
|
struct hash_table* ht;
|
||||||
|
int free_items;
|
||||||
{
|
{
|
||||||
if (free_items)
|
if (free_items)
|
||||||
hash_free_items (ht);
|
hash_free_items (ht);
|
||||||
@ -221,7 +246,9 @@ hash_free (struct hash_table* ht, int free_items)
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
hash_map (struct hash_table *ht, hash_map_func_t map)
|
hash_map (ht, map)
|
||||||
|
struct hash_table *ht;
|
||||||
|
hash_map_func_t map;
|
||||||
{
|
{
|
||||||
void **slot;
|
void **slot;
|
||||||
void **end = &ht->ht_vec[ht->ht_size];
|
void **end = &ht->ht_vec[ht->ht_size];
|
||||||
@ -234,7 +261,10 @@ hash_map (struct hash_table *ht, hash_map_func_t map)
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
hash_map_arg (struct hash_table *ht, hash_map_arg_func_t map, void *arg)
|
hash_map_arg (ht, map, arg)
|
||||||
|
struct hash_table *ht;
|
||||||
|
hash_map_arg_func_t map;
|
||||||
|
void *arg;
|
||||||
{
|
{
|
||||||
void **slot;
|
void **slot;
|
||||||
void **end = &ht->ht_vec[ht->ht_size];
|
void **end = &ht->ht_vec[ht->ht_size];
|
||||||
@ -249,7 +279,8 @@ hash_map_arg (struct hash_table *ht, hash_map_arg_func_t map, void *arg)
|
|||||||
/* Double the size of the hash table in the event of overflow... */
|
/* Double the size of the hash table in the event of overflow... */
|
||||||
|
|
||||||
static void
|
static void
|
||||||
hash_rehash (struct hash_table* ht)
|
hash_rehash (ht)
|
||||||
|
struct hash_table* ht;
|
||||||
{
|
{
|
||||||
unsigned long old_ht_size = ht->ht_size;
|
unsigned long old_ht_size = ht->ht_size;
|
||||||
void **old_vec = ht->ht_vec;
|
void **old_vec = ht->ht_vec;
|
||||||
@ -276,7 +307,9 @@ hash_rehash (struct hash_table* ht)
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
hash_print_stats (struct hash_table *ht, FILE *out_FILE)
|
hash_print_stats (ht, out_FILE)
|
||||||
|
struct hash_table *ht;
|
||||||
|
FILE *out_FILE;
|
||||||
{
|
{
|
||||||
/* GKM FIXME: honor NO_FLOAT */
|
/* GKM FIXME: honor NO_FLOAT */
|
||||||
fprintf (out_FILE, _("Load=%ld/%ld=%.0f%%, "), ht->ht_fill, ht->ht_size,
|
fprintf (out_FILE, _("Load=%ld/%ld=%.0f%%, "), ht->ht_fill, ht->ht_size,
|
||||||
@ -292,7 +325,10 @@ hash_print_stats (struct hash_table *ht, FILE *out_FILE)
|
|||||||
user-supplied vector, or malloc one. */
|
user-supplied vector, or malloc one. */
|
||||||
|
|
||||||
void **
|
void **
|
||||||
hash_dump (struct hash_table *ht, void **vector_0, qsort_cmp_t compare)
|
hash_dump (ht, vector_0, compare)
|
||||||
|
struct hash_table *ht;
|
||||||
|
void **vector_0;
|
||||||
|
qsort_cmp_t compare;
|
||||||
{
|
{
|
||||||
void **vector;
|
void **vector;
|
||||||
void **slot;
|
void **slot;
|
||||||
@ -315,7 +351,8 @@ hash_dump (struct hash_table *ht, void **vector_0, qsort_cmp_t compare)
|
|||||||
/* Round a given number up to the nearest power of 2. */
|
/* Round a given number up to the nearest power of 2. */
|
||||||
|
|
||||||
static unsigned long
|
static unsigned long
|
||||||
round_up_2 (unsigned long n)
|
round_up_2 (n)
|
||||||
|
unsigned long n;
|
||||||
{
|
{
|
||||||
n |= (n >> 1);
|
n |= (n >> 1);
|
||||||
n |= (n >> 2);
|
n |= (n >> 2);
|
||||||
|
293
main.c
293
main.c
@ -105,9 +105,6 @@ struct command_switch
|
|||||||
char *default_value;/* Pointer to default value. */
|
char *default_value;/* Pointer to default value. */
|
||||||
|
|
||||||
char *long_name; /* Long option name. */
|
char *long_name; /* Long option name. */
|
||||||
char *argdesc; /* Descriptive word for argument. */
|
|
||||||
char *description; /* Description for usage message. */
|
|
||||||
/* 0 means internal; don't display help. */
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/* True if C is a switch value that corresponds to a short option. */
|
/* True if C is a switch value that corresponds to a short option. */
|
||||||
@ -258,115 +255,136 @@ int warn_undefined_variables_flag;
|
|||||||
|
|
||||||
int always_make_flag = 0;
|
int always_make_flag = 0;
|
||||||
|
|
||||||
|
/* The usage output. We write it this way to make life easier for the
|
||||||
|
translators, especially those trying to translate to right-to-left
|
||||||
|
languages like Hebrew. */
|
||||||
|
|
||||||
|
static const char *const usage[] =
|
||||||
|
{
|
||||||
|
N_("Options:\n"),
|
||||||
|
N_("\
|
||||||
|
-b, -m Ignored for compatibility.\n"),
|
||||||
|
N_("\
|
||||||
|
-B, --always-make Unconditionally make all targets.\n"),
|
||||||
|
N_("\
|
||||||
|
-C DIRECTORY, --directory=DIRECTORY\n\
|
||||||
|
Change to DIRECTORY before doing anything.\n"),
|
||||||
|
N_("\
|
||||||
|
-d Print lots of debugging information.\n"),
|
||||||
|
N_("\
|
||||||
|
--debug[=FLAGS] Print various types of debugging information.\n"),
|
||||||
|
N_("\
|
||||||
|
-e, --environment-overrides\n\
|
||||||
|
Environment variables override makefiles.\n"),
|
||||||
|
N_("\
|
||||||
|
-f FILE, --file=FILE, --makefile=FILE\n\
|
||||||
|
Read FILE as a makefile.\n"),
|
||||||
|
N_("\
|
||||||
|
-h, --help Print this message and exit.\n"),
|
||||||
|
N_("\
|
||||||
|
-i, --ignore-errors Ignore errors from commands.\n"),
|
||||||
|
N_("\
|
||||||
|
-I DIRECTORY, --include-dir=DIRECTORY\n\
|
||||||
|
Search DIRECTORY for included makefiles.\n"),
|
||||||
|
N_("\
|
||||||
|
-j [N], --jobs[=N] Allow N jobs at once; infinite jobs with no arg.\n"),
|
||||||
|
N_("\
|
||||||
|
-k, --keep-going Keep going when some targets can't be made.\n"),
|
||||||
|
N_("\
|
||||||
|
-l [N], --load-average[=N], --max-load[=N]\n\
|
||||||
|
Don't start multiple jobs unless load is below N.\n"),
|
||||||
|
N_("\
|
||||||
|
-n, --just-print, --dry-run, --recon\n\
|
||||||
|
Don't actually run any commands; just print them.\n"),
|
||||||
|
N_("\
|
||||||
|
-o FILE, --old-file=FILE, --assume-old=FILE\n\
|
||||||
|
Consider FILE to be very old and don't remake it.\n"),
|
||||||
|
N_("\
|
||||||
|
-p, --print-data-base Print make's internal database.\n"),
|
||||||
|
N_("\
|
||||||
|
-q, --question Run no commands; exit status says if up to date.\n"),
|
||||||
|
N_("\
|
||||||
|
-r, --no-builtin-rules Disable the built-in implicit rules.\n"),
|
||||||
|
N_("\
|
||||||
|
-R, --no-builtin-variables Disable the built-in variable settings.\n"),
|
||||||
|
N_("\
|
||||||
|
-s, --silent, --quiet Don't echo commands.\n"),
|
||||||
|
N_("\
|
||||||
|
-S, --no-keep-going, --stop\n\
|
||||||
|
Turns off -k.\n"),
|
||||||
|
N_("\
|
||||||
|
-t, --touch Touch targets instead of remaking them.\n"),
|
||||||
|
N_("\
|
||||||
|
-v, --version Print the version number of make and exit.\n"),
|
||||||
|
N_("\
|
||||||
|
-w, --print-directory Print the current directory.\n"),
|
||||||
|
N_("\
|
||||||
|
--no-print-directory Turn off -w, even if it was turned on implicitly.\n"),
|
||||||
|
N_("\
|
||||||
|
-W FILE, --what-if=FILE, --new-file=FILE, --assume-new=FILE\n\
|
||||||
|
Consider FILE to be infinitely new.\n"),
|
||||||
|
N_("\
|
||||||
|
--warn-undefined-variables Warn when an undefined variable is referenced.\n"),
|
||||||
|
NULL
|
||||||
|
};
|
||||||
|
|
||||||
/* The table of command switches. */
|
/* The table of command switches. */
|
||||||
|
|
||||||
static const struct command_switch switches[] =
|
static const struct command_switch switches[] =
|
||||||
{
|
{
|
||||||
{ 'b', ignore, 0, 0, 0, 0, 0, 0,
|
{ 'b', ignore, 0, 0, 0, 0, 0, 0, 0 },
|
||||||
0, 0,
|
{ 'B', flag, (char *) &always_make_flag, 1, 1, 0, 0, 0, "always-make" },
|
||||||
N_("Ignored for compatibility") },
|
{ 'C', string, (char *) &directories, 0, 0, 0, 0, 0, "directory" },
|
||||||
{ 'B', flag, (char *) &always_make_flag, 1, 1, 0, 0, 0,
|
{ 'd', flag, (char *) &debug_flag, 1, 1, 0, 0, 0, 0 },
|
||||||
"always-make", 0,
|
{ CHAR_MAX+1, string, (char *) &db_flags, 1, 1, 0, "basic", 0, "debug" },
|
||||||
N_("Unconditionally make all targets") },
|
|
||||||
{ 'C', string, (char *) &directories, 0, 0, 0, 0, 0,
|
|
||||||
"directory", N_("DIRECTORY"),
|
|
||||||
N_("Change to DIRECTORY before doing anything") },
|
|
||||||
{ 'd', flag, (char *) &debug_flag, 1, 1, 0, 0, 0,
|
|
||||||
0, 0,
|
|
||||||
N_("Print lots of debugging information") },
|
|
||||||
{ CHAR_MAX+1, string, (char *) &db_flags, 1, 1, 0,
|
|
||||||
"basic", 0,
|
|
||||||
"debug", N_("FLAGS"),
|
|
||||||
N_("Print various types of debugging information") },
|
|
||||||
#ifdef WINDOWS32
|
#ifdef WINDOWS32
|
||||||
{ 'D', flag, (char *) &suspend_flag, 1, 1, 0, 0, 0,
|
{ 'D', flag, (char *) &suspend_flag, 1, 1, 0, 0, 0, "suspend-for-debug" },
|
||||||
"suspend-for-debug", 0,
|
|
||||||
N_("Suspend process to allow a debugger to attach") },
|
|
||||||
#endif
|
#endif
|
||||||
{ 'e', flag, (char *) &env_overrides, 1, 1, 0, 0, 0,
|
{ 'e', flag, (char *) &env_overrides, 1, 1, 0, 0, 0,
|
||||||
"environment-overrides", 0,
|
"environment-overrides", },
|
||||||
N_("Environment variables override makefiles") },
|
{ 'f', string, (char *) &makefiles, 0, 0, 0, 0, 0, "file" },
|
||||||
{ 'f', string, (char *) &makefiles, 0, 0, 0, 0, 0,
|
{ 'h', flag, (char *) &print_usage_flag, 0, 0, 0, 0, 0, "help" },
|
||||||
"file", N_("FILE"),
|
|
||||||
N_("Read FILE as a makefile") },
|
|
||||||
{ 'h', flag, (char *) &print_usage_flag, 0, 0, 0, 0, 0,
|
|
||||||
"help", 0,
|
|
||||||
N_("Print this message and exit") },
|
|
||||||
{ 'i', flag, (char *) &ignore_errors_flag, 1, 1, 0, 0, 0,
|
{ 'i', flag, (char *) &ignore_errors_flag, 1, 1, 0, 0, 0,
|
||||||
"ignore-errors", 0,
|
"ignore-errors" },
|
||||||
N_("Ignore errors from commands") },
|
|
||||||
{ 'I', string, (char *) &include_directories, 1, 1, 0, 0, 0,
|
{ 'I', string, (char *) &include_directories, 1, 1, 0, 0, 0,
|
||||||
"include-dir", N_("DIRECTORY"),
|
"include-dir" },
|
||||||
N_("Search DIRECTORY for included makefiles") },
|
{ 'j', positive_int, (char *) &job_slots, 1, 1, 0, (char *) &inf_jobs,
|
||||||
{ 'j',
|
(char *) &default_job_slots, "jobs" },
|
||||||
positive_int, (char *) &job_slots, 1, 1, 0,
|
|
||||||
(char *) &inf_jobs, (char *) &default_job_slots,
|
|
||||||
"jobs", "N",
|
|
||||||
N_("Allow N jobs at once; infinite jobs with no arg") },
|
|
||||||
{ CHAR_MAX+2, string, (char *) &jobserver_fds, 1, 1, 0, 0, 0,
|
{ CHAR_MAX+2, string, (char *) &jobserver_fds, 1, 1, 0, 0, 0,
|
||||||
"jobserver-fds", 0,
|
"jobserver-fds" },
|
||||||
0 },
|
{ 'k', flag, (char *) &keep_going_flag, 1, 1, 0, 0,
|
||||||
{ 'k', flag, (char *) &keep_going_flag, 1, 1, 0,
|
(char *) &default_keep_going_flag, "keep-going" },
|
||||||
0, (char *) &default_keep_going_flag,
|
|
||||||
"keep-going", 0,
|
|
||||||
N_("Keep going when some targets can't be made") },
|
|
||||||
#ifndef NO_FLOAT
|
#ifndef NO_FLOAT
|
||||||
{ 'l', floating, (char *) &max_load_average, 1, 1, 0,
|
{ 'l', floating, (char *) &max_load_average, 1, 1, 0,
|
||||||
(char *) &default_load_average, (char *) &default_load_average,
|
(char *) &default_load_average, (char *) &default_load_average,
|
||||||
"load-average", "N",
|
"load-average" },
|
||||||
N_("Don't start multiple jobs unless load is below N") },
|
|
||||||
#else
|
#else
|
||||||
{ 'l', positive_int, (char *) &max_load_average, 1, 1, 0,
|
{ 'l', positive_int, (char *) &max_load_average, 1, 1, 0,
|
||||||
(char *) &default_load_average, (char *) &default_load_average,
|
(char *) &default_load_average, (char *) &default_load_average,
|
||||||
"load-average", "N",
|
"load-average" },
|
||||||
N_("Don't start multiple jobs unless load is below N") },
|
|
||||||
#endif
|
#endif
|
||||||
{ 'm', ignore, 0, 0, 0, 0, 0, 0,
|
{ 'm', ignore, 0, 0, 0, 0, 0, 0, 0 },
|
||||||
0, 0,
|
{ 'n', flag, (char *) &just_print_flag, 1, 1, 1, 0, 0, "just-print" },
|
||||||
"-b" },
|
{ 'o', string, (char *) &old_files, 0, 0, 0, 0, 0, "old-file" },
|
||||||
{ 'n', flag, (char *) &just_print_flag, 1, 1, 1, 0, 0,
|
|
||||||
"just-print", 0,
|
|
||||||
N_("Don't actually run any commands; just print them") },
|
|
||||||
{ 'o', string, (char *) &old_files, 0, 0, 0, 0, 0,
|
|
||||||
"old-file", N_("FILE"),
|
|
||||||
N_("Consider FILE to be very old and don't remake it") },
|
|
||||||
{ 'p', flag, (char *) &print_data_base_flag, 1, 1, 0, 0, 0,
|
{ 'p', flag, (char *) &print_data_base_flag, 1, 1, 0, 0, 0,
|
||||||
"print-data-base", 0,
|
"print-data-base" },
|
||||||
N_("Print make's internal database") },
|
{ 'q', flag, (char *) &question_flag, 1, 1, 1, 0, 0, "question" },
|
||||||
{ 'q', flag, (char *) &question_flag, 1, 1, 1, 0, 0,
|
|
||||||
"question", 0,
|
|
||||||
N_("Run no commands; exit status says if up to date") },
|
|
||||||
{ 'r', flag, (char *) &no_builtin_rules_flag, 1, 1, 0, 0, 0,
|
{ 'r', flag, (char *) &no_builtin_rules_flag, 1, 1, 0, 0, 0,
|
||||||
"no-builtin-rules", 0,
|
"no-builtin-rules" },
|
||||||
N_("Disable the built-in implicit rules") },
|
|
||||||
{ 'R', flag, (char *) &no_builtin_variables_flag, 1, 1, 0, 0, 0,
|
{ 'R', flag, (char *) &no_builtin_variables_flag, 1, 1, 0, 0, 0,
|
||||||
"no-builtin-variables", 0,
|
"no-builtin-variables" },
|
||||||
N_("Disable the built-in variable settings") },
|
{ 's', flag, (char *) &silent_flag, 1, 1, 0, 0, 0, "silent" },
|
||||||
{ 's', flag, (char *) &silent_flag, 1, 1, 0, 0, 0,
|
{ 'S', flag_off, (char *) &keep_going_flag, 1, 1, 0, 0,
|
||||||
"silent", 0,
|
(char *) &default_keep_going_flag, "no-keep-going" },
|
||||||
N_("Don't echo commands") },
|
{ 't', flag, (char *) &touch_flag, 1, 1, 1, 0, 0, "touch" },
|
||||||
{ 'S', flag_off, (char *) &keep_going_flag, 1, 1, 0,
|
{ 'v', flag, (char *) &print_version_flag, 1, 1, 0, 0, 0, "version" },
|
||||||
0, (char *) &default_keep_going_flag,
|
|
||||||
"no-keep-going", 0,
|
|
||||||
N_("Turns off -k") },
|
|
||||||
{ 't', flag, (char *) &touch_flag, 1, 1, 1, 0, 0,
|
|
||||||
"touch", 0,
|
|
||||||
N_("Touch targets instead of remaking them") },
|
|
||||||
{ 'v', flag, (char *) &print_version_flag, 1, 1, 0, 0, 0,
|
|
||||||
"version", 0,
|
|
||||||
N_("Print the version number of make and exit") },
|
|
||||||
{ 'w', flag, (char *) &print_directory_flag, 1, 1, 0, 0, 0,
|
{ 'w', flag, (char *) &print_directory_flag, 1, 1, 0, 0, 0,
|
||||||
"print-directory", 0,
|
"print-directory" },
|
||||||
N_("Print the current directory") },
|
|
||||||
{ CHAR_MAX+3, flag, (char *) &inhibit_print_directory_flag, 1, 1, 0, 0, 0,
|
{ CHAR_MAX+3, flag, (char *) &inhibit_print_directory_flag, 1, 1, 0, 0, 0,
|
||||||
"no-print-directory", 0,
|
"no-print-directory" },
|
||||||
N_("Turn off -w, even if it was turned on implicitly") },
|
{ 'W', string, (char *) &new_files, 0, 0, 0, 0, 0, "what-if" },
|
||||||
{ 'W', string, (char *) &new_files, 0, 0, 0, 0, 0,
|
|
||||||
"what-if", N_("FILE"),
|
|
||||||
N_("Consider FILE to be infinitely new") },
|
|
||||||
{ CHAR_MAX+4, flag, (char *) &warn_undefined_variables_flag, 1, 1, 0, 0, 0,
|
{ CHAR_MAX+4, flag, (char *) &warn_undefined_variables_flag, 1, 1, 0, 0, 0,
|
||||||
"warn-undefined-variables", 0,
|
"warn-undefined-variables" },
|
||||||
N_("Warn when an undefined variable is referenced") },
|
|
||||||
{ '\0', }
|
{ '\0', }
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -385,12 +403,6 @@ static struct option long_option_aliases[] =
|
|||||||
{ "makefile", required_argument, 0, 'f' },
|
{ "makefile", required_argument, 0, 'f' },
|
||||||
};
|
};
|
||||||
|
|
||||||
/* The usage message prints the descriptions of options starting in
|
|
||||||
this column. Make sure it leaves enough room for the longest
|
|
||||||
description to fit in less than 80 characters. */
|
|
||||||
|
|
||||||
#define DESCRIPTION_COLUMN 30
|
|
||||||
|
|
||||||
/* List of goal targets. */
|
/* List of goal targets. */
|
||||||
|
|
||||||
static struct dep *goals, *lastgoal;
|
static struct dep *goals, *lastgoal;
|
||||||
@ -2104,7 +2116,7 @@ print_usage (bad)
|
|||||||
int bad;
|
int bad;
|
||||||
{
|
{
|
||||||
extern char *make_host;
|
extern char *make_host;
|
||||||
register const struct command_switch *cs;
|
const char *const *cpp;
|
||||||
FILE *usageto;
|
FILE *usageto;
|
||||||
|
|
||||||
if (print_version_flag)
|
if (print_version_flag)
|
||||||
@ -2114,93 +2126,16 @@ print_usage (bad)
|
|||||||
|
|
||||||
fprintf (usageto, _("Usage: %s [options] [target] ...\n"), program);
|
fprintf (usageto, _("Usage: %s [options] [target] ...\n"), program);
|
||||||
|
|
||||||
fputs (_("Options:\n"), usageto);
|
for (cpp = usage; *cpp; ++cpp)
|
||||||
for (cs = switches; cs->c != '\0'; ++cs)
|
fputs (_(*cpp), usageto);
|
||||||
{
|
|
||||||
char buf[1024], shortarg[50], longarg[50], *p;
|
|
||||||
|
|
||||||
if (!cs->description || cs->description[0] == '-')
|
|
||||||
continue;
|
|
||||||
|
|
||||||
switch (long_options[cs - switches].has_arg)
|
|
||||||
{
|
|
||||||
case no_argument:
|
|
||||||
shortarg[0] = longarg[0] = '\0';
|
|
||||||
break;
|
|
||||||
case required_argument:
|
|
||||||
sprintf (longarg, "=%s", gettext (cs->argdesc));
|
|
||||||
sprintf (shortarg, " %s", gettext (cs->argdesc));
|
|
||||||
break;
|
|
||||||
case optional_argument:
|
|
||||||
sprintf (longarg, "[=%s]", gettext (cs->argdesc));
|
|
||||||
sprintf (shortarg, " [%s]", gettext (cs->argdesc));
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
p = buf;
|
|
||||||
|
|
||||||
if (short_option (cs->c))
|
|
||||||
{
|
|
||||||
sprintf (buf, " -%c%s", cs->c, shortarg);
|
|
||||||
p += strlen (p);
|
|
||||||
}
|
|
||||||
if (cs->long_name != 0)
|
|
||||||
{
|
|
||||||
unsigned int i;
|
|
||||||
sprintf (p, "%s--%s%s",
|
|
||||||
!short_option (cs->c) ? " " : ", ",
|
|
||||||
cs->long_name, longarg);
|
|
||||||
p += strlen (p);
|
|
||||||
for (i = 0; i < (sizeof (long_option_aliases) /
|
|
||||||
sizeof (long_option_aliases[0]));
|
|
||||||
++i)
|
|
||||||
if (long_option_aliases[i].val == cs->c)
|
|
||||||
{
|
|
||||||
sprintf (p, ", --%s%s",
|
|
||||||
long_option_aliases[i].name, longarg);
|
|
||||||
p += strlen (p);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
{
|
|
||||||
const struct command_switch *ncs = cs;
|
|
||||||
while ((++ncs)->c != '\0')
|
|
||||||
if (ncs->description
|
|
||||||
&& ncs->description[0] == '-'
|
|
||||||
&& ncs->description[1] == cs->c)
|
|
||||||
{
|
|
||||||
/* This is another switch that does the same
|
|
||||||
one as the one we are processing. We want
|
|
||||||
to list them all together on one line. */
|
|
||||||
sprintf (p, ", -%c%s", ncs->c, shortarg);
|
|
||||||
p += strlen (p);
|
|
||||||
if (ncs->long_name != 0)
|
|
||||||
{
|
|
||||||
sprintf (p, ", --%s%s", ncs->long_name, longarg);
|
|
||||||
p += strlen (p);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (p - buf > DESCRIPTION_COLUMN - 2)
|
|
||||||
/* The list of option names is too long to fit on the same
|
|
||||||
line with the description, leaving at least two spaces.
|
|
||||||
Print it on its own line instead. */
|
|
||||||
{
|
|
||||||
fprintf (usageto, "%s\n", buf);
|
|
||||||
buf[0] = '\0';
|
|
||||||
}
|
|
||||||
|
|
||||||
fprintf (usageto, "%*s%s.\n",
|
|
||||||
- DESCRIPTION_COLUMN,
|
|
||||||
buf, gettext (cs->description));
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!remote_description || *remote_description == '\0')
|
if (!remote_description || *remote_description == '\0')
|
||||||
fprintf (usageto, _("\nThis program built for %s"), make_host);
|
fprintf (usageto, _("\nThis program built for %s\n"), make_host);
|
||||||
else
|
else
|
||||||
fprintf (usageto, "\nThis program built for %s (%s)", make_host, remote_description);
|
fprintf (usageto, _("\nThis program built for %s (%s)\n"),
|
||||||
|
make_host, remote_description);
|
||||||
|
|
||||||
fprintf (usageto, _("\nReport bugs to <bug-make@gnu.org>\n"));
|
fprintf (usageto, _("Report bugs to <bug-make@gnu.org>\n"));
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Decode switches from ARGC and ARGV.
|
/* Decode switches from ARGC and ARGV.
|
||||||
|
@ -218,7 +218,7 @@ changelog-check:
|
|||||||
po-check:
|
po-check:
|
||||||
if test -f po/POTFILES.in; then \
|
if test -f po/POTFILES.in; then \
|
||||||
grep -E -v '^(#|$$)' po/POTFILES.in | sort > $@-1; \
|
grep -E -v '^(#|$$)' po/POTFILES.in | sort > $@-1; \
|
||||||
grep -E -l '\b_\(' lib/*.c src/*.c | sort > $@-2; \
|
grep -E -l '\b_\(' *.c | sort > $@-2; \
|
||||||
diff -u $@-1 $@-2 || exit 1; \
|
diff -u $@-1 $@-2 || exit 1; \
|
||||||
rm -f $@-1 $@-2; \
|
rm -f $@-1 $@-2; \
|
||||||
fi
|
fi
|
||||||
|
4
misc.c
4
misc.c
@ -339,7 +339,7 @@ void
|
|||||||
perror_with_name (str, name)
|
perror_with_name (str, name)
|
||||||
const char *str, *name;
|
const char *str, *name;
|
||||||
{
|
{
|
||||||
error (NILF, "%s%s: %s", str, name, strerror (errno));
|
error (NILF, _("%s%s: %s"), str, name, strerror (errno));
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Print an error message from errno and exit. */
|
/* Print an error message from errno and exit. */
|
||||||
@ -348,7 +348,7 @@ void
|
|||||||
pfatal_with_name (name)
|
pfatal_with_name (name)
|
||||||
const char *name;
|
const char *name;
|
||||||
{
|
{
|
||||||
fatal (NILF, "%s: %s", name, strerror (errno));
|
fatal (NILF, _("%s: %s"), name, strerror (errno));
|
||||||
|
|
||||||
/* NOTREACHED */
|
/* NOTREACHED */
|
||||||
}
|
}
|
||||||
|
@ -9,6 +9,7 @@ expand.c
|
|||||||
file.c
|
file.c
|
||||||
function.c
|
function.c
|
||||||
getopt.c
|
getopt.c
|
||||||
|
hash.c
|
||||||
implicit.c
|
implicit.c
|
||||||
job.c
|
job.c
|
||||||
main.c
|
main.c
|
||||||
|
@ -214,7 +214,6 @@ handle_special_var (var)
|
|||||||
|
|
||||||
if (streq (var->name, ".TARGETS"))
|
if (streq (var->name, ".TARGETS"))
|
||||||
var->value = build_target_list (var->value);
|
var->value = build_target_list (var->value);
|
||||||
|
|
||||||
else
|
else
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user