Re: [Harbour] About the new -sm option
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 Harbour@harbour-project.org http://lists.harbour-project.org/mailman/listinfo/harbour
Re: [Harbour] About the new -sm option
On Wed, Oct 14, 2009 at 9:52 AM, Przemyslaw Czerpak dru...@acn.waw.pl wrote: 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) Many thanks. I've also tried sth like that but I get: ../hrb/anaedt.d:1: *** missing separator. Stop. when I add -include $(DFILES) .d files are not in the form that can be used directly in make. best regards, Lorenzo ___ Harbour mailing list Harbour@harbour-project.org http://lists.harbour-project.org/mailman/listinfo/harbour
Re: [Harbour] About the new -sm option
On Wed, Oct 14, 2009 at 10:33 AM, Lorenzo Fiorini lorenzo.fior...@gmail.com wrote: .d files are not in the form that can be used directly in make. Adding -n to echo and replacing $? with $ I got it working. best regards, Lorenzo ___ Harbour mailing list Harbour@harbour-project.org http://lists.harbour-project.org/mailman/listinfo/harbour
Re: [Harbour] About the new -sm option
On Wed, 14 Oct 2009, Lorenzo Fiorini wrote: 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) Many thanks. I've also tried sth like that but I get: ../hrb/anaedt.d:1: *** missing separator. Stop. when I add -include $(DFILES) .d files are not in the form that can be used directly in make. Please simply modify above example and instead of 'echo $@' use 'echo $@: ', i.e.: ( echo $@: ; hbcmp $(PRGFLAGS) -q2 -sm $? ) $(?:.prg=.d) best regards, Przemek ___ Harbour mailing list Harbour@harbour-project.org http://lists.harbour-project.org/mailman/listinfo/harbour
Re: [Harbour] About the new -sm option
On Wed, Oct 14, 2009 at 2:54 PM, Przemyslaw Czerpak dru...@acn.waw.pl wrote: Please simply modify above example and instead of 'echo $@' use 'echo $@: ', i.e.: ( echo $@: ; hbcmp $(PRGFLAGS) -q2 -sm $? ) $(?:.prg=.d) Many thanks. This is the final form: ... DFILES=$(HRBFILES:.hrb=.d) PRGFLAGS=-km -w3 -es0 -q0 -gh -n -D__hrb__ -I../dbl/ -include $(DFILES) %.hrb: $(ROOT)%.prg hbcmp $(PRGFLAGS) $ ( echo -n $@: ; hbcmp $(PRGFLAGS) -q2 -sm $ ) $(@:.hrb=.d) ... best regards, Lorenzo ___ Harbour mailing list Harbour@harbour-project.org http://lists.harbour-project.org/mailman/listinfo/harbour
Re: [Harbour] About the new -sm option
On Wed, Oct 14, 2009 at 2:54 PM, Przemyslaw Czerpak dru...@acn.waw.pl wrote: Please simply modify above example and instead of 'echo $@' use 'echo $@: ', i.e.: ( echo $@: ; hbcmp $(PRGFLAGS) -q2 -sm $? ) $(?:.prg=.d) It doesn't work when I use it in prg - o hbcmp. make stop with Error 1 on the first prg but it works if I use make -i ( ignore error ) I can't really see the difference ( beside the fact that it creates .o instead of .hrb ). best regards, Lorenzo ___ Harbour mailing list Harbour@harbour-project.org http://lists.harbour-project.org/mailman/listinfo/harbour
Re: [Harbour] About the new -sm option
On Wed, Oct 14, 2009 at 4:34 PM, Lorenzo Fiorini lorenzo.fior...@gmail.com wrote: I can't really see the difference ( beside the fact that it creates .o instead of .hrb ). If I add -gh to the ( echo $@: ; hbcmp $(PRGFLAGS) -gh -q2 -sm $? ) $(?:.prg=.d) it works. So it could be the hb_cc that gets execute while it should be skipped with -sm. best regards, Lorenzo ___ Harbour mailing list Harbour@harbour-project.org http://lists.harbour-project.org/mailman/listinfo/harbour
Re: [Harbour] About the new -sm option
On Wed, 14 Oct 2009, Lorenzo Fiorini wrote: On Wed, Oct 14, 2009 at 2:54 PM, Przemyslaw Czerpak dru...@acn.waw.pl wrote: Please simply modify above example and instead of 'echo $@' use 'echo $@: ', i.e.: ( echo $@: ; hbcmp $(PRGFLAGS) -q2 -sm $? ) $(?:.prg=.d) It doesn't work when I use it in prg - o hbcmp. There is no difference on the harbour side (I intentionally did not add destination.exe: to dependencies list generated by harbour compiler to not move such problems to compiler code) so the problem is in your Makefile. make stop with Error 1 on the first prg but it works if I use make -i ( ignore error ) I can't really see the difference ( beside the fact that it creates .o instead of .hrb ). And for harbour compiler and hb* scripts such difference does not exists so it has to be sth in your Makefile settings. I cannot help you without seeing your exact Makefile code. (I guess you added -n to above echo command). best regards, Przemek ___ Harbour mailing list Harbour@harbour-project.org http://lists.harbour-project.org/mailman/listinfo/harbour
Re: [Harbour] About the new -sm option
Hi Lorenzo, BTW, is there anything still missing from hbmk2 which makes it unsuitable for your case? I'd be interested in your view. Brgds, Viktor On 2009 Oct 14, at 16:42, Lorenzo Fiorini wrote: On Wed, Oct 14, 2009 at 4:34 PM, Lorenzo Fiorini lorenzo.fior...@gmail.com wrote: I can't really see the difference ( beside the fact that it creates .o instead of .hrb ). If I add -gh to the ( echo $@: ; hbcmp $(PRGFLAGS) -gh -q2 -sm $? ) $(?:.prg=.d) it works. So it could be the hb_cc that gets execute while it should be skipped with -sm. best regards, Lorenzo ___ Harbour mailing list Harbour@harbour-project.org http://lists.harbour-project.org/mailman/listinfo/harbour ___ Harbour mailing list Harbour@harbour-project.org http://lists.harbour-project.org/mailman/listinfo/harbour
Re: [Harbour] About the new -sm option
On Wed, Oct 14, 2009 at 4:54 PM, Przemyslaw Czerpak dru...@acn.waw.pl wrote: I cannot help you without seeing your exact Makefile code. (I guess you added -n to above echo command). Did you see my msg about adding -gh and hb_cc? best regards, Lorenzo ___ Harbour mailing list Harbour@harbour-project.org http://lists.harbour-project.org/mailman/listinfo/harbour
Re: [Harbour] About the new -sm option
On Wed, 14 Oct 2009, Lorenzo Fiorini wrote: I can't really see the difference ( beside the fact that it creates .o instead of .hrb ). If I add -gh to the ( echo $@: ; hbcmp $(PRGFLAGS) -gh -q2 -sm $? ) $(?:.prg=.d) it works. So it could be the hb_cc that gets execute while it should be skipped with -sm. You are right though it's not the problem of executing hb_cc but missing .c file as result of harbour compiler call. hb_cmp looks for such file when -gc[0-3] is used or non of -g* switch is passed by user. Using -gh or -go as workaround resolves the problem. I'll update hb* scripts in a while. Thank you for information. best regards, Przemek ___ Harbour mailing list Harbour@harbour-project.org http://lists.harbour-project.org/mailman/listinfo/harbour
Re: [Harbour] About the new -sm option
On Wed, Oct 14, 2009 at 5:01 PM, Viktor Szakáts harbour...@syenar.hu wrote: BTW, is there anything still missing from hbmk2 which makes it unsuitable for your case? I'd be interested in your view. Sorry I haven't looked at hbmk2 so far. I've customized hb-funcs to integrate contribs like gd and pgsql and local libs so it would take time to rethink the whole make system. best regards, Lorenzo ___ Harbour mailing list Harbour@harbour-project.org http://lists.harbour-project.org/mailman/listinfo/harbour
[Harbour] About the new -sm option
I'm trying to figure out how to use it in my makefiles with hb* scripts. To avoid the double call of hbcmp, I'm trying to create a make depend target that creates a .d file. Is this the supposed usage? best regards, Lorenzo ___ Harbour mailing list Harbour@harbour-project.org http://lists.harbour-project.org/mailman/listinfo/harbour
Re: [Harbour] About the new -sm option
On Tue, 13 Oct 2009, Lorenzo Fiorini wrote: I'm trying to figure out how to use it in my makefiles with hb* scripts. To avoid the double call of hbcmp, I'm trying to create a make depend target that creates a .d file. Is this the supposed usage? If you want to use it in such context then why not, i.e. use this script to generate .d file for .prg file given as 1-st parameter: #!/bin/sh echo -n ${1%.prg}.o: ${1%.prg}.d hbcmp -n2 -sm -q2 $1 ${1%.prg}.d best regards, Przemek ___ Harbour mailing list Harbour@harbour-project.org http://lists.harbour-project.org/mailman/listinfo/harbour
Re: [Harbour] About the new -sm option
On Wed, Oct 14, 2009 at 12:15 AM, Przemyslaw Czerpak dru...@acn.waw.pl 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 Harbour@harbour-project.org http://lists.harbour-project.org/mailman/listinfo/harbour