Commit 006a4166 authored by Benoit Perrot's avatar Benoit Perrot
Browse files

Generate src/inst/Makefile.am at bootstrap.

parent 0a60f905
2003-07-07 Benot Perrot <benoit@lrde.epita.fr>
* bootstrap, dev/mipsy-mk-inst-gen.py:
Generate src/inst/Makefile.am at bootstrap.
2003-07-07 Benot Perrot <benoit@lrde.epita.fr>
* src/task/task.hh: Remove useless ";" at end of macro definitions.
......
#!/bin/sh
./dev/mipsy-mk-inst-gen.py < ./dev/mipsy.xml > ./src/inst/Makefile.am
autoreconf -fvim
#!/usr/bin/env python
##
## This file is part of Mipsy, a tiny MIPS simulator
## Copyright (C) 2003 Benoit Perrot <benoit@lrde.epita.fr>
##
## Mipsy is free software; you can redistribute it and/or modify
## it under the terms of the GNU General Public License as published by
## the Free Software Foundation; either version 2 of the License, or
## (at your option) any later version.
##
## Mipsy is distributed in the hope that it will be useful,
## but WITHOUT ANY WARRANTY; without even the implied warranty of
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
## GNU General Public License for more details.
##
## You should have received a copy of the GNU General Public License
## along with this program; if not, write to the Free Software
## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
##
import sys
import string, re
import mipsy
from mipsy import license, depth, define_id, class_id
#### Mipsy Makefile.am of inst/ generator --------------------------
parser = mipsy.InstructionSetParser()
instructions = parser.parse(sys.stdin)
print """INCLUDES = -I $(top_srcdir)/src -I $(top_builddir)/src
FROM_MIPSY_INST_GEN_PY = \\"""
for i in range(0, len(instructions)):
if instructions[i].level == "native":
print "\t" + instructions[i].opcode + ".hh\t\t\t\t\\"
print """ decl.hh \\
all.hh \\
visitor.hh"""
print """
BUILT_SOURCES = $(FROM_MIPSY_INST_GEN_PY) program_builder.hh
$(FROM_MIPSY_INST_GEN_PY): $(top_srcdir)/dev/mipsy-inst-gen.py $(top_srcdir)/dev/mipsy.xml
$(top_srcdir)/dev/mipsy-inst-gen.py < $(top_srcdir)/dev/mipsy.xml
program_builder.hh: $(top_srcdir)/dev/mipsy-builder-gen.py $(top_srcdir)/dev/mipsy.xml
$(top_srcdir)/dev/mipsy-builder-gen.py < $(top_srcdir)/dev/mipsy.xml \
> $@
MAINTAINERCLEANFILES = $(FROM_MIPSY_INST_GEN_PY) program_builder.hh"""
print """
noinst_LIBRARIES = libinst.a
libinst_a_SOURCES = \\
$(FROM_MIPSY_INST_GEN_PY) \\
register.hh \\
exp.hh \\
exp-visitor.hh \\
inst.hh \\
program.hh \\
label.hh label.cc \\
text_section.hh \\
data_section.hh \\
program.hh \\
program_builder.hh program_builder.cc \\
program_solver.hh \\
inst-tasks.hh inst-tasks.cc"""
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment