bootstrap: Do not generate acinlude.m4 files

Do not generate files which are part of the Git repository.  These files
should be maintained manually in the future.

This patch is a part of the BSP source reorganization.

Update #3285.
This commit is contained in:
Sebastian Huber 2018-04-23 07:42:47 +02:00
parent 50593d4406
commit 1645debc4f

View File

@ -34,14 +34,6 @@ import options
import path import path
import version import version
def _collect_dirs(path_, dir):
confs = []
for root, dirs, files in os.walk(path.host(path_), topdown = True):
for f in dirs:
if f == dir:
confs += [path.shell(path.join(root, f))]
return confs
def _collect(path_, file): def _collect(path_, file):
confs = [] confs = []
for root, dirs, files in os.walk(path.host(path_), topdown = True): for root, dirs, files in os.walk(path.host(path_), topdown = True):
@ -132,33 +124,9 @@ class autoreconf:
self.topdir = topdir self.topdir = topdir
self.configure = configure self.configure = configure
self.cwd = path.dirname(self.configure) self.cwd = path.dirname(self.configure)
self.bspopts()
self.command = command(['autoreconf', '-i', '--no-recursive'], self.cwd) self.command = command(['autoreconf', '-i', '--no-recursive'], self.cwd)
self.command.run() self.command.run()
def bspopts(self):
if _grep(self.configure, 'RTEMS_CHECK_BSPDIR'):
bsps = _collect_dirs(self.cwd, 'custom')
try:
acinclude = path.join(self.cwd, 'acinclude.m4')
b = open(path.host(acinclude), 'w')
b.write('# RTEMS_CHECK_BSPDIR(RTEMS_BSP_FAMILY)' + os.linesep)
b.write('AC_DEFUN([RTEMS_CHECK_BSPDIR],' + os.linesep)
b.write('[' + os.linesep)
b.write(' case "$1" in' + os.linesep)
for bs in sorted(bsps):
dir = path.dirname(bs)[len(self.cwd) + 1:]
dir = path.dirname(dir)
b.write(' %s )%s' % (dir, os.linesep))
b.write(' AC_CONFIG_SUBDIRS([%s]);;%s' % (dir, os.linesep))
b.write(' *)' + os.linesep)
b.write(' AC_MSG_ERROR([Invalid BSP]);;' + os.linesep)
b.write(' esac' + os.linesep)
b.write('])' + os.linesep)
b.close()
except IOError as err:
raise error.general('writing: %s' % (acinclude))
def is_alive(self): def is_alive(self):
return self.command.is_alive() return self.command.is_alive()