This is the mail archive of the cgen@sources.redhat.com mailing list for the CGEN project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Exact sequences for running cgen


On Fri, Jun 13, 2003 at 11:15:52AM -0700, Doug Evans wrote:
> Michael Meissner writes:
>  > Ok, I must be doing something wrong.  Could somebody give me an exact
>  > walk-through of how to set up the cgen environment.  I have tried using the cvs
>  > sources, and the snapshot.  I have tried building cgen in place, as well as my
>  > usual preference of building it in a separate build directory.  The last time I
>  > asked this question, I was told just run the make in place, but neither the
>  > snapshot nor the cvs sources have a Makefile.  I have tried using a Red Hat 8.0
>  > system, as well as Red Hat 9 (using a 1.4.3 guile compiled since
>  > 
>  > Here is one attempt:
>  > 
>  > 	$ tar -xvjf snapshot-20030607.tar.bz2
>  > 	$ cd cgen/cgen
>  > 	$ ./configure --target=m32r-unknown-elf
>  > 	$ make desc
>  > 
>  > At this point it runs, but if you look at the tmp-desc.h and tmp-desc.c files,
>  > you see that it has not substituted M32R for @ARCH@ and m32r for @arch@ as I
>  > would expect.  See the attachments for the tmp-desc.h and tmp-desc.c files.
> 
> The tmp-desc.[ch] files get subsequently fed through sed to s/@ARCH@/FOO/
> and this happens when you run the generators from the opcodes directory.
> "Final" versions of the generated files are always built from the
> application dir (pedantic: except html since there is no app. dir).
> The rules in cgen/Makefile exist just so one can generate something
> and have a gander at them to see if they look correct.
> 
> In normal production work, one configures with --enable-cgen-maint,
> and builds in the opcodes directory and lets the dependencies
> in opcodes/Makefile regenerate the files whenever the .cpu file changes.
> Ditto for sim, sid, etc.
> 
> So, exact walk-through:
> 
> 1) mkdir obj
> 2) cd obj
> 3) /path/to/binutils+cgen/configure --target=m32r-elf --enable-cgen-maint
> 4) touch /path/to/binutils+cgen/cgen/cpu/m32r.cpu # ensure files get rebuilt
> 5) cd opcodes
> 6) make stamp-m32r

Thanks, thats a help.  I guess I missed it on the first read-through of the
manual.

-- 
Michael Meissner
email: gnu@the-meissners.org
http://www.the-meissners.org


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]