[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug #62118] Fix parsing of command line options -f, --file, --makefile.
From: |
Dmitry Goncharov |
Subject: |
[bug #62118] Fix parsing of command line options -f, --file, --makefile. |
Date: |
Sat, 26 Feb 2022 11:53:01 -0500 (EST) |
URL:
<https://savannah.gnu.org/bugs/?62118>
Summary: Fix parsing of command line options -f, --file,
--makefile.
Project: make
Submitted by: dgoncharov
Submitted on: Sat 26 Feb 2022 04:52:59 PM UTC
Severity: 3 - Normal
Item Group: Bug
Status: None
Privacy: Public
Assigned to: None
Open/Closed: Open
Discussion Lock: Any
Component Version: SCM
Operating System: None
Fixed Release: None
Triage Status: None
_______________________________________________________
Details:
Make fails to parse command line options -f, --file, --makefile when there is
a makefile that updates itself and also makefile read from stdin with -f
combined with other options.
++++
$ cat makefile
def:;echo hello world
ifeq ($(flavor $(MAKE_RESTARTS)), undefined)
makefile: force
$(info updating makefile)
touch makefile
force:
endif
$ printf 'all:; $(info all)' | make --debug=b -Rf- -f makefile def
GNU Make 4.3
Built for x86_64-pc-linux-gnu
Copyright (C) 1988-2020 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Reading makefiles...
Updating makefiles....
updating makefile
touch makefile
Re-executing[1]: make --debug=b -Rf- -f /tmp/GmtbheQ7 def -o/tmp/GmtbheQ7
GNU Make 4.3
Built for x86_64-pc-linux-gnu
Copyright (C) 1988-2020 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Reading makefiles...
Updating makefiles....
Updating goal targets....
File 'def' does not exist.
Must remake target 'def'.
make: *** No rule to make target 'def'. Stop.
$
----
Notice
++++
Re-executing[1]: make --debug=b -Rf- -f /tmp/GmtbheQ7 def -o/tmp/GmtbheQ7
----
Should be
++++
Re-executing[1]: make --debug=b -Rf/tmp/GmuF8N7n -f makefile def
-o/tmp/GmuF8N7n
----
With the patch applied
++++
$ printf 'all:; $(info all)' | make --debug=b -Rf- -f makefile def
GNU Make 4.3.90
Built for x86_64-pc-linux-gnu
Copyright (C) 1988-2020 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later
<https://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Reading makefiles...
Updating makefiles....
updating makefile
touch makefile
Re-executing[1]: make --debug=b -Rf/tmp/GmuF8N7n -f makefile def
-o/tmp/GmuF8N7n
GNU Make 4.3.90
Built for x86_64-pc-linux-gnu
Copyright (C) 1988-2020 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later
<https://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Reading makefiles...
Updating makefiles....
updating makefile
touch makefile
Updating goal targets....
File 'def' does not exist.
Must remake target 'def'.
echo hello world
hello world
Successfully remade target file 'def'.
$
----
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?62118>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
- [bug #62118] Fix parsing of command line options -f, --file, --makefile.,
Dmitry Goncharov <=