summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--aclocal/canonical-target-name.m435
-rw-r--r--c/src/exec/score/include/rtems/score/Makefile.in18
-rw-r--r--c/src/make/host.cfg.in2
-rw-r--r--configure.in39
-rw-r--r--make/custom/p4000.cfg2
-rw-r--r--make/host.cfg.in2
6 files changed, 58 insertions, 40 deletions
diff --git a/aclocal/canonical-target-name.m4 b/aclocal/canonical-target-name.m4
index 7fbfa599c1..8a12973436 100644
--- a/aclocal/canonical-target-name.m4
+++ b/aclocal/canonical-target-name.m4
@@ -2,16 +2,41 @@ dnl
dnl $Id$
dnl
-dnl canonicalize target name
+dnl canonicalize target cpu
dnl NOTE: Most rtems targets do not fullfil autoconf's
dnl target naming conventions "processor-vendor-os"
dnl Therefore autoconf's AC_CANONICAL_TARGET will fail for them
dnl and we have to fix it for rtems ourselves
AC_DEFUN(RTEMS_CANONICAL_TARGET_CPU,
-[AC_MSG_CHECKING(rtems target cpu)
-changequote(<<, >>)dnl
-target_cpu=`echo $target | sed 's%^\([^-]*\)-\(.*\)$%\1%'`
-changequote([, ])dnl
+[
+AC_REQUIRE([AC_CANONICAL_SYSTEM])
+AC_MSG_CHECKING(rtems target cpu)
+changequote(,)dnl
+case "${target}" in
+ # hpux unix port should go here
+ i[3456]86-go32-rtems*)
+ target_cpu=i386
+ ;;
+ i[3456]86-pc-linux*) # unix "simulator" port
+ target_cpu=unix
+ ;;
+ i[3456]86-*freebsd2*) # unix "simulator" port
+ target_cpu=unix
+ ;;
+ no_cpu-*rtems*)
+ target_cpu=no_cpu
+ ;;
+ ppc*-*rtems*)
+ target_cpu=powerpc
+ ;;
+ sparc-sun-solaris*) # unix "simulator" port
+ target_cpu=unix
+ ;;
+ *)
+ target_cpu=`echo $target | sed 's%^\([^-]*\)-\(.*\)$%\1%'`
+ ;;
+esac
+changequote([,])dnl
AC_MSG_RESULT($target_cpu)
])
diff --git a/c/src/exec/score/include/rtems/score/Makefile.in b/c/src/exec/score/include/rtems/score/Makefile.in
index 4ebe840a62..6aac86d9be 100644
--- a/c/src/exec/score/include/rtems/score/Makefile.in
+++ b/c/src/exec/score/include/rtems/score/Makefile.in
@@ -19,9 +19,15 @@ H_PIECES= address apiext bitfield chain context copyrt coremsg coremutex \
coresem heap interr isr object \
priority stack states sysstate thread threadq \
tod tqdata userext watchdog wkspace
-H_FILES=$(H_PIECES:%=$(srcdir)/%.h) targopts.h
-SRCS=$(H_FILES)
+# Use this if compilation in location will be supported
+# H_FILES=$(H_PIECES:%=$(srcdir)/%.h) targopts.h
+
+# FIXME: Work-around
+H_FILES=$(H_PIECES:%=$(srcdir)/%.h)
+TARGOPTS=$(PROJECT_INCLUDE)/rtems/score/targopts.h
+
+SRCS=$(H_FILES) $(TARGOPTS)
include $(RTEMS_ROOT)/make/custom/$(RTEMS_BSP).cfg
include $(RTEMS_ROOT)/make/leaf.cfg
@@ -33,7 +39,7 @@ include $(RTEMS_ROOT)/make/leaf.cfg
# 'make clobber' already includes 'make clean'
#
-CLEAN_ADDITIONS += targopts.h
+CLEAN_ADDITIONS += $(TARGOPTS)
CLOBBER_ADDITIONS +=
# Until RTEMS_CPU is removed from all the make configuration files,
@@ -46,7 +52,7 @@ CLOBBER_ADDITIONS +=
RTEMS_CPU_DEFINED=$(subst .,_,$(RTEMS_CPU))
# make the target dependent options file
-targopts.h:
+$(TARGOPTS):
@echo "/* target board dependent options file */" >$@
@echo "/* automatically generated -- DO NOT EDIT!! */" >>$@
@echo >>$@
@@ -86,7 +92,7 @@ ifeq ($(RTEMS_USE_NEWLIB),yes)
endif
@echo >>$@
@echo "#endif" >>$@
-
+ @chmod 755 $@
all: $(SRCS)
- $(INSTALL_CHANGE) -m 444 ${H_FILES} $(PROJECT_INCLUDE)/rtems/score
+ $(INSTALL_DATA) ${H_FILES} $(PROJECT_INCLUDE)/rtems/score
diff --git a/c/src/make/host.cfg.in b/c/src/make/host.cfg.in
index 6e54bcb05a..4814b2169d 100644
--- a/c/src/make/host.cfg.in
+++ b/c/src/make/host.cfg.in
@@ -75,3 +75,5 @@ INSTDATAFLAGS = -m 0644
INSTLIBFLAGS = -m 0644
INSTDIRFLAGS = -m 0755 -d
INSTINCFLAGS = -m 0644
+
+INSTALL_DATA = $(INSTALL) $(INSTDATAFLAGS)
diff --git a/configure.in b/configure.in
index e50744569d..d4c3d7ff5c 100644
--- a/configure.in
+++ b/configure.in
@@ -111,13 +111,7 @@ AC_PROG_LN_S
AC_PATH_PROG(CHMOD,chmod)
AC_PATH_PROG(SORT,sort)
AC_PROG_INSTALL
-AC_PATH_PROG(PERL,perl)
-if test -z "$PERL" ; then
-AC_MSG_WARN(
-[***]
-[ perl was not found]
-[ Note: Some tools will not be built.])
-fi
+RTEMS_PATH_PERL
dnl check mkdir behaviour, try to get mkdir -p -m 0755
RTEMS_PATH_MKDIR
@@ -132,16 +126,7 @@ AC_PATH_PROG(CMP,cmp)
AC_PATH_PROG(SED,sed)
AC_PATH_PROGS(M4,gm4 m4)
-dnl NOTE: prefer bash over ksh over sh
-AC_PATH_PROGS(KSH,bash ksh sh)
-
-if test -z "$KSH"; then
-dnl NOTE: This cannot happen -- /bin/sh must always exist
-AC_MSG_ERROR(
-[***]
-[ Cannot determine a usable shell bash/ksh/sh]
-[ Please contact your system administrator] );
-fi
+RTEMS_PATH_KSH
dnl BEGIN configure.target.in
@@ -163,43 +148,39 @@ dnl a BSP library would be used to link an application.
RTEMS_HOST=$host_os
+RTEMS_CANONICAL_TARGET_CPU
+
+changequote(,)dnl
case "${target}" in
# hpux unix port should go here
- i[[3456]]86-go32-rtems*)
- target_cpu=i386
+ i[3456]86-go32-rtems*)
rtems_bsp="go32 go32_p5"
skip_startfiles="yes"
RTEMS_HAS_POSIX_API=no
;;
- i[[3456]]86-pc-linux*) # unix "simulator" port
- target_cpu=unix
+ i[3456]86-pc-linux*) # unix "simulator" port
RTEMS_HOST=Linux
# override these settings
RTEMS_HAS_POSIX_API=no
;;
- i[[3456]]86-*freebsd2*) # unix "simulator" port
- target_cpu=unix
+ i[3456]86-*freebsd2*) # unix "simulator" port
RTEMS_HOST=FreeBSD
# override these settings
RTEMS_HAS_POSIX_API=no
;;
no_cpu-*rtems*)
- target_cpu=no_cpu
RTEMS_HAS_POSIX_API=no
;;
- ppc*-*rtems*)
- target_cpu=powerpc
- ;;
sparc-sun-solaris*) # unix "simulator" port
- target_cpu=unix
RTEMS_HOST=Solaris
# override these settings
RTEMS_HAS_POSIX_API=no
;;
*)
- RTEMS_CANONICAL_TARGET_CPU
;;
esac
+changequote([,])dnl
+
# Override the set of BSPs to be built.
AC_ARG_ENABLE(rtemsbsp, \
diff --git a/make/custom/p4000.cfg b/make/custom/p4000.cfg
index bb187c6577..8776cf0418 100644
--- a/make/custom/p4000.cfg
+++ b/make/custom/p4000.cfg
@@ -4,6 +4,8 @@
# $Id$
#
+# NOTE: this file is broken !
+
# Override default start file
START_BASE=idt_csu
diff --git a/make/host.cfg.in b/make/host.cfg.in
index 6e54bcb05a..4814b2169d 100644
--- a/make/host.cfg.in
+++ b/make/host.cfg.in
@@ -75,3 +75,5 @@ INSTDATAFLAGS = -m 0644
INSTLIBFLAGS = -m 0644
INSTDIRFLAGS = -m 0755 -d
INSTINCFLAGS = -m 0644
+
+INSTALL_DATA = $(INSTALL) $(INSTDATAFLAGS)