You could try to write a new function and get it accepted but don't forget
that there is a mechanism for loadable modules that allows you to make
functions which can be dynamically loaded into an existing version of gnu
make.

Regards,

Tim

On Mon, 6 Aug 2018, 05:32 , <clemens1...@web.de> wrote:

> Hi,
>
> I miss the function 'uniq' without sorting.
>
> The function is useful to reduce include path list in huge and
> automatically generated Makefile projects. An example is AutoSar.
> Benefits are:
> - acceleration
> - commandline limitations of some cross compiler
> - easyer to read commandline.
>
> Currently I use:
>
> ----------------  snip ----------------
>
>
> ################################################################################
> #
> #  function uniq(list)
> #
> #  do uniq without sort.
> #
> #  Makfile has uniq only in sort which is not possible for include path
> order.
> #
> #  tr " " "\n" : fields -> lines
> #  cat -n      : add lines numbers
> #  sort -uk2   : sort uniq with field 2
> #  sort -nk1   : sort in previous order
> #  cut -f2-    : remove line numbers
> #  tr "\n" " " : lines -> fields
> #
> uniq=$(shell echo $(1) | tr " " "\n" | cat -n | sort -uk2 | sort -nk1| cut
> -f2- | tr "\n" " ")
>
> ----------------  snip ----------------
>
>
> I would like to contribute the C-function to make.
>
> Is this the right place to ask ?
>
> Kind Regards,
> Clemens
>
> _______________________________________________
> Bug-make mailing list
> Bug-make@gnu.org
> https://lists.gnu.org/mailman/listinfo/bug-make
>
_______________________________________________
Bug-make mailing list
Bug-make@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-make

Reply via email to