public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* Ada: VPATH in ada/Makefile.adalib
@ 2001-10-05  8:55 Florian Weimer
  2001-10-05  9:18 ` Geert Bosch
  0 siblings, 1 reply; 5+ messages in thread
From: Florian Weimer @ 2001-10-05  8:55 UTC (permalink / raw)
  To: gcc

After some tweaking, I've been able to build the GNAT run-time
library. However, the build process now stops because ada/Makefile
assumes that the ada/rts/ subdirectory contains all *.o files:

	$(AR) $(AR_FLAGS) rts/libgnat$(arext) \
	   $(addprefix rts/,$(GNATRTL_NONTASKING_OBJS) $(LIBGNAT_OBJS))

This is not true, some of the *.o files are not built because of the
use of VPATH in ada/Makefile.adalib.

In addition, the rules for the library targets in Makefile.adalib
should probably look like this:

    libgnat.a: $(GNAT_OBJS)
            $(AR) r libgnat.a $^

(So that the VPATH substitution is performed by make.)  But I'm not a
make expert, and I no longer intend to become one.

BTW, I guess this one of the reasons why recursive make is considered
harmful. ;-)

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Ada: VPATH in ada/Makefile.adalib
  2001-10-05  8:55 Ada: VPATH in ada/Makefile.adalib Florian Weimer
@ 2001-10-05  9:18 ` Geert Bosch
  2001-10-05  9:28   ` Laurent Guerby
                     ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Geert Bosch @ 2001-10-05  9:18 UTC (permalink / raw)
  To: Florian Weimer; +Cc: gcc

On Fri, 5 Oct 2001, Florian Weimer wrote:

  After some tweaking, I've been able to build the GNAT run-time
  library. However, the build process now stops because ada/Makefile
  assumes that the ada/rts/ subdirectory contains all *.o files:
  
  	$(AR) $(AR_FLAGS) rts/libgnat$(arext) \
  	   $(addprefix rts/,$(GNATRTL_NONTASKING_OBJS) $(LIBGNAT_OBJS))
  
  This is not true, some of the *.o files are not built because of the
  use of VPATH in ada/Makefile.adalib.

Makefile.adalib is not used for building the library in a normal build.
It is meant for cases where one wants to rebuild the library after installation,
which may be the case if you'd want to change the compilation options.

  -Geert

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Ada: VPATH in ada/Makefile.adalib
  2001-10-05  9:18 ` Geert Bosch
@ 2001-10-05  9:28   ` Laurent Guerby
  2001-10-05 10:09   ` Florian Weimer
  2001-10-06  2:13   ` Florian Weimer
  2 siblings, 0 replies; 5+ messages in thread
From: Laurent Guerby @ 2001-10-05  9:28 UTC (permalink / raw)
  To: bosch; +Cc: fw, gcc

I suggest one more line of comment on top of ada/Makefile.adalib to
state that this is not used as part of the regular build process and
what it is there for (this can be infered from the described step but
is not stated clearly right now :).

-- 
Laurent Guerby <guerby@acm.org>

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Ada: VPATH in ada/Makefile.adalib
  2001-10-05  9:18 ` Geert Bosch
  2001-10-05  9:28   ` Laurent Guerby
@ 2001-10-05 10:09   ` Florian Weimer
  2001-10-06  2:13   ` Florian Weimer
  2 siblings, 0 replies; 5+ messages in thread
From: Florian Weimer @ 2001-10-05 10:09 UTC (permalink / raw)
  To: Geert Bosch; +Cc: gcc

Geert Bosch <bosch@gnat.com> writes:

> On Fri, 5 Oct 2001, Florian Weimer wrote:
>
>   After some tweaking, I've been able to build the GNAT run-time
>   library. However, the build process now stops because ada/Makefile
>   assumes that the ada/rts/ subdirectory contains all *.o files:
>   
>   	$(AR) $(AR_FLAGS) rts/libgnat$(arext) \
>   	   $(addprefix rts/,$(GNATRTL_NONTASKING_OBJS) $(LIBGNAT_OBJS))
>   
>   This is not true, some of the *.o files are not built because of the
>   use of VPATH in ada/Makefile.adalib.
>
> Makefile.adalib is not used for building the library in a normal build.

Yes, you're right of course, but the problem seems to exist anyway,
and I think it is indeed related to the use if VPATH (Makefile[.in]
uses it, too).

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Ada: VPATH in ada/Makefile.adalib
  2001-10-05  9:18 ` Geert Bosch
  2001-10-05  9:28   ` Laurent Guerby
  2001-10-05 10:09   ` Florian Weimer
@ 2001-10-06  2:13   ` Florian Weimer
  2 siblings, 0 replies; 5+ messages in thread
From: Florian Weimer @ 2001-10-06  2:13 UTC (permalink / raw)
  To: Geert Bosch; +Cc: gcc

Geert Bosch <bosch@gnat.com> writes:

> On Fri, 5 Oct 2001, Florian Weimer wrote:
>
>   After some tweaking, I've been able to build the GNAT run-time
>   library. However, the build process now stops because ada/Makefile
>   assumes that the ada/rts/ subdirectory contains all *.o files:
>   
>   	$(AR) $(AR_FLAGS) rts/libgnat$(arext) \
>   	   $(addprefix rts/,$(GNATRTL_NONTASKING_OBJS) $(LIBGNAT_OBJS))
>   
>   This is not true, some of the *.o files are not built because of the
>   use of VPATH in ada/Makefile.adalib.
>
> Makefile.adalib is not used for building the library in a normal build.

Okay, I now seem to understand what is going on.  I've got the source
in ~/src-cvs/gnu/gcc/, and a build directory ~/src-cvs/gnu/gcc/BUILD/
in the source tree.  Usually (i.e. for other targets), this works
well, however ~/src-cvs/gnu/gcc/BUILD/Makefile contains a VPATH
setting:

        VPATH = ../../../gcc/ada

During the compiler build process, this refers to the directory
~/src-cvs/gcc/gcc/ada/, but when make invokes itself recursively in
the directory ~/src-cvs/gnu/gcc/BUILD/gcc/ada/rts/, the VPATH forces
make to in ~/src-cvs/gnu/gcc/BUILD/gcc/ada/, where it finds some
already existing object files. :-/

Oh dear, I've just noticed that this kind of setup is officially
unsupported.  Oh well.

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2001-10-06  2:13 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-10-05  8:55 Ada: VPATH in ada/Makefile.adalib Florian Weimer
2001-10-05  9:18 ` Geert Bosch
2001-10-05  9:28   ` Laurent Guerby
2001-10-05 10:09   ` Florian Weimer
2001-10-06  2:13   ` Florian Weimer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).