Mail Archives: djgpp-workers/2003/07/19/08:39:19
Hello.
Andrew Cottrell wrote:
>
> [snip]
> > Since you've generated gpp.opt, why not use it? How about:
> >
> > XNOPGGPP = $(CROSS_GCC) $(shell sed -f $(TOP)/../noprof.sed
> > $(TOP)/../gpp.opt) -I. -I- -isystem $(TOP)/../../include $(CFLAGS)
> I have done this.
>
> > Incidentally, what causes gpp.opt to be built? Does the
> > default rule built it? I couldn't see anything in the patch,
> > to force it to be built.
> I added the following rule to built it:-
>
> *************** $(HOSTBIN)/%.exe : %
> *** 155,160 ****
> --- 160,168 ----
> all :: $(OBJS) $(EXTRA_OBJS) $(EXTRA_FILES)
> $(NOP)
>
> + $(TOP)/../gpp.opt : $(TOP)/../gcc.opt
> + sed -f $(TOP)/../gpp_opt.sed $< > $@
> +
> ifneq ($(MAKEFILE_LIB),1)
> all :: makefile.oh
> makefile.oh : makefile
I saw that, but what depends on gpp.opt? AFAICT nothing would cause it to be
built, when you start with a fresh tree. Maybe you need a line like:
$(OBJS): $(TOP)/../gpp.opt
Or does make auto-detect that it needs to build $(TOP)/../gpp.opt?
Maybe I'm missing something.
> I spotted a problem with the patch and I don't know how to get arround it
> with my limited make knowledge. The problem is that make clean does not
> remove gpp.opt . I have tried the following:-
> clean ::
> -$(MISC) rm *.o *.d *.i makefile.oh gpp.opt
>
> and also the following, but this gives and error
> clean ::
> rm gpp.opt
> -$(MISC) rm *.o *.d *.i makefile.oh
>
> Any ideas on this one?
I don't understand. I wonder why the first one didn't work.
As to the second one: we can't require 'rm'. That's the point of the utility
$(MISC) - to avoid a dependency on fileutils/coreutils.
Sorry, I know that's not really much help.
Bye, Rich =]
--
Richard Dawe [ http://www.phekda.freeserve.co.uk/richdawe/ ]
- Raw text -