On Wed, 14 Oct 2009, Lorenzo Fiorini 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.
You do not need any new hbcmp script switches to replicate such
behavior, i.e.:
PRGFLAGS=-km -w3 -es0 -q0 -gh -n -D__hrb__ -I../dbl/
%.hrb: $(ROOT)%.prg
hbcmp $(PRGFLAGS) $?
( echo $@ ; hbcmp $(PRGFLAGS) -q2 -sm $? ) > $(?:.prg=.d)
best regards,
Przemek
_______________________________________________
Harbour mailing list
[email protected]
http://lists.harbour-project.org/mailman/listinfo/harbour