Re: [dev] Some core tools

From: Mattias Andrée <maandree_AT_kth.se>
Date: Thu, 2 Feb 2017 21:13:28 +0100

On Thu, 2 Feb 2017 20:08:04 +0000
Connor Lane Smith <cls_AT_lubutu.com> wrote:

> On 2 February 2017 at 19:54, Markus Wichmann
> <nullplan_AT_gmx.net> wrote:
> > GNU make style patsubst rules, i.e.
> >
> > %.o: %.c
> > $(CC) $(CFLAGS) -o $_AT_ $<
> >
> > Those are really useful.
>
> While GNU's syntax can be more general, that rule can be
> done in POSIX make:
>
> > .c.o:
> > $(CC) $(CFLAGS) -c $<
>
> Likewise,
>
> > .o:
> > $(CC) $(CFLAGS) $(LDFLAGS) -o $_AT_ $<
>
> cls
>

However, there are probably a lot of makefiles
in the white that uses %, and you cannot do

%.o: src/%.c
        ...

without %, unless you do a really ugly hack:

.SCCS_GET: cp src/$_AT_ $@
.c.o:
        ...


maandree

Received on Thu Feb 02 2017 - 21:13:28 CET

This archive was generated by hypermail 2.3.0 : Thu Feb 02 2017 - 21:24:14 CET