Marc Slemko | b09f588 | 2006-08-23 22:03:34 +0000 | [diff] [blame] | 1 | #!/bin/sh |
| 2 | |
David Reiss | ea2cba8 | 2009-03-30 21:35:00 +0000 | [diff] [blame] | 3 | # |
| 4 | # Licensed to the Apache Software Foundation (ASF) under one |
| 5 | # or more contributor license agreements. See the NOTICE file |
| 6 | # distributed with this work for additional information |
| 7 | # regarding copyright ownership. The ASF licenses this file |
| 8 | # to you under the Apache License, Version 2.0 (the |
| 9 | # "License"); you may not use this file except in compliance |
| 10 | # with the License. You may obtain a copy of the License at |
| 11 | # |
| 12 | # http://www.apache.org/licenses/LICENSE-2.0 |
| 13 | # |
| 14 | # Unless required by applicable law or agreed to in writing, |
| 15 | # software distributed under the License is distributed on an |
| 16 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
| 17 | # KIND, either express or implied. See the License for the |
| 18 | # specific language governing permissions and limitations |
| 19 | # under the License. |
| 20 | # |
| 21 | |
James E. King III | b96c438 | 2019-01-24 17:45:07 -0500 | [diff] [blame] | 22 | echo -n "make distclean... " |
| 23 | make -k distclean >/dev/null 2>&1 |
| 24 | echo "ok" |
| 25 | |
Bryan Duxbury | e61fef3 | 2011-01-26 23:38:54 +0000 | [diff] [blame] | 26 | if test -d lib/php/src/ext/thrift_protocol ; then |
| 27 | if phpize -v >/dev/null 2>/dev/null ; then |
| 28 | (cd lib/php/src/ext/thrift_protocol && phpize) |
| 29 | fi |
| 30 | fi |
Marc Slemko | b09f588 | 2006-08-23 22:03:34 +0000 | [diff] [blame] | 31 | |
David Reiss | 618777d | 2010-08-31 16:51:10 +0000 | [diff] [blame] | 32 | set -e |
David Reiss | 832b262 | 2007-12-28 18:25:33 +0000 | [diff] [blame] | 33 | |
David Reiss | 618777d | 2010-08-31 16:51:10 +0000 | [diff] [blame] | 34 | # libtoolize is called "glibtoolize" on OSX. |
David Reiss | 832b262 | 2007-12-28 18:25:33 +0000 | [diff] [blame] | 35 | if libtoolize --version 1 >/dev/null 2>/dev/null; then |
David Reiss | 618777d | 2010-08-31 16:51:10 +0000 | [diff] [blame] | 36 | LIBTOOLIZE=libtoolize |
David Reiss | 832b262 | 2007-12-28 18:25:33 +0000 | [diff] [blame] | 37 | elif glibtoolize --version 1 >/dev/null 2>/dev/null; then |
David Reiss | 618777d | 2010-08-31 16:51:10 +0000 | [diff] [blame] | 38 | LIBTOOLIZE=glibtoolize |
| 39 | else |
| 40 | echo >&2 "Couldn't find libtoolize!" |
| 41 | exit 1 |
David Reiss | 832b262 | 2007-12-28 18:25:33 +0000 | [diff] [blame] | 42 | fi |
| 43 | |
Jaume Marhuenda | e8bec23 | 2018-07-31 07:21:42 -0700 | [diff] [blame] | 44 | format_version () { |
| 45 | printf "%03d%03d%03d%03d" $(echo $1 | tr '.' ' '); |
| 46 | } |
| 47 | |
Jens Geyer | 4aa95df | 2015-04-03 12:37:03 +0200 | [diff] [blame] | 48 | # we require automake 1.13 or later |
| 49 | # check must happen externally due to use of newer macro |
Jens Geyer | a4fc440 | 2015-04-14 20:11:24 +0200 | [diff] [blame] | 50 | AUTOMAKE_VERSION=`automake --version | grep automake | egrep -o '([0-9]{1,}\.)+[0-9]{1,}'` |
Jaume Marhuenda | e8bec23 | 2018-07-31 07:21:42 -0700 | [diff] [blame] | 51 | if [ $(format_version $AUTOMAKE_VERSION) -lt $(format_version 1.13) ]; then |
Jens Geyer | 4aa95df | 2015-04-03 12:37:03 +0200 | [diff] [blame] | 52 | echo >&2 "automake version $AUTOMAKE_VERSION is too old (need 1.13 or later)" |
| 53 | exit 1 |
| 54 | fi |
| 55 | |
James E. King, III | 0ad20bd | 2017-09-30 15:44:16 -0700 | [diff] [blame] | 56 | set -e |
David Reiss | 618777d | 2010-08-31 16:51:10 +0000 | [diff] [blame] | 57 | autoscan |
| 58 | $LIBTOOLIZE --copy --automake |
| 59 | aclocal -I ./aclocal |
| 60 | autoheader |
James E. King, III | 0ad20bd | 2017-09-30 15:44:16 -0700 | [diff] [blame] | 61 | sed '/undef VERSION/d' config.hin > config.hin2 |
| 62 | mv config.hin2 config.hin |
mvaradachari | fbc9114 | 2008-01-01 04:51:24 +0000 | [diff] [blame] | 63 | autoconf |
David Reiss | 618777d | 2010-08-31 16:51:10 +0000 | [diff] [blame] | 64 | automake --copy --add-missing --foreign |