Rtems Rebuild Remake Question

Bill Butler billb at tnex.com
Thu Mar 7 15:53:49 UTC 2002


Joel,

If you notice I am using the mcf5206Elite EXACTLY as it comes in patch
2-15-2002. I just mentioned Fiddes not to take credit for his stuff..
but this is failing on the mcf5206elite BSP. The example that I showed
was only the Elite stuff. Also I am using makefile.am and automake for
both. Automake seems to work find.. I just am missing the piece that
takes the product of the Makefile.am (makefile.in) and moves it to the
build directory :(.

BTW: I am trying to talk my company into sending me to the class :) 

Bill Butler
AIPCom Inc
972-644-2328 x16
bbill at tnex.com
 

-----Original Message-----
From: Joel Sherrill [mailto:joel.sherrill at oarcorp.com] 
Sent: Thursday, March 07, 2002 6:30 AM
To: Bill Butler
Cc: 'Ralf Corsepius'; 'Ian Caddy'; 'RTEMS Users'
Subject: Re: Rtems Rebuild Remake Question



Bill Butler wrote:
> 
> Ha!.. you just thought I went away!
> 
> Well I tried what you guys suggest and it works real neat except for
one
> thing.. it does not work! (disclaimer: for me)
> 
> I'm sure the BSP I'm using is not updated so  I need some help of
where
> to look to fix it or someway to convert a Makefile.in to a Makefile
for
> now.
> 
> Here is what I'm doing.
> 
> I have built 2 BSP for the m68k one I modified from Fiddles (sbc5307)
> and one from RTEMS (mcf5206elite).

I suspect that what you are running into is that David Fiddes' BSP is
based upon an old RTEMS version which is before we began using automake.
You will need to switch to Makefile.am's in order to merge into the 
current BSP.  I suggest using the Makefile.am's from the mcf5206elite
and modifying them to match the files in the sbc5307.  bootstrap is
trying to generate Makefile.am's from Makefile.in's at development
time.  configure generates Makefile's from Makefile.in's at build time.

[NOTE: This is actually covered much better in the class than in the
written documentation.]

> Specific problem is once I modify the Makefile.am file and run
bootstrap
> it DOES create the Makefile.in file. I run "../configure ..." and then
> "make all" but neither the configure or the make copies over the
updated
> makefile to the build directories.
> 
> Here is a simple example. Note: I'm under cygwin so the directory
> structure is a little different that suggested in Docs.
> 
>
>>/opt/tools/rtems-ss-20020215/c/src/lib/libbsp/m68k/mcf5206elite/start
> 
> $ touch Makefile.am
> 
> $ ls -l  (makefile.am newer than makefile.in)
> 
> $ ../../../../../../bootstrap
> 
> $ ls -l (makefile.in newer than makefile.am which is newer than
Makefile
> in build directory)
> 
> $cd  /opt/tools/build
> 
> >> /opt/tools/build
> 
> $ ../rtems-ss-20020215/configure --target=m68k-rtems --enable
> rtemsbsp="mcf5206elite sbc5307" --prefix=/opt/m68k_rtems
> 
> $cd
>
/opt/tools/build/m68k-rtems/c/mcf5206elite/lib/libbsp/m68k/mcf5206elite/
> start
> 
>
>>/opt/tools/build/m68k-rtems/c/mcf5206elite/lib/libbsp/m68k/mcf5206elit
> e/start
> 
> $ls -l (same old Makefile)
> 
> $cd  /opt/tools/build
> 
> $ make all
> 
> $cd
>
/opt/tools/build/m68k-rtems/c/mcf5206elite/lib/libbsp/m68k/mcf5206elite/
> start
> 
> $ ls -l (same old makefile)...
> 
> $format c: (good thing this is cygwin)
> 
> I guess my question is what tells configure to copy files over when
they
> are out of date or missing? I'm guessing it something I configure in
the
> BSP directory so I will go nose around there.
> 
> Thanks for you help.
> 
> Bill Butler
> AIPCom Inc
> 972-644-2328 x16
> bbill at tnex.com
> 
> 
> -----Original Message-----
> From: Ralf Corsepius [mailto:corsepiu at faw.uni-ulm.de]
> Sent: Monday, February 25, 2002 10:52 PM
> To: Ian Caddy
> Cc: Bill Butler; RTEMS Users
> Subject: Re: Rtems Rebuild Remake Question
> 
> Am Die, 2002-02-26 um 03.18 schrieb Ian Caddy:
> > Hi Bill,
> >
> > The trick here is to use a script file called bootstrap.
> >
> > When you change the makefile of any part of your BSP, you will need
to
> run
> > the bootstrap command from the root source directory.
> >
> > In our system this is:
> >
> > /rtems-4.5.0
> >
> > now from this directory run:
> >
> > ./bootstrap
> >
> > This will walk its way through the RTEMS tree rebuilding your
> makefile.am to
> > makefile.in
> Try adding --enable-maintainer-mode to your configure-options, then
all
> this is supposed to happen automatically.
> Eg. if having edited your <BSP>/Makefile.am (Adding/deleting files)
> cd build/<...>/<BSP>
> make
> will rebuild Makefile.in etc.
> 
> [There exist some broken BSPs where this doesn't work.]
> 
> Furthermore, it is sufficient to run bootstrap from the directory
which
> contains the configure.ac/in which is responsibile for the file you
have
> edited.
> Eg.
> [Editing [...]/<BSP>/driver/Makefile.am
> cd [...]/<BSP>
> <rtems-rootdir>/bootstrap
> 
> > Once this has completed, (actually, once it goes past our BSP, we
stop
> the
> > process), you will then need to do another configure in your base
> build
> > directory.
> Try adding --enable-maintainer-mode.
> 
> Then in most cases, running "make" is sufficient. If it doesn't work,
> (General exceptions are BSPs containing "tools" - A known general bug
in
> RTEMS configury - and adding directories - A known general limitation
of
> the auto*tools), running bootstrap from the directory with the
> configure.ac related to the edited Makefile.am should be safe.
> 
> Ralf

-- 
Joel Sherrill, Ph.D.             Director of Research & Development
joel at OARcorp.com                 On-Line Applications Research
Ask me about RTEMS: a free RTOS  Huntsville AL 35805
   Support Available             (256) 722-9985





More information about the users mailing list