Consider the following:

    ARGS=$(wildcard *.xx)

    target:
            command $(ARGS)

The above only works if the length of the resulting command line is within
system limits.  From the shell, you can solve this by:

        echo *.xx | xargs command

But the above does not work in make because it expands the wildcard, and then
launches a command line that is again too long.

I propose that GNUmake add the following function:

        $(xargs cmd, list)

Then I could render the intial example as:

    ARGS=$(wildcard *.xx)

    target:
            $(xargs command, $(ARGS))

Which resolves to:

        command some_args; command more_args; command even_more_args

where the number of commands depends on the command line length for the
given platform.  This would allow us to write Makefiles that work on all
platforms regardless of command line length.

Since I'm somewhat familiar with the GNUmake source I'd like to take a stab at
implementing this.  If you can give me any pointers on how I should proceed I
would appreciate it. 

Regards

Reid Madsen

-- 
Reid Madsen                             [EMAIL PROTECTED]                      
Senior Member, Tech. Staff              (972) 536-3261 (Desk)
I2 Technologies                         (214) 850-9613 (Cellular)
--
Making incrementally (without 'clean') since May 18, 2000.
Long live incremental make!

_______________________________________________
Bug-make mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/bug-make

Reply via email to