Changeset b8b0f44 in rtems-source-builder


Ignore:
Timestamp:
Sep 10, 2013, 6:19:20 AM (6 years ago)
Author:
Chris Johns <chrisj@…>
Branches:
4.10, 4.11, 4.9, master
Children:
0dd3013
Parents:
e0c00e8
Message:

config: Use ${build_top} to change dir to parent.

On NetBSD with ksh changing into a symlink made PWD the link's
target path so a 'cd ..' returned you to that parent and not
the parent you started from. Record the build top and then
change back to that path.

Change the package names to the actual packages and remove the
extra directory in the build tree. This makes the paths simpler.

Location:
source-builder/config
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • source-builder/config/autoconf-2-1.cfg

    re0c00e8 rb8b0f44  
    2626#
    2727%prep
    28   %setup -q -c -n %{name}-%{version}
    29   cd autoconf-%{autoconf_version}
     28  build_top=$(pwd)
     29
     30  %setup -q -n autoconf-%{autoconf_version}
    3031  %{?patch0:%patch0 -p1}
    31   cd ..
     32
     33  cd ${build_top}
    3234
    3335%build
     36  build_top=$(pwd)
     37
    3438  %if %{defined _internal_autotools_path}
    3539    export PATH="%{_internal_autotools_path}/bin:${PATH}"
     
    6064  unset CFLAGS_FOR_BUILD
    6165
    62   cd ..
     66  cd ${build_top}
    6367
    6468%install
     69  build_top=$(pwd)
     70
    6571  export PATH="%{_bindir}:${PATH}"
    6672  %{__rmdir} $SB_BUILD_ROOT
     
    7480  fi
    7581
    76   cd ..
     82  cd ${build_top}
  • source-builder/config/automake-1-1.cfg

    re0c00e8 rb8b0f44  
    2626#
    2727%prep
    28   %setup -q -c -n %{name}-%{version}
    29   cd automake-%{automake_version}
     28  build_top=$(pwd)
     29
     30  %setup -q -n automake-%{automake_version}
    3031  %{?patch0:%patch0 -p1}
    31   cd ..
     32
     33  cd ${build_top}
    3234
    3335%build
     36  build_top=$(pwd)
     37
    3438  %if %{defined _internal_autotools_path}
    3539    export PATH="%{_internal_autotools_path}/bin:${PATH}"
     
    5963  unset CFLAGS_FOR_BUILD
    6064
    61   cd ..
     65  cd ${build_top}
    6266
    6367%install
     68  build_top=$(pwd)
     69
    6470  export PATH="%{_bindir}:${PATH}"
    6571  %{__rmdir} $SB_BUILD_ROOT
     
    7379  fi
    7480
    75   cd ..
     81  cd ${build_top}
  • source-builder/config/binutils-2-1.cfg

    re0c00e8 rb8b0f44  
    3939#
    4040%prep
     41  build_top=$(pwd)
     42
    4143  source_dir_0="binutils-%{binutils_version}"
    42   %setup -q -c -n %{name}-%{version}
    43   cd ${source_dir_0}
     44  %setup -q -n binutils-%{binutils_version}
    4445  %{?patch0:%patch0 %{?patch0_opts:%{patch0_opts}}%{!?patch0_opts:-p1}}
    4546  %{?patch1:%patch1 %{?patch1_opts:%{patch1_opts}}%{!?patch1_opts:-p1}}
     
    5253  %{?patch8:%patch8 %{?patch8_opts:%{patch8_opts}}%{!?patch8_opts:-p1}}
    5354  %{?patch9:%patch9 %{?patch9_opts:%{patch9_opts}}%{!?patch9_opts:-p1}}
    54   cd ..
     55
     56  cd ${build_top}
    5557
    5658%build
     59  build_top=$(pwd)
     60
    5761  %{build_directory}
    5862
     
    7680
    7781  %{__make} %{?_smp_mflags} all
    78   cd ..
     82
     83  cd ${build_top}
    7984
    8085%install
     86  cd ${build_top}
     87
    8188  %{__rmdir} $SB_BUILD_ROOT
    8289
     
    110117  fi
    111118
    112   cd ..
     119  cd ${build_top}
  • source-builder/config/dtc-1-1.cfg

    re0c00e8 rb8b0f44  
    2525#
    2626%prep
    27   %setup -q -c -n %{name}-%{version}
    28   cd dtc-v%{dtc_version}
     27  build_top=$(pwd)
     28
     29  %setup -q -n dtc-v%{dtc_version}
    2930  %{?patch0:%patch0 -p1}
    3031  %{?patch1:%patch1 -p1}
     
    3536  %{?patch6:%patch6 -p1}
    3637  %{?patch7:%patch7 -p1}
    37   cd ..
     38
     39  cd ${build_top}
    3840
    3941%build
     42  build_top=$(pwd)
     43
    4044  cd dtc-v%{dtc_version}
    4145
     
    4448  %{__make} PREFIX=%{_prefix}
    4549
    46   cd ..
     50  cd ${build_top}
    4751
    4852%install
     53  build_top=$(pwd)
     54
    4955  rm -rf $SB_BUILD_ROOT
    5056
     
    5258  %{__make} DESTDIR=$SB_BUILD_ROOT PREFIX=%{_prefix} install
    5359
    54   cd ..
     60  cd ${build_top}
  • source-builder/config/expat-2-1.cfg

    re0c00e8 rb8b0f44  
    2525#
    2626%prep
    27   %setup -q -c -n %{name}-%{version}
    28   cd expat-%{expat_version}
     27  build_top=$(pwd)
     28
     29  %setup -q -n expat-%{expat_version}
    2930  %{?patch0:%patch0 -p1}
    30   cd ..
     31
     32  cd ${build_top}
    3133
    3234%build
     35  build_top=$(pwd)
     36
    3337  cd expat-%{expat_version}
    3438
     
    4549  %{__make} %{?_smp_mflags} all
    4650
    47   cd ..
     51  cd ${build_top}
    4852
    4953%install
     54  build_top=$(pwd)
     55
    5056  rm -rf $SB_BUILD_ROOT
    5157
     
    5359  %{__make} DESTDIR=$SB_BUILD_ROOT install
    5460
    55   cd ..
     61  cd ${build_top}
  • source-builder/config/gcc-common-1.cfg

    re0c00e8 rb8b0f44  
    3636#
    3737%prep
     38  # save the build top directory and cd back to it rather than
     39  # using 'cd ..' because some shells change $PWD to a symlink's
     40  # target location and 'cd ..' fails.
     41  build_top=$(pwd)
     42
    3843  # gcc and optional the g++ core if separate packages
    3944  source_dir_0="gcc-%{gcc_version}"
    40   %setup -q -c -n %{name}-%{version}
    41   %{?source1:%setup -q -D -T -n %{name}-%{version} -a1}
    42   cd ${source_dir_0}
     45  %setup -q -n gcc-%{gcc_version}
     46  %{?source1:%setup -q -D -T -n gcc-%{gcc_version} -b1}
    4347  %{?patch0:%patch0 %{?patch0_opts:%{patch0_opts}}%{!?patch0_opts:-p1}}
    4448  %{?patch1:%patch1 %{?patch1_opts:%{patch1_opts}}%{!?patch1_opts:-p1}}
     
    5155  %{?patch8:%patch8 %{?patch8_opts:%{patch8_opts}}%{!?patch8_opts:-p1}}
    5256  %{?patch9:%patch9 %{?patch9_opts:%{patch9_opts}}%{!?patch9_opts:-p1}}
    53   cd ..
     57  cd ${build_top}
    5458
    5559  # newlib
    5660  source_dir_10="newlib-%{newlib_version}"
    57   %setup -q -D -T -n %{name}-%{version} -a10
    58   cd ${source_dir_10}
     61  %setup -q -D -T -n newlib-%{newlib_version} -b10
    5962  %{?patch10:%patch10 %{?patch10_opts:%{patch10_opts}}%{!?patch10_opts:-p1}}
    6063  %{?patch11:%patch11 %{?patch11_opts:%{patch11_opts}}%{!?patch11_opts:-p1}}
     
    6770  %{?patch18:%patch18 %{?patch18_opts:%{patch18_opts}}%{!?patch18_opts:-p1}}
    6871  %{?patch19:%patch19 %{?patch19_opts:%{patch19_opts}}%{!?patch19_opts:-p1}}
    69   cd ..
     72  cd ${build_top}
    7073
    7174  # Link newlib into the gcc source tree
     
    7578  # MPFR
    7679  source_dir_20="mpfr-%{mpfr_version}"
    77   %setup -q -D -T -n %{name}-%{version} -a20
    78   cd ${source_dir_20}
     80  %setup -q -D -T -n mpfr-%{mpfr_version} -b20
    7981  %{?patch20:%patch20 -p1}
    80   cd ..
     82  cd ${build_top}
    8183  # Build MPFR one-tree style
    8284  %{__rmfile} ${source_dir_0}/mpfr
     
    8587  # MPC
    8688  source_dir_21="mpc-%{mpc_version}"
    87   %setup -q -D -T -n %{name}-%{version} -a21
    88   cd ${source_dir_21}
     89  %setup -q -D -T -n mpc-%{mpc_version} -b21
    8990  %{?patch21:%patch21 -p1}
    90   cd ..
     91  cd ${build_top}
    9192  # Build MPC one-tree style
    9293  %{__rmfile} ${source_dir_0}/mpc
     
    9596  # GMP
    9697  source_dir_22="gmp-%{gmp_version}"
    97   %setup -q -D -T -n %{name}-%{version} -a22
    98   cd ${source_dir_22}
     98  %setup -q -D -T -n gmp-%{gmp_version} -b22
    9999  %{?patch22:%patch22 -p1}
    100   cd ..
     100  cd ${build_top}
    101101  # Build GMP one-tree style
    102102  %{__rmfile} ${source_dir_0}/gmp
     
    108108  cd ${source_dir_0}
    109109  contrib/gcc_update --touch
    110   cd ..
     110  cd ${build_top}
    111111
    112112%build
     113  build_top=$(pwd)
     114
    113115  %{build_directory}
    114116
     
    176178
    177179  %{__make} %{?_smp_mflags} all
    178   cd ..
     180
     181  cd ${build_top}
    179182
    180183%install
     184  build_top=$(pwd)
     185
    181186  %{__rmdir} $SB_BUILD_ROOT
    182187
    183188  cd ${build_dir}
    184189  %{__make} DESTDIR=$SB_BUILD_ROOT install
    185   cd ..
     190  cd ${build_top}
    186191
    187192  # libiberty doesn't honor --libdir, but always installs to a
  • source-builder/config/gdb-7-1.cfg

    re0c00e8 rb8b0f44  
    4343#
    4444%prep
     45  build_top=$(pwd)
     46
    4547  source_dir_0="gdb-%{gdb_version}"
    46   %setup -q -c -n %{name}-%{version}
    47   cd ${source_dir_0}
     48  %setup -q -n gdb-%{gdb_version}
    4849  %{?patch0:%patch0 %{?patch0_opts:%{patch0_opts}}%{!?patch0_opts:-p1}}
    4950  %{?patch1:%patch1 %{?patch1_opts:%{patch1_opts}}%{!?patch1_opts:-p1}}
     
    5657  %{?patch8:%patch8 %{?patch8_opts:%{patch8_opts}}%{!?patch8_opts:-p1}}
    5758  %{?patch9:%patch9 %{?patch9_opts:%{patch9_opts}}%{!?patch9_opts:-p1}}
    58   cd ..
     59
     60  cd ${build_top}
    5961
    6062%build
     63  build_top=$(pwd)
     64
    6165  %{build_directory}
    6266
     
    9195
    9296  %{__make} %{?_smp_mflags} all
    93   cd ..
     97
     98  cd ${build_top}
    9499
    95100%install
     101  build_top=$(pwd)
     102
    96103  %{__rmdir} $SB_BUILD_ROOT
    97104
     
    105112  touch $SB_BUILD_ROOT%{_infodir}/dir
    106113
    107   cd ..
     114  cd ${build_top}
Note: See TracChangeset for help on using the changeset viewer.