Commit 9ce1bc24 authored by Vladimir Bashkirtsev's avatar Vladimir Bashkirtsev
Browse files

Revert previous commit

parent fb1167d3
all:
tar xf make-4.3.tar.gz
patch -Np1 -d make-4.3 < make-4.3-fix_included_makefile.patch
cd make-4.3 && ./configure --build=$(CLFS_TARGET) --prefix=/usr
$(MAKE) -C make-4.3
if [[ ! "$(BUILD_OPTIONS)" =~ no-tests ]] ; then \
......
diff -uNr make-4.3/src/makeint.h make-4.3-fix_included_makefile/src/makeint.h
--- make-4.3/src/makeint.h 2020-01-20 07:02:59.000000000 +1030
+++ make-4.3-fix_included_makefile/src/makeint.h 2021-08-03 10:47:07.011722714 +0930
@@ -565,6 +565,7 @@
void print_dir_data_base (void);
void dir_setup_glob (glob_t *);
void hash_init_directories (void);
+FILE_TIMESTAMP name_mtime (const char *name);
void define_default_variables (void);
void undefine_default_variables (void);
diff -uNr make-4.3/src/read.c make-4.3-fix_included_makefile/src/read.c
--- make-4.3/src/read.c 2020-01-03 17:41:27.000000000 +1030
+++ make-4.3-fix_included_makefile/src/read.c 2021-08-03 10:48:13.937940161 +0930
@@ -418,6 +418,11 @@
/* Success; clear errno. */
deps->error = 0;
+ /* Managed to read the file. Update mtime, if needed.
+ https://savannah.gnu.org/bugs/?57676. */
+ if (deps->file->last_mtime == NONEXISTENT_MTIME)
+ deps->file->last_mtime = name_mtime(deps->file->name);
+
/* Avoid leaking the makefile to children. */
fd_noinherit (fileno (ebuf.fp));
diff -uNr make-4.3/src/remake.c make-4.3-fix_included_makefile/src/remake.c
--- make-4.3/src/remake.c 2020-01-03 17:41:27.000000000 +1030
+++ make-4.3-fix_included_makefile/src/remake.c 2021-08-03 10:49:36.838209515 +0930
@@ -67,7 +67,6 @@
FILE_TIMESTAMP this_mtime, int *must_make);
static enum update_status touch_file (struct file *file);
static void remake_file (struct file *file);
-static FILE_TIMESTAMP name_mtime (const char *name);
static const char *library_search (const char *lib, FILE_TIMESTAMP *mtime_ptr);
@@ -1462,7 +1461,7 @@
This causes one duplicate stat() when -L is being used, but the code is
much cleaner. */
-static FILE_TIMESTAMP
+FILE_TIMESTAMP
name_mtime (const char *name)
{
FILE_TIMESTAMP mtime;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment