Changeset 35d7b15 in rtems for c/src/lib/libcpu/i386


Ignore:
Timestamp:
Dec 21, 1999, 2:41:43 PM (21 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10, 4.11, 4.8, 4.9, 5, master
Children:
369ef18
Parents:
5bce35b
Message:

Patch rtems-rc-19991203-7.diff from Ralf Corsepius <corsepiu@…>
which adds partial automake support to libcpu/<cpu>/*.

Until now I have only implemented full automake support for the sh (my
demonstration example :) and the i386 (inevitiable for structural
reasons of this subdirectory). For all other cpus only their toplevel
directories (exception: powerpc), include subdirectories and a few
selected subdirectories have been converted to automake.
I did this on purpose, because add automake support to each subdirectory
requires individual adaptations which to be tested individually.

Additionally the weirdnesses of the powerpc subdirectories hit again,
esp. some powerpc cpu-models

  • install files to $(PROJECT_INCLUDE)/<cpu-model>/ while others install them to $(PROJECT_INCLUDE)/
  • the scheme used to configure libcpu/powerpc/ is difficult to implement using automake, therefore this subdirectory still is configured by autoconf (The one out of an unlimited set selection scheme hits again :), though powerpc/*/* subdirectories already apply automake.

The patch also reveils structural weaknesses in RTEMS:

E.g. There seem to exist at least 5 different general schemes:

  • Not using libcpu at all (eg. i960)
  • Strictly tree-style a libcpu/<cpu-variant>/* (eg. m68k, sh)
  • Flat libcpu directory layout with cpu-variants merged into sources or not destinguishing cpu-variants (i386)
  • Not supporting variants with deep source tree (sparc, hppa, mips64orion)
  • Woven directory structure with shared directories (powerpc)

I regret having to say this, but from my POV this means, that there
doesn't exist a general implementation scheme for libcpu at all.

To apply:

rm -rf ./c/src/lib/libcpu/i386/wrapup
rm -rf ./c/src/lib/libcpu/mips64orion/include
rm -rf ./c/src/lib/libcpu/powerpc/ppc403/include
patch -p1 < rtems-rc-19991203-7.diff
./bootstrap

File:
1 edited

Legend:

Unmodified
Added
Removed
  • c/src/lib/libcpu/i386/Makefile.in

    r5bce35b r35d7b15  
    1 #
    2 #  $Id$
    3 #
    4 
    5 @SET_MAKE@
     1# Makefile.in generated automatically by automake 1.4a from Makefile.am
     2
     3# Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
     4# This Makefile.in is free software; the Free Software Foundation
     5# gives unlimited permission to copy and/or distribute it,
     6# with or without modifications, as long as this notice is preserved.
     7
     8# This program is distributed in the hope that it will be useful,
     9# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
     10# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
     11# PARTICULAR PURPOSE.
     12
     13
     14
     15
     16SHELL = @SHELL@
     17
    618srcdir = @srcdir@
    719top_srcdir = @top_srcdir@
    8 top_builddir = ..
    9 subdir = i386
    10 
     20VPATH = @srcdir@
     21prefix = @prefix@
     22exec_prefix = @exec_prefix@
     23
     24bindir = @bindir@
     25sbindir = @sbindir@
     26libexecdir = @libexecdir@
     27datadir = @datadir@
     28sysconfdir = @sysconfdir@
     29sharedstatedir = @sharedstatedir@
     30localstatedir = @localstatedir@
     31libdir = @libdir@
     32infodir = @infodir@
     33mandir = @mandir@
     34includedir = @includedir@
     35oldincludedir = /usr/include
     36
     37DESTDIR =
     38
     39pkgdatadir = $(datadir)/@PACKAGE@
     40pkglibdir = $(libdir)/@PACKAGE@
     41pkgincludedir = $(includedir)/@PACKAGE@
     42
     43top_builddir = .
     44
     45ACLOCAL = @ACLOCAL@
     46AUTOCONF = @AUTOCONF@
     47AUTOMAKE = @AUTOMAKE@
     48AUTOHEADER = @AUTOHEADER@
     49
     50INSTALL = @INSTALL@
     51INSTALL_PROGRAM = @INSTALL_PROGRAM@
     52INSTALL_DATA = @INSTALL_DATA@
     53INSTALL_SCRIPT = @INSTALL_SCRIPT@
     54INSTALL_STRIP_FLAG =
     55transform = @program_transform_name@
     56
     57NORMAL_INSTALL = :
     58PRE_INSTALL = :
     59POST_INSTALL = :
     60NORMAL_UNINSTALL = :
     61PRE_UNINSTALL = :
     62POST_UNINSTALL = :
     63build_alias = @build_alias@
     64build_triplet = @build@
     65host_alias = @host_alias@
     66host_triplet = @host@
     67target_alias = @target_alias@
     68target_triplet = @target@
     69CC = @CC@
     70CC_FOR_TARGET = @CC_FOR_TARGET@
     71CPP = @CPP@
     72GCCSED = @GCCSED@
     73INSTALL_CHANGE = @INSTALL_CHANGE@
     74MAINT = @MAINT@
     75MAKEINFO = @MAKEINFO@
     76PACKAGE = @PACKAGE@
     77PACKHEX = @PACKHEX@
     78PROJECT_INCLUDE = @PROJECT_INCLUDE@
     79PROJECT_RELEASE = @PROJECT_RELEASE@
     80PROJECT_ROOT = @PROJECT_ROOT@
     81RTEMS_BSP = @RTEMS_BSP@
     82RTEMS_BSP_FAMILY = @RTEMS_BSP_FAMILY@
     83RTEMS_CPU = @RTEMS_CPU@
     84RTEMS_CPU_MODEL = @RTEMS_CPU_MODEL@
     85RTEMS_HOST = @RTEMS_HOST@
     86RTEMS_LIBC_DIR = @RTEMS_LIBC_DIR@
    1187RTEMS_ROOT = @RTEMS_ROOT@
    12 PROJECT_ROOT = @PROJECT_ROOT@
    13 
    14 VPATH = @srcdir@
     88RTEMS_TOPdir = @RTEMS_TOPdir@
     89VERSION = @VERSION@
     90
     91AUTOMAKE_OPTIONS = foreign 1.4
     92ACLOCAL_AMFLAGS = -I $(RTEMS_TOPdir)/aclocal
     93
     94LIBNAME = libcpu
     95LIB = $(ARCH)/$(LIBNAME).a
    1596
    1697# C source names, if any, go here -- minus the .c
    17 C_PIECES = cpu displayCpu page
    18 C_FILES = $(C_PIECES:%=%.c)
    19 C_O_FILES = $(C_PIECES:%=${ARCH}/%.o)
    20 
    21 H_FILES = $(srcdir)/cpu.h $(srcdir)/registers.h $(srcdir)/cpuModel.h
     98C_FILES = cpu.c displayCpu.c page.c
     99C_O_FILES = $(C_FILES:%.c=${ARCH}/%.o)
     100
     101H_FILES = cpu.h registers.h cpuModel.h
     102noinst_HEADERS = $(H_FILES)
    22103
    23104# Assembly source names, if any, go here -- minus the .s
    24 S_PIECES = cpu_asm cpuModel
    25 S_FILES = $(S_PIECES:%=%.S)
     105S_FILES = cpu_asm.S cpuModel.S
    26106S_O_FILES = $(S_FILES:%.S=${ARCH}/%.o)
    27107
    28 SRCS = $(C_FILES) $(H_FILES)
    29108OBJS = $(C_O_FILES) $(S_O_FILES)
    30109
     110TMPINSTALL_FILES = $(PROJECT_RELEASE)/lib $(PROJECT_RELEASE)/lib/$(LIBNAME)$(LIB_VARIANT).a
     111
     112
     113PREINSTALL_FILES = $(PROJECT_INCLUDE)/libcpu     $(H_FILES:%=$(PROJECT_INCLUDE)/libcpu/%)
     114
     115
     116EXTRA_DIST = $(C_FILES) $(S_FILES)
     117ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
     118mkinstalldirs = $(SHELL) $(top_srcdir)/../../../../../mkinstalldirs
     119CONFIG_CLEAN_FILES =
     120HEADERS =  $(noinst_HEADERS)
     121
     122DIST_COMMON =  Makefile.am Makefile.in aclocal.m4 configure configure.in
     123
     124
     125DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
     126
     127TAR = gtar
     128GZIP_ENV = --best
     129all: all-redirect
     130.SUFFIXES:
     131$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) $(top_srcdir)/../../../../../automake/lib.am $(top_srcdir)/../../../../../automake/local.am
     132        cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile
     133
     134Makefile: $(srcdir)/Makefile.in  $(top_builddir)/config.status $(BUILT_SOURCES)
     135        cd $(top_builddir) \
     136          && CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status
     137
     138$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ configure.in
     139        cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
     140
     141config.status: $(srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
     142        $(SHELL) ./config.status --recheck
     143$(srcdir)/configure: @MAINTAINER_MODE_TRUE@$(srcdir)/configure.in $(ACLOCAL_M4) $(CONFIGURE_DEPENDENCIES)
     144        cd $(srcdir) && $(AUTOCONF)
     145
     146tags: TAGS
     147
     148ID: $(HEADERS) $(SOURCES) $(LISP)
     149        list='$(SOURCES) $(HEADERS)'; \
     150        unique=`for i in $$list; do echo $$i; done | \
     151          awk '    { files[$$0] = 1; } \
     152               END { for (i in files) print i; }'`; \
     153        here=`pwd` && cd $(srcdir) \
     154          && mkid -f$$here/ID $$unique $(LISP)
     155
     156TAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) $(LISP)
     157        tags=; \
     158        here=`pwd`; \
     159        list='$(SOURCES) $(HEADERS)'; \
     160        unique=`for i in $$list; do echo $$i; done | \
     161          awk '    { files[$$0] = 1; } \
     162               END { for (i in files) print i; }'`; \
     163        test -z "$(ETAGS_ARGS)$$unique$(LISP)$$tags" \
     164          || (cd $(srcdir) && etags $(ETAGS_ARGS) $$tags  $$unique $(LISP) -o $$here/TAGS)
     165
     166mostlyclean-tags:
     167
     168clean-tags:
     169
     170distclean-tags:
     171        -rm -f TAGS ID
     172
     173maintainer-clean-tags:
     174
     175distdir = $(PACKAGE)-$(VERSION)
     176top_distdir = $(distdir)
     177
     178# This target untars the dist file and tries a VPATH configuration.  Then
     179# it guarantees that the distribution is self-contained by making another
     180# tarfile.
     181distcheck: dist
     182        -rm -rf $(distdir)
     183        GZIP=$(GZIP_ENV) $(TAR) zxf $(distdir).tar.gz
     184        mkdir $(distdir)/=build
     185        mkdir $(distdir)/=inst
     186        dc_install_base=`cd $(distdir)/=inst && pwd`; \
     187        cd $(distdir)/=build \
     188          && ../configure --srcdir=.. --prefix=$$dc_install_base \
     189          && $(MAKE) $(AM_MAKEFLAGS) \
     190          && $(MAKE) $(AM_MAKEFLAGS) dvi \
     191          && $(MAKE) $(AM_MAKEFLAGS) check \
     192          && $(MAKE) $(AM_MAKEFLAGS) install \
     193          && $(MAKE) $(AM_MAKEFLAGS) installcheck \
     194          && $(MAKE) $(AM_MAKEFLAGS) dist
     195        -rm -rf $(distdir)
     196        @banner="$(distdir).tar.gz is ready for distribution"; \
     197        dashes=`echo "$$banner" | sed s/./=/g`; \
     198        echo "$$dashes"; \
     199        echo "$$banner"; \
     200        echo "$$dashes"
     201dist: distdir
     202        -chmod -R a+r $(distdir)
     203        GZIP=$(GZIP_ENV) $(TAR) chozf $(distdir).tar.gz $(distdir)
     204        -rm -rf $(distdir)
     205dist-all: distdir
     206        -chmod -R a+r $(distdir)
     207        GZIP=$(GZIP_ENV) $(TAR) chozf $(distdir).tar.gz $(distdir)
     208        -rm -rf $(distdir)
     209distdir: $(DISTFILES)
     210        -rm -rf $(distdir)
     211        mkdir $(distdir)
     212        -chmod 777 $(distdir)
     213        here=`cd $(top_builddir) && pwd`; \
     214        top_distdir=`cd $(distdir) && pwd`; \
     215        distdir=`cd $(distdir) && pwd`; \
     216        cd $(top_srcdir) \
     217          && $(AUTOMAKE) --include-deps --build-dir=$$here --srcdir-name=$(top_srcdir) --output-dir=$$top_distdir --foreign Makefile
     218        @for file in $(DISTFILES); do \
     219          d=$(srcdir); \
     220          if test -d $$d/$$file; then \
     221            cp -pr $$d/$$file $(distdir)/$$file; \
     222          else \
     223            test -f $(distdir)/$$file \
     224            || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
     225            || cp -p $$d/$$file $(distdir)/$$file || :; \
     226          fi; \
     227        done
     228info-am:
     229info: info-am
     230dvi-am:
     231dvi: dvi-am
     232check-am: all-am
     233check: check-am
     234installcheck-am:
     235installcheck: installcheck-am
     236install-exec-am:
     237install-exec: install-exec-am
     238
     239install-data-am:
     240install-data: install-data-am
     241
     242install-am: all-am
     243        @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
     244install: install-am
     245uninstall-am:
     246uninstall: uninstall-am
     247all-am: Makefile $(HEADERS) all-local
     248all-redirect: all-am
     249install-strip:
     250        $(MAKE) $(AM_MAKEFLAGS) INSTALL_STRIP_FLAG=-s install
     251installdirs:
     252
     253
     254mostlyclean-generic:
     255
     256clean-generic:
     257
     258distclean-generic:
     259        -rm -f Makefile $(CONFIG_CLEAN_FILES)
     260        -rm -f config.cache config.log stamp-h stamp-h[0-9]*
     261
     262maintainer-clean-generic:
     263mostlyclean-am:  mostlyclean-tags mostlyclean-generic
     264
     265mostlyclean: mostlyclean-am
     266
     267clean-am:  clean-tags clean-generic mostlyclean-am
     268
     269clean: clean-am
     270
     271distclean-am:  distclean-tags distclean-generic clean-am
     272
     273distclean: distclean-am
     274        -rm -f config.status
     275
     276maintainer-clean-am:  maintainer-clean-tags maintainer-clean-generic \
     277                distclean-am
     278        @echo "This command is intended for maintainers to use;"
     279        @echo "it deletes files that may require special tools to rebuild."
     280
     281maintainer-clean: maintainer-clean-am
     282        -rm -f config.status
     283
     284.PHONY: tags mostlyclean-tags distclean-tags clean-tags \
     285maintainer-clean-tags distdir info-am info dvi-am dvi check check-am \
     286installcheck-am installcheck install-exec-am install-exec \
     287install-data-am install-data install-am install uninstall-am uninstall \
     288all-local all-redirect all-am all installdirs mostlyclean-generic \
     289distclean-generic clean-generic maintainer-clean-generic clean \
     290mostlyclean distclean maintainer-clean
     291
     292
    31293include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
    32 include $(RTEMS_ROOT)/make/lib.cfg
    33 
    34 INSTALL_CHANGE = @INSTALL_CHANGE@
    35 mkinstalldirs = $(SHELL) $(top_srcdir)/@RTEMS_TOPdir@/mkinstalldirs
    36 
    37 INSTALLDIRS = $(PROJECT_INCLUDE)/libcpu
    38 
    39 $(INSTALLDIRS):
    40         @$(mkinstalldirs) $(INSTALLDIRS)
    41 
    42 LIB = ${ARCH}/libcpuspec.a
    43 
    44 #
    45 # (OPTIONAL) Add local stuff here using +=
    46 #
    47 
    48 DEFINES +=
    49 CPPFLAGS +=
    50 CFLAGS +=
    51 
    52 LD_PATHS +=
    53 LD_LIBS +=
    54 LDFLAGS +=
    55 
    56 #
    57 # Add your list of files to delete here.  The config files
    58 #  already know how to delete some stuff, so you may want
    59 #  to just run 'make clean' first to see what gets missed.
    60 #  'make clobber' already includes 'make clean'
    61 #
    62 
    63 CLEAN_ADDITIONS +=
    64 CLOBBER_ADDITIONS +=
    65 
    66 ${LIB}: ${SRCS} ${OBJS}
     294
     295include $(RTEMS_ROOT)/make/leaf.cfg
     296
     297define make-library
     298$(RM) $@
     299$(AR) $(ARFLAGS) $@ $^
     300$(RANLIB) $@
     301endef
     302
     303$(PROJECT_RELEASE)/lib:
     304        @$(mkinstalldirs) $@
     305
     306.PRECIOUS: $(LIB)
     307
     308$(LIB): ${OBJS}
    67309        $(make-library)
    68310
    69 preinstall :
    70         @$(mkinstalldirs) $(PROJECT_INCLUDE)/libcpu
    71         @$(INSTALL_CHANGE) -m 644 $(H_FILES) $(PROJECT_INCLUDE)/libcpu
    72 
    73 all: ${ARCH} $(SRCS) preinstall $(OBJ) $(LIB)
    74         cd wrapup; $(MAKE)
    75 
    76 # the .rel file built here will be put into libcpu.a by ../wrapup/Makefile
    77 install: all
    78 
    79 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
    80         cd $(top_builddir) \
    81          && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
     311$(PROJECT_INCLUDE)/libcpu:
     312        $(mkinstalldirs) $@
     313
     314$(PROJECT_INCLUDE)/libcpu/%.h: %.h
     315        $(INSTALL_DATA) $< $@
     316
     317$(PROJECT_RELEASE)/lib/$(LIBNAME)$(LIB_VARIANT).a: $(LIB)
     318        $(INSTALL_DATA) $< $@
     319
     320all-local: ${ARCH} $(PREINSTALL_FILES) $(TMPINSTALL_FILES)
     321
     322debug-am:
     323debug: debug-am
     324.PHONY: debug debug-am
     325
     326profile-am:
     327profile: profile-am
     328.PHONY: profile profile-am
     329
     330preinstall-am: $(PREINSTALL_FILES)
     331preinstall: preinstall-am
     332.PHONY: preinstall preinstall-am
     333
     334depend-am:
     335depend: depend-am
     336.PHONY: depend depend-am
     337
     338# Tell versions [3.59,3.63) of GNU make to not export all variables.
     339# Otherwise a system limit (for SysV at least) may be exceeded.
     340.NOEXPORT:
Note: See TracChangeset for help on using the changeset viewer.