Changeset 2548d14 in rtems for bootstrap


Ignore:
Timestamp:
Sep 10, 2018, 3:38:14 PM (12 months ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
master
Children:
6d3ec58a
Parents:
629faf9
git-author:
Sebastian Huber <sebastian.huber@…> (09/10/18 15:38:14)
git-committer:
Sebastian Huber <sebastian.huber@…> (10/10/18 12:06:28)
Message:

build: Include header.am in cpukit/Makefile.am

Include all cpukit/*/header.am files in cpukit/Makefile.am. This gets
rid of all subtree Makefile.am and the sudirs hack.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • bootstrap

    r629faf9 r2548d14  
    8282  fi
    8383  base="$PWD"
     84
     85  # Generate cpukit/header-dirs.am
     86  tmp="$base/cpukit/header-dirs.am.new"
     87  hdr_dirs=`for i in cpukit/include cpukit/libnetworking cpukit/score/cpu/*/include ; do
     88    cd "$i"
     89    find -mindepth 1 -type d
     90    cd "$base"
     91  done | sort -u | sed 's%^\./%%'`
     92  echo '## This file was generated by "./boostrap -H".' > "$tmp"
     93  echo 'include_HEADERS =' >> "$tmp"
     94  for dir in $hdr_dirs ; do
     95    am_dir=`echo $dir | sed 's%[/-]%_%g'`
     96    echo "include_${am_dir}dir = \$(includedir)/$dir" >> "$tmp"
     97    echo "include_${am_dir}_HEADERS =" >> "$tmp"
     98  done
     99  diff -q "$tmp" "cpukit/header-dirs.am" || mv "$tmp" "cpukit/header-dirs.am"
     100  rm -f "$tmp"
     101
     102  # Generate cpukit/*/headers.am
    84103  tmp="$base/headers.am.new"
    85   for i in cpukit/include cpukit/score/cpu/*/include bsps/include bsps/*/include bsps/*/*/include ; do
     104  cpukit="$base/cpukit"
     105  cd "$cpukit"
     106  for inc in include score/cpu/*/include ; do
     107    echo '## This file was generated by "./boostrap -H".' > "$tmp"
     108    hdr=`dirname $inc`
     109    am_dir=""
     110    cd $inc
     111    for b in `find -type d | sort` ; do
     112      for j in `find $b -mindepth 1 -maxdepth 1 -name '*.h' | sed 's%^\.%%' | sed 's%^/%%' | sort` ; do
     113        dir=`dirname $j`
     114        if test x$dir != x. ; then
     115          am_dir=`echo $dir | sed 's%[/-]%_%g'`
     116          am_dir="_$am_dir"
     117        else
     118          am_dir=""
     119        fi
     120        echo "include${am_dir}_HEADERS += $inc/$j" >> "$tmp"
     121      done
     122    done
     123    cd "$cpukit"
     124    diff -q "$tmp" "${hdr}/headers.am" || mv "$tmp" "${hdr}/headers.am"
     125  done
     126  rm -f "$tmp"
     127  cd "$base"
     128
     129  # Generate bsps/*/headers.am
     130  tmp="$base/headers.am.new"
     131  for i in bsps/include bsps/*/include bsps/*/*/include ; do
    86132    dir=""
    87133    am_dir=""
    88134    echo '## This file was generated by "./boostrap -H".' > "$tmp"
    89135    case $i in
    90       cpukit/include)
    91         hdr="../"
    92         inc="include/"
    93         ;;
    94       cpukit/score/cpu/*/include)
    95         hdr="../"
    96         inc=`echo $i | cut -d'/' -f5-`
    97         inc="$inc/"
    98         ;;
    99136      bsps/*/*/include)
    100137        hdr="../"
Note: See TracChangeset for help on using the changeset viewer.