mirror of
https://github.com/cahirwpz/amigaos-cross-toolchain
synced 2026-09-11 19:59:18 +00:00
Some random fixes.
This commit is contained in:
@@ -173,7 +173,7 @@ def mkdir(*names):
|
|||||||
@fill_in_args
|
@fill_in_args
|
||||||
def copy(src, dst):
|
def copy(src, dst):
|
||||||
debug('copy "%s" to "%s"', topdir(src), topdir(dst))
|
debug('copy "%s" to "%s"', topdir(src), topdir(dst))
|
||||||
shutil.copy(src, dst)
|
shutil.copy2(src, dst)
|
||||||
|
|
||||||
|
|
||||||
@fill_in_args
|
@fill_in_args
|
||||||
@@ -183,10 +183,11 @@ def copytree(src, dst, **kwargs):
|
|||||||
mkdir(dst)
|
mkdir(dst)
|
||||||
|
|
||||||
for name in find(src, **kwargs):
|
for name in find(src, **kwargs):
|
||||||
|
target = path.join(dst, path.relpath(name, src))
|
||||||
if path.isdir(name):
|
if path.isdir(name):
|
||||||
mkdir(path.join(dst, path.relpath(name, src)))
|
mkdir(target)
|
||||||
else:
|
else:
|
||||||
copy(name, path.join(dst, path.relpath(name, src)))
|
copy(name, target)
|
||||||
|
|
||||||
|
|
||||||
@fill_in_args
|
@fill_in_args
|
||||||
@@ -383,12 +384,15 @@ def patch(name, work_dir='{sources}'):
|
|||||||
def configure(name, *confopts, **kwargs):
|
def configure(name, *confopts, **kwargs):
|
||||||
info('configuring "%s"', name)
|
info('configuring "%s"', name)
|
||||||
|
|
||||||
|
if 'from_dir' in kwargs:
|
||||||
|
from_dir = kwargs['from_dir']
|
||||||
|
else:
|
||||||
|
from_dir = path.join('{sources}', name)
|
||||||
|
|
||||||
if kwargs.get('copy_source', False):
|
if kwargs.get('copy_source', False):
|
||||||
rmtree(path.join('{build}', name))
|
rmtree(path.join('{build}', name))
|
||||||
copytree(path.join('{sources}', name), path.join('{build}', name))
|
copytree(path.join('{sources}', name), path.join('{build}', name))
|
||||||
from_dir = '.'
|
from_dir = '.'
|
||||||
else:
|
|
||||||
from_dir = path.join('{sources}', name)
|
|
||||||
|
|
||||||
with cwd(path.join('{build}', name)):
|
with cwd(path.join('{build}', name)):
|
||||||
remove(find('.', include=['config.cache']))
|
remove(find('.', include=['config.cache']))
|
||||||
|
|||||||
+21
-20
@@ -2,8 +2,6 @@
|
|||||||
|
|
||||||
# Build development cross toolchain for m68k-elf target.
|
# Build development cross toolchain for m68k-elf target.
|
||||||
|
|
||||||
from glob import glob
|
|
||||||
from logging import info
|
|
||||||
from os import environ
|
from os import environ
|
||||||
import argparse
|
import argparse
|
||||||
import logging
|
import logging
|
||||||
@@ -98,29 +96,31 @@ def make():
|
|||||||
build('{cloog}')
|
build('{cloog}')
|
||||||
install('{cloog}')
|
install('{cloog}')
|
||||||
|
|
||||||
unpack('binutils')
|
with env(CFLAGS='-Wno-error'):
|
||||||
configure('binutils',
|
configure('binutils',
|
||||||
'--prefix={target}',
|
'--prefix={target}',
|
||||||
'--target=m68k-elf')
|
'--with-isl={host}',
|
||||||
build('binutils')
|
'--target=m68k-elf',
|
||||||
install('binutils')
|
from_dir='{archives}/binutils')
|
||||||
|
build('binutils')
|
||||||
|
install('binutils')
|
||||||
|
|
||||||
unpack('gcc')
|
configure('gcc',
|
||||||
configure('gcc',
|
'--target=m68k-elf',
|
||||||
'--target=m68k-elf',
|
'--with-gmp={host}',
|
||||||
'--with-gmp={host}',
|
'--with-mpfr={host}',
|
||||||
'--with-mpfr={host}',
|
'--with-isl={host}',
|
||||||
'--with-cloog={host}',
|
'--with-cloog={host}',
|
||||||
'--prefix={target}',
|
'--prefix={target}',
|
||||||
'--enable-languages=c',
|
'--enable-languages=c',
|
||||||
'--without-headers')
|
'--without-headers',
|
||||||
build('gcc', 'all-gcc')
|
from_dir='{archives}/gcc')
|
||||||
install('gcc', 'install-gcc')
|
build('gcc', 'all-gcc')
|
||||||
|
install('gcc', 'install-gcc')
|
||||||
|
|
||||||
|
|
||||||
def clean():
|
def clean():
|
||||||
rmtree('{stamps}')
|
rmtree('{stamps}')
|
||||||
rmtree('{sources}')
|
|
||||||
rmtree('{host}')
|
rmtree('{host}')
|
||||||
rmtree('{build}')
|
rmtree('{build}')
|
||||||
|
|
||||||
@@ -154,6 +154,7 @@ if __name__ == "__main__":
|
|||||||
build=path.join('{top}', '.build-dev', 'build'),
|
build=path.join('{top}', '.build-dev', 'build'),
|
||||||
sources=path.join('{top}', '.build-dev', 'sources'),
|
sources=path.join('{top}', '.build-dev', 'sources'),
|
||||||
host=path.join('{top}', '.build-dev', 'host'),
|
host=path.join('{top}', '.build-dev', 'host'),
|
||||||
|
tmpdir=path.join('{top}', '.build-dev', 'tmp'),
|
||||||
target=path.join('{top}', 'm68k-elf'),
|
target=path.join('{top}', 'm68k-elf'),
|
||||||
archives=path.join('{top}', '.build-dev', 'archives'))
|
archives=path.join('{top}', '.build-dev', 'archives'))
|
||||||
|
|
||||||
|
|||||||
@@ -197,8 +197,6 @@ def make():
|
|||||||
environ['CXX'] = ' '.join([find_executable(CXX), '-std=gnu++98', ARCH])
|
environ['CXX'] = ' '.join([find_executable(CXX), '-std=gnu++98', ARCH])
|
||||||
|
|
||||||
find_executable('patch')
|
find_executable('patch')
|
||||||
find_executable('bison')
|
|
||||||
find_executable('flex')
|
|
||||||
find_executable('make')
|
find_executable('make')
|
||||||
find_executable('git')
|
find_executable('git')
|
||||||
find_executable('svn')
|
find_executable('svn')
|
||||||
|
|||||||
+6
-2
@@ -70,9 +70,11 @@ def make():
|
|||||||
environ['CC'] = find_executable(cc)
|
environ['CC'] = find_executable(cc)
|
||||||
environ['CXX'] = find_executable(cxx)
|
environ['CXX'] = find_executable(cxx)
|
||||||
|
|
||||||
|
find_executable('patch')
|
||||||
find_executable('bison')
|
find_executable('bison')
|
||||||
find_executable('flex')
|
find_executable('flex')
|
||||||
find_executable('make')
|
find_executable('make')
|
||||||
|
find_executable('git')
|
||||||
find_executable('svn')
|
find_executable('svn')
|
||||||
|
|
||||||
environ['PATH'] = ":".join([path.join('{target}', 'bin'),
|
environ['PATH'] = ":".join([path.join('{target}', 'bin'),
|
||||||
@@ -87,10 +89,11 @@ def make():
|
|||||||
name = path.basename(url)
|
name = path.basename(url)
|
||||||
fetch(name, url)
|
fetch(name, url)
|
||||||
|
|
||||||
unpack('{lha}', copy=path.join('{build}', '{lha}'))
|
unpack('{lha}')
|
||||||
configure('{lha}',
|
configure('{lha}',
|
||||||
'--disable-shared',
|
'--disable-shared',
|
||||||
'--prefix={host}')
|
'--prefix={host}',
|
||||||
|
copy_source=True)
|
||||||
build('{lha}')
|
build('{lha}')
|
||||||
install('{lha}')
|
install('{lha}')
|
||||||
|
|
||||||
@@ -229,6 +232,7 @@ if __name__ == "__main__":
|
|||||||
build=path.join('{top}', '.build-ppc', 'build'),
|
build=path.join('{top}', '.build-ppc', 'build'),
|
||||||
sources=path.join('{top}', '.build-ppc', 'sources'),
|
sources=path.join('{top}', '.build-ppc', 'sources'),
|
||||||
host=path.join('{top}', '.build-ppc', 'host'),
|
host=path.join('{top}', '.build-ppc', 'host'),
|
||||||
|
tmpdir=path.join('{top}', '.build-ppc', 'tmpdir'),
|
||||||
target=path.join('{top}', 'ppc-amigaos'),
|
target=path.join('{top}', 'ppc-amigaos'),
|
||||||
archives=path.join('{top}', '.build-ppc', 'archives'))
|
archives=path.join('{top}', '.build-ppc', 'archives'))
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user