On Wed, Oct 14, 2009 at 12:15 AM, Przemyslaw Czerpak <[email protected]> wrote:

>   #!/bin/sh
>   echo -n "${1%.prg}.o: " > "${1%.prg}.d"
>   hbcmp -n2 -sm -q2 "$1" >> "${1%.prg}.d"

What about integrate it with hbcmp itself?

This is a typical rules file I use in a hrb+js+xml app where prg
includes many js and xml using streaminclude:

...
PRGFILES=$(wildcard $(ROOT)*.prg)
PPXFILES=$(patsubst %.prg,%.hrb,$(PRGFILES))
HRBFILES=$(subst $(ROOT),,$(PPXFILES))

-include $(HRBFILES:.hrb=.d)

%.hrb: $(ROOT)%.prg
        hbcmp -km -w3 -es0 -q0 -gh -n -D__hrb__ -I../dbl/ $?

if hbcmp would accepts -sM or -sMM and would produce a "target:
dependeces" it would great.

This will also be in sync with "standard" make like in:

OBJS := foo.o bar.o

# link
proggie: $(OBJS)
        gcc $(OBJS) -o proggie

# pull in dependency info for *existing* .o files
-include $(OBJS:.o=.d)

# compile and generate dependency info
%.o: %.c
        gcc -c $(CFLAGS) $*.c -o $*.o
        gcc -MM $(CFLAGS) $*.c > $*.d

Just an idea.

best regards,
Lorenzo
_______________________________________________
Harbour mailing list
[email protected]
http://lists.harbour-project.org/mailman/listinfo/harbour

Reply via email to