|
| 1 | +#!/bin/sh |
| 2 | +# |
| 3 | +# Run 'autoreconf -i' to generate 'configure', 'Makefile.in', etc., |
| 4 | +# including in the subdirectories of dnmtools src (for the git |
| 5 | +# submodules). |
| 6 | +# |
| 7 | +# The first time this is run on a new cloned git repo the configure |
| 8 | +# script will not be present, only the configure.ac and |
| 9 | +# Makefile.am. The rest must be generated by `autoreconf -i` and this |
| 10 | +# must happen in the `src/smithlab_cpp`, |
| 11 | +# `src/abismal/src/smithlab_cpp` and `src/abismal` subdirs. Running |
| 12 | +# `autoreconf -i` in some of these directories will move recursively |
| 13 | +# into others, but this is not guaranteed. This script will do each |
| 14 | +# separately. |
| 15 | +# |
| 16 | +# If you are working with a distribution (file ending with ".tar.gz" |
| 17 | +# or similar) then this script should not be needed, and should not be |
| 18 | +# present, as all the files should already exist. You should only run |
| 19 | +# this script if you know what you are doing with autoreconf. |
| 20 | +# |
| 21 | +# This script will only work with an argument to confirm the help |
| 22 | +# message has been read. |
| 23 | + |
| 24 | +runautoreconf() { |
| 25 | + autoreconf -i src/abismal/src/smithlab_cpp; |
| 26 | + autoreconf -i src/abismal; |
| 27 | + autoreconf -i src/smithlab_cpp; |
| 28 | + autoreconf -i; |
| 29 | +} |
| 30 | + |
| 31 | +if test -d .git && test "$(basename ${PWD})" == "dnmtools" |
| 32 | +then |
| 33 | + runautoreconf |
| 34 | + exit 0 |
| 35 | +else |
| 36 | + echo " It seems you are either attempting to run this script " |
| 37 | + echo " from the wrong directory, or in a source tree that was " |
| 38 | + echo " not obtained by cloning the dnmtools git repo. " |
| 39 | + echo " " |
| 40 | + echo " ./autogen.sh generates the configure script in the " |
| 41 | + echo " relevant subdirectories. Only run this if you know " |
| 42 | + echo " what you are doing with autoreconf and are simply " |
| 43 | + echo " avoiding doing that. If you just want to use the " |
| 44 | + echo " software, download a release and this script will " |
| 45 | + echo " not be needed. " |
| 46 | + exit 1 |
| 47 | +fi |
0 commit comments