Re: Better description for define?

2015-01-06 Thread SF Markus Elfring
 The define construct is already in the index.

I am missing an explanation there for the aspect when the construct define … 
endef
should be used instead of the other variants for variable assignments.
http://www.gnu.org/software/make/manual/html_node/Reading-Makefiles.html#index-define_002c-expansion

A corresponding implementation detail might not be as obvious here for me
as for other make users.

Regards,
Markus

___
Bug-make mailing list
Bug-make@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-make


Re: Better description for define?

2015-01-06 Thread Tim Murphy
define..endef allows you to assign multi-line values to a variable.

Regards,

Tim

On 6 January 2015 at 11:57, SF Markus Elfring elfr...@users.sourceforge.net
 wrote:

  The define construct is already in the index.

 I am missing an explanation there for the aspect when the construct
 define … endef
 should be used instead of the other variants for variable assignments.

 http://www.gnu.org/software/make/manual/html_node/Reading-Makefiles.html#index-define_002c-expansion

 A corresponding implementation detail might not be as obvious here for me
 as for other make users.

 Regards,
 Markus




-- 
You could help some brave and decent people to have access to uncensored
news by making a donation at:

http://www.thezimbabwean.co.uk/friends/
___
Bug-make mailing list
Bug-make@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-make


Re: Better description for define?

2015-01-06 Thread SF Markus Elfring
 Would it help a bit to mention this information explicitly
 in the manual?
 
 I'm not sure what you mean.  If you look up define in the GNU make
 manual index:
 
 http://www.gnu.org/software/make/manual/make.html#Name-Index_fn_letter-D
 
 it will send you here:
 
 http://www.gnu.org/software/make/manual/make.html#Multi_002dLine
 
 which is an entire section describing this feature with examples, and
 titled Defining Multi-Line Variables.

Now I notice that the indexes are different between the manual versions
one web page and page per node.
Is there any more synchronisation needed for this documentation?


Would a link be nice besides the paragraph Variable definitions are
parsed as follows: from the section 3.7 How make Reads a Makefile
to the section 6.8 Defining Multi-Line Variables?

Regards,
Markus


___
Bug-make mailing list
Bug-make@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-make


Re: Dynamic adjustments of build dependencies for the number of available processors

2015-01-06 Thread Norbert Thiebaud
On Mon, Jan 5, 2015 at 1:23 PM, Paul Smith psm...@gnu.org wrote:
 On Mon, 2015-01-05 at 20:06 +0100, SF Markus Elfring wrote:
  So you have in your toolbox $(shell) and $(eval).

 I am not familiar enough with the second make function.
 http://www.gnu.org/software/make/manual/html_node/Eval-Function.html

 I wrote some blog posts about eval and other metaprogramming techniques
 in make that you might find interesting:

 http://make.mad-scientist.net/category/metaprogramming/


For a real-life large scale use and abuse of these techniques see:

implementation:
http://cgit.freedesktop.org/libreoffice/core/tree/solenv/gbuild

example of use:
http://cgit.freedesktop.org/libreoffice/core/tree/svl/Library_svl.mk

___
Bug-make mailing list
Bug-make@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-make


Extracting structured data from file names

2015-01-06 Thread SF Markus Elfring
Hello,

I can generate a few file names with an approach
like the following.

MY_FILES::=
$(foreach index,$(shell seq 2 -1 0),$(eval MY_FILES+=X$(index).txt))

all: $(MY_FILES)
@echo '|$^|'

$(MY_FILES): ;


Now I am looking for a way to extract the number from
the shown prerequisite.
Can I get such encoded data by standard make and
shell functions?

Regards,
Markus

___
Bug-make mailing list
Bug-make@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-make