[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug #46580] plugin: macro functions cannot be called with zero paramete
From: |
Brian Vandenberg |
Subject: |
[bug #46580] plugin: macro functions cannot be called with zero parameters |
Date: |
Tue, 01 Dec 2015 19:54:58 +0000 |
User-agent: |
Mozilla/5.0 (Windows NT 6.1; Win64; x64; Trident/7.0; rv:11.0) like Gecko |
URL:
<http://savannah.gnu.org/bugs/?46580>
Summary: plugin: macro functions cannot be called with zero
parameters
Project: make
Submitted by: phantal
Submitted on: Tue 01 Dec 2015 07:54:57 PM GMT
Severity: 3 - Normal
Item Group: Bug
Status: None
Privacy: Public
Assigned to: None
Open/Closed: Open
Discussion Lock: Any
Component Version: 4.1
Operating System: Any
Fixed Release: None
Triage Status: None
_______________________________________________________
Details:
I added a macro for getting the current makefile; it's attached in
example.sh.
The short version: if a macro doesn't need any arguments you cannot execute
the macro unless you trail the name with a space or execute it with $(call):
$(current_makefile) <--- attempts to expand a variable of that name
$(current_makefile ) <-- works
$(call current_makefile) <-- also works
The long version; to begin with:
* I had to re-type the script because my development machine doesn't have
internet access; my apologies if it has errors.
* I understand that "reading_file" is not part of the interface currently
exposed. I couldn't find any way to use "gmk_floc" through the already
exposed API, so I'm tinkering with this. I'll be putting that in as another
enhancement request.
* The documentation doesn't make it entirely clear what should happen if the
minimum # of arguments is zero for the 3rd parameter to gmk_add_function.
When the script is executed this is what I see:
/tmp/GmDbftx0:1: warning: undefined variable '.LOADED'
/tmp/GmDbftx0:2: warning: undefined variable 'current_makefile'
/tmp/GmDbftx0
/tmp/GmDbftx0
gmake: *** No targets. Stop.
_______________________________________________________
File Attachments:
-------------------------------------------------------
Date: Tue 01 Dec 2015 07:54:57 PM GMT Name: example.sh Size: 826B By:
phantal
<http://savannah.gnu.org/bugs/download.php?file_id=35609>
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?46580>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
- [bug #46580] plugin: macro functions cannot be called with zero parameters,
Brian Vandenberg <=