"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "sunpro/Make/bin/make/common/read.cc" between
schily-2021-08-14.tar.bz2 and schily-2021-09-18.tar.bz2

About: Schily Tools are a collection of programs like cdrecord, cdda2wav, mkisofs, star and much more. In memoriam of the author Jörg Schilling, who passed away in October 2021.

read.cc  (schily-2021-08-14.tar.bz2):read.cc  (schily-2021-09-18.tar.bz2)
skipping to change at line 36 skipping to change at line 36
*/ */
/* /*
* @(#)read.cc 1.64 06/12/12 * @(#)read.cc 1.64 06/12/12
*/ */
#pragma ident "@(#)read.cc 1.64 06/12/12" #pragma ident "@(#)read.cc 1.64 06/12/12"
/* /*
* Copyright 2017-2021 J. Schilling * Copyright 2017-2021 J. Schilling
* *
* @(#)read.cc 1.33 21/08/10 2017-2021 J. Schilling * @(#)read.cc 1.35 21/09/06 2017-2021 J. Schilling
*/ */
#include <schily/mconfig.h> #include <schily/mconfig.h>
#ifndef lint #ifndef lint
static UConst char sccsid[] = static UConst char sccsid[] =
"@(#)read.cc 1.33 21/08/10 2017-2021 J. Schilling"; "@(#)read.cc 1.35 21/09/06 2017-2021 J. Schilling";
#endif #endif
/* /*
* read.c * read.c
* *
* This file contains the makefile reader. * This file contains the makefile reader.
*/ */
/* /*
* Included files * Included files
skipping to change at line 164 skipping to change at line 164
* Static variables used: * Static variables used:
* *
* Global variables used: * Global variables used:
* do_not_exec_rule Is -n on? * do_not_exec_rule Is -n on?
* file_being_read Set to the name of the new file * file_being_read Set to the name of the new file
* line_number The number of the current makefile line * line_number The number of the current makefile line
* makefiles_used A list of all makefiles used, appended to * makefiles_used A list of all makefiles used, appended to
*/ */
Boolean Boolean
read_simple_file(register Name makefile_name, register Boolean chase_path, regis ter Boolean doname_it, Boolean complain, Boolean must_exist, Boolean report_file , Boolean lock_makefile) read_simple_file(register Name makefile_name, register Boolean chase_path, regis ter Boolean doname_it, Boolean complain, Boolean must_exist, Boolean report_file , Boolean lock_makefile, Boolean is_include)
{ {
static short max_include_depth; static short max_include_depth;
register Property makefile = maybe_append_prop(makefile_name, register Property makefile = maybe_append_prop(makefile_name,
makefile_prop); makefile_prop);
Boolean forget_after_parse = false; Boolean forget_after_parse = false;
static pathpt makefile_path; static pathpt makefile_path;
register int n; register int n;
char *path; char *path;
register Source source = ALLOC(Source); register Source source = ALLOC(Source);
Property orig_makefile = makefile; Property orig_makefile = makefile;
skipping to change at line 378 skipping to change at line 378
} }
max_include_depth--; max_include_depth--;
makefile_type = save_makefile_type; makefile_type = save_makefile_type;
return failed; return failed;
} }
makefile_type = save_makefile_type; makefile_type = save_makefile_type;
// //
// Before calling exists() make sure that we have the rig ht timestamp // Before calling exists() make sure that we have the rig ht timestamp
// //
makefile_name->stat.time = file_no_time; makefile_name->stat.time = file_no_time;
#ifdef DO_INCLUDE_FAILED
/*
* Only call rule commands for "include", not for
* "-include". This is the case if "complain" is true.
*/
if (is_include && complain && include_failed &&
exists(makefile_name) == file_doesnt_exist) {
register Property line;
if ((line = get_prop(include_failed_name->prop, l
ine_prop)) != NULL &&
line->body.line.command_template) {
struct _Dependency dep;
dep.next = NULL;
dep.name = makefile_name;
dep.automatic = dep.stale = dep.built = f
alse;
line->body.line.dependencies = &dep; /
* Set up $^ */
makefile_name->stat.time = file_max_time;
doname(include_failed_name, false, false)
;
line->body.line.dependencies = NULL;
makefile_name->stat.time = file_no_time;
}
}
#endif
if (exists(makefile_name) == file_doesnt_exist) { if (exists(makefile_name) == file_doesnt_exist) {
if (complain || if (complain ||
(makefile_name->stat.stat_errno != ENOENT)) { (makefile_name->stat.stat_errno != ENOENT)) {
if (must_exist) { if (must_exist) {
fatal(gettext("Can't find `%s': % s"), fatal(gettext("Can't find `%s': % s"),
makefile_name->string_mb, makefile_name->string_mb,
errmsg(makefile_name-> errmsg(makefile_name->
stat.stat_errno)); stat.stat_errno));
} else { } else {
skipping to change at line 1042 skipping to change at line 1066
* $(FOO) to expand to more than one incude file name. * $(FOO) to expand to more than one incude file name.
* So let us be quiet with empty includes. * So let us be quiet with empty includes.
*/ */
if (*makefile_name->string_mb != nul_char && if (*makefile_name->string_mb != nul_char &&
read_simple_file(makefile_name, read_simple_file(makefile_name,
true, true,
true, true,
directive_type == D_IINCLUDE ? false :true, directive_type == D_IINCLUDE ? false :true,
false, false,
true, true,
false) == failed && directive_type ! false,
= D_IINCLUDE) { true) == failed && directive_type !=
D_IINCLUDE) {
fatal_reader(gettext("Read of include fil e `%s' failed"), fatal_reader(gettext("Read of include fil e `%s' failed"),
makefile_name->string_mb); makefile_name->string_mb);
} }
makefile_type = save_makefile_type; makefile_type = save_makefile_type;
do_not_exec_rule = save_do_not_exec_rule; do_not_exec_rule = save_do_not_exec_rule;
CACHE_SOURCE(0); CACHE_SOURCE(0);
break; break;
case D_EXPORT: case D_EXPORT:
doexport(makefile_name); doexport(makefile_name);
skipping to change at line 2372 skipping to change at line 2397
/* Make sure that we use dependencies /* Make sure that we use dependencies
* entered for makefiles */ * entered for makefiles */
target->names[i]->state = build_dont_know; target->names[i]->state = build_dont_know;
/* If the target is special we delegate /* If the target is special we delegate
* the processing */ * the processing */
if (target->names[i]->special_reader if (target->names[i]->special_reader
!= no_special) { != no_special) {
special_reader(target->names[i], special_reader(target->names[i],
depes, depes,
command); command,
separator);
} }
/* Check if this is a "a%b : x%y" type rule */ /* Check if this is a "a%b : x%y" type rule */
else if (target->names[i]->percent) { else if (target->names[i]->percent) {
percent_ptr = percent_ptr =
enter_percent(target->names[i], enter_percent(target->names[i],
target->target_group[i], target->target_group[i],
depes, command); depes, command);
if (target_group_seen) { if (target_group_seen) {
target_group_member->percent_memb er = target_group_member->percent_memb er =
percent_ptr; percent_ptr;
 End of changes. 6 change blocks. 
6 lines changed or deleted 36 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)