Commit 3dc417b7 authored by Michael Jeanson's avatar Michael Jeanson

Import Upstream version 1.16

parent 741237a9
1.15 -> 1.16:
- add lv.po, update translations (Translation Project).
- include xcode project files in distributed popt tar ball.
- make distcheck is now squeaky clean.
- permit VPATH builds.
- add shallow tests using ISP/RAS api-sanity-autotest.pl.
- prefix bit set routines with popt to avoid symbol coolisions w rpm.
- add tdict.c to exercise popt bit sets against /usr/dict/words.
- add poptBitsArgs() method to generate args bit set.
- add methods for bit set union and intersection.
- permit comma separated attribute lists, handle negated attributes.
- better test for POPT_ARG_BITSET.
- add POPT_ARG_BITSET handling.
- add POPT_ARG_SHORT handling.
- handle all callback traversals within a C switch (for extendability ease).
- add popt.pc.
- devzero2000: add AC_CONFIG_AUX_DIR, AC_CONFIG_MACRO_DIR to configure. Create build-aux
- devzero2000: del acinclude.m4 : AC_CHECK_VA_COPY is not used
1.14 -> 1.15:
- release popt-1.15.
- rse: fix building under --disable-nls
......
2007-06-14 gettextize <bug-gnu-gettext@gnu.org>
* Makefile.am (EXTRA_DIST): Add config.rpath, m4/ChangeLog.
* configure.ac (AC_OUTPUT): Add po/Makefile.in.
......@@ -2,37 +2,42 @@
AUTOMAKE_OPTIONS = 1.4 foreign
LINT = splint
LINT = splint
MCCABE = pmccabe
EXTRA_DIST = config.rpath autogen.sh CHANGES $(man_MANS) popt.spec \
EXTRA_DIST = config.rpath lookup3.c autogen.sh CHANGES $(man_MANS) \
m4/Makefile.in \
footer_no_timestamp.html libpopt.vers \
testit.sh test-poptrc test3-data/0* \
po/*.in po/*.po po/popt.pot \
testit.sh test-poptrc \
popt.xcodeproj/project.pbxproj \
popt.ps
SUBDIRS = po
SUBDIRS = po . auto
INCLUDES = -I. -I$(top_srcdir)
AM_CPPFLAGS = -I. -I$(top_srcdir)
noinst_HEADERS = poptint.h system.h
noinst_PROGRAMS = test1 test2 test3
noinst_PROGRAMS = test1 test2 tdict # test3
test1_SOURCES = test1.c
test1_LDFLAGS =
test1_LDADD = $(usrlib_LTLIBRARIES)
test2_SOURCES = test2.c
test2_LDFLAGS =
test2_LDADD = $(usrlib_LTLIBRARIES)
test3_SOURCES = test3.c
test3_LDFLAGS =
test3_LDADD = $(usrlib_LTLIBRARIES)
#test3_SOURCES = test3.c
#test3_LDFLAGS =
#test3_LDADD = $(usrlib_LTLIBRARIES)
tdict_SOURCES = tdict.c
tdict_LDFLAGS =
tdict_LDADD = $(usrlib_LTLIBRARIES)
noinst_SCRIPTS = testit.sh
TESTS_ENVIRONMENT = \
test1="./test1"
test1="$(top_builddir)/test1"
TESTS = testit.sh
TESTS = $(top_srcdir)/testit.sh
include_HEADERS = popt.h
......@@ -42,13 +47,19 @@ usrlib_LTLIBRARIES = libpopt.la
libpopt_la_SOURCES = popt.c poptparse.c poptconfig.c popthelp.c poptint.c
libpopt_la_LDFLAGS = -no-undefined @LTLIBINTL@ @LTLIBICONV@
pkgconfigdir = $(prefix)/lib/pkgconfig
pkgconfig_DATA = popt.pc
if HAVE_LD_VERSION_SCRIPT
libpopt_la_LDFLAGS += -Wl,--version-script=$(srcdir)/libpopt.vers
libpopt_la_LDFLAGS += -Wl,--version-script=$(top_srcdir)/libpopt.vers
endif
man_MANS = popt.3
#BUILT_SOURCES = popt.lcd
BUILT_SOURCES = popt.pc # popt.lcd
distclean-local:
rm -rf .ccache
.PHONY: updatepo
updatepo:
......@@ -65,6 +76,10 @@ sources:
lint:
$(LINT) ${DEFS} ${INCLUDES} test1.c ${libpopt_la_SOURCES}
.PHONY: mccabe
mccabe:
$(MCCABE) $(libpopt_la_SOURCES) | sort -n -r | head -n 10
.PHONY: doxygen
doxygen: Doxyfile
rm -rf doxygen
......
This diff is collapsed.
dnl ##
dnl ## acinclude.m4 -- additional source for aclocal(1)
dnl ##
dnl ##
dnl ## Check for C99 va_copy() implementation
dnl ## (and provide fallback implementation if neccessary)
dnl ##
dnl ## configure.in:
dnl ## AC_CHECK_VA_COPY
dnl ## foo.c:
dnl ## #include "config.h"
dnl ## [...]
dnl ## va_copy(d,s)
dnl ##
dnl ## This check is rather complex: first because we really have to
dnl ## try various possible implementations in sequence and second, we
dnl ## cannot define a macro in config.h with parameters directly.
dnl ##
dnl # test program for va_copy() implementation
changequote(<<,>>)
m4_define(__va_copy_test, <<[
#include <stdlib.h>
#include <stdarg.h>
#include <string.h>
#define DO_VA_COPY(d, s) $1
void test(char *str, ...)
{
va_list ap, ap2;
int i;
va_start(ap, str);
DO_VA_COPY(ap2, ap);
for (i = 1; i <= 9; i++) {
int k = (int)va_arg(ap, int);
if (k != i)
abort();
}
DO_VA_COPY(ap, ap2);
for (i = 1; i <= 9; i++) {
int k = (int)va_arg(ap, int);
if (k != i)
abort();
}
va_end(ap);
}
int main(int argc, char *argv[])
{
test("test", 1, 2, 3, 4, 5, 6, 7, 8, 9);
exit(0);
}
]>>)
changequote([,])
dnl # test driver for va_copy() implementation
m4_define(__va_copy_check, [
AH_VERBATIM($1,
[/* Predefined possible va_copy() implementation (id: $1) */
#define __VA_COPY_USE_$1(d, s) $2])
if test ".$ac_cv_va_copy" = .; then
AC_TRY_RUN(__va_copy_test($2), [ac_cv_va_copy="$1"])
fi
])
dnl # Autoconf check for va_copy() implementation checking
AC_DEFUN([AC_CHECK_VA_COPY],[
dnl # provide Autoconf display check message
AC_MSG_CHECKING(for va_copy() function)
dnl # check for various implementations in priorized sequence
AC_CACHE_VAL(ac_cv_va_copy, [
ac_cv_va_copy=""
dnl # 1. check for standardized C99 macro
__va_copy_check(C99, [va_copy((d), (s))])
dnl # 2. check for alternative/deprecated GCC macro
__va_copy_check(GCM, [VA_COPY((d), (s))])
dnl # 3. check for internal GCC macro (high-level define)
__va_copy_check(GCH, [__va_copy((d), (s))])
dnl # 4. check for internal GCC macro (built-in function)
__va_copy_check(GCB, [__builtin_va_copy((d), (s))])
dnl # 5. check for assignment approach (assuming va_list is a struct)
__va_copy_check(ASS, [do { (d) = (s); } while (0)])
dnl # 6. check for assignment approach (assuming va_list is a pointer)
__va_copy_check(ASP, [do { *(d) = *(s); } while (0)])
dnl # 7. check for memory copying approach (assuming va_list is a struct)
__va_copy_check(CPS, [memcpy((void *)&(d), (void *)&(s), sizeof((s)))])
dnl # 8. check for memory copying approach (assuming va_list is a pointer)
__va_copy_check(CPP, [memcpy((void *)(d), (void *)(s), sizeof(*(s)))])
if test ".$ac_cv_va_copy" = .; then
AC_ERROR([no working implementation found])
fi
])
dnl # optionally activate the fallback implementation
if test ".$ac_cv_va_copy" = ".C99"; then
AC_DEFINE(HAVE_VA_COPY, 1, [Define if va_copy() macro exists (and no fallback implementation is required)])
fi
dnl # declare which fallback implementation to actually use
AC_DEFINE_UNQUOTED([__VA_COPY_USE], [__VA_COPY_USE_$ac_cv_va_copy],
[Define to id of used va_copy() implementation])
dnl # provide activation hook for fallback implementation
AH_VERBATIM([__VA_COPY_ACTIVATION],
[/* Optional va_copy() implementation activation */
#ifndef HAVE_VA_COPY
#define va_copy(d, s) __VA_COPY_USE(d, s)
#endif
])
dnl # provide Autoconf display result message
if test ".$ac_cv_va_copy" = ".C99"; then
AC_MSG_RESULT([yes])
else
AC_MSG_RESULT([no (using fallback implementation)])
fi
])
This diff is collapsed.
AUTOMAKE_OPTIONS = 1.4 foreign
AUTOTEST = api-sanity-autotest.pl
TDIRS = descriptors_storage header_compile_errors test_results tests
clean-local:
rm -rf $(TDIRS)
check-local:
-[ -d tests ] && ${AUTOTEST} -l popt -d desc -clean
-${AUTOTEST} -l popt -d desc -st types -gen -build -run
This diff is collapsed.
<version>
1.15
</version>
<headers>
popt.h
</headers>
<libs>
@abs_top_builddir@/.libs/libpopt.so
</libs>
<include_paths>
@abs_top_srcdir@
</include_paths>
<gcc_options>
@CFLAGS@
</gcc_options>
<opaque_types>
</opaque_types>
<skip_interfaces>
</skip_interfaces>
<include_preamble>
</include_preamble>
<libs_depend>
</libs_depend>
<?xml version="1.0" encoding="UTF-8"?>
<collection>
<spec_type>
<kind> common_env </kind>
<global_code>
static int aVal = 141421;
static unsigned int aFlag = 0x8aceU;
static short aShort = (short)4523;
static int aInt = 271828;
static long aLong = 738905609L;
static long long aLongLong = 738905609LL;
static float aFloat = 3.1415926535;
static double aDouble = 9.86960440108935861883;
static const char ** aArgv = NULL;
static struct poptOption optionsTable[] = {
{ "val", '\0', POPT_ARG_VAL | POPT_ARGFLAG_SHOW_DEFAULT, &aVal, 125992,
"POPT_ARG_VAL: 125992 141421", 0},
{ "int", 'i', POPT_ARG_INT | POPT_ARGFLAG_SHOW_DEFAULT, &aInt, 0,
"POPT_ARG_INT: 271828", NULL },
{ "short", 's', POPT_ARG_SHORT | POPT_ARGFLAG_SHOW_DEFAULT, &aShort, 0,
"POPT_ARG_SHORT: 4523", NULL },
{ "long", 'l', POPT_ARG_LONG | POPT_ARGFLAG_SHOW_DEFAULT, &aLong, 0,
"POPT_ARG_LONG: 738905609", NULL },
{ "longlong", 'L', POPT_ARG_LONGLONG | POPT_ARGFLAG_SHOW_DEFAULT, &aLongLong, 0,
"POPT_ARG_LONGLONG: 738905609", NULL },
{ "float", 'f', POPT_ARG_FLOAT | POPT_ARGFLAG_SHOW_DEFAULT, &aFloat, 0,
"POPT_ARG_FLOAT: 3.14159", NULL },
{ "double", 'd', POPT_ARG_DOUBLE | POPT_ARGFLAG_SHOW_DEFAULT, &aDouble, 0,
"POPT_ARG_DOUBLE: 9.8696", NULL },
{ "argv", '\0', POPT_ARG_ARGV, &aArgv, 0,
"POPT_ARG_ARGV: append string to argv array (can be used multiple times)","STRING"},
POPT_AUTOALIAS
POPT_AUTOHELP
POPT_TABLEEND
};
</global_code>
</spec_type>
<spec_type>
<kind> common_param </kind>
<data_type> poptContext </data_type>
<value> poptGetContext(argv[0], argc, argv, optionsTable, 0) </value>
<final_code>
$0 = poptFreeContext($0);
</final_code>
<associating>
<except>
poptAddItem <!-- FIXME -->
</except>
</associating>
</spec_type>
<spec_type>
<kind> normal </kind>
<data_type> poptContext </data_type>
<value> poptGetContext(argv[0], argc, argv, optionsTable, 0) </value>
<associating>
<interfaces>
poptFreeContext
poptFini
</interfaces>
<links> param1 </links>
</associating>
</spec_type>
<spec_type>
<kind> normal </kind>
<data_type> poptItem </data_type>
<value> NULL </value>
<global_code>
#include <malloc.h>
</global_code>
<init_code>
$0 = calloc(1, sizeof(*$0));
$0->option = *poptHelpOptionsI18N;
$0->argc = 1;
$0->argv = calloc(2, sizeof(*$0->argv));
$0->argv[0] = strdup("arg1");
</init_code>
<associating>
<interfaces> poptAddItem </interfaces>
<links> param2 </links>
</associating>
</spec_type>
<spec_type>
<kind> common_param </kind>
<data_type> struct poptAlias </data_type>
<value> _alias </value>
<global_code>
#include <malloc.h>
static struct poptAlias _alias = {
.longName = "longName",
.shortName = 'l',
.argc = 0,
.argv = NULL
};
</global_code>
<init_code>
$0.argc = 1;
$0.argv = calloc($0.argc + 1, sizeof(*$0.argv));
$0.argv[0] = strdup("arg1");
</init_code>
</spec_type>
<spec_type>
<kind> common_param </kind>
<name> poptBits </name>
<data_type> poptBits </data_type>
<value>
create_poptBits()
</value>
<global_code>
poptBits create_poptBits()
{
poptBits a = NULL;
(void) poptSaveBits(&a, 0, "foo");
(void) poptSaveBits(&a, 0, "bar");
(void) poptSaveBits(&a, 0, "baz");
return a;
}
</global_code>
</spec_type>
<spec_type>
<kind> normal </kind>
<data_type> const char *** </data_type>
<value> &av </value>
<global_code>
#include <malloc.h>
</global_code>
<init_code>
const char ** av = NULL;
</init_code>
<final_code>
free(av[0]);
free(av);
</final_code>
<associating>
<interfaces> poptSaveString </interfaces>
<links> param1 </links>
</associating>
</spec_type>
</collection>
......@@ -22,7 +22,7 @@ perl -p -i~ -e 's/(po\/Makefile\.in)\s+po\/Makefile\.in/$1/' configure.ac
perl -p -i~ -e 's/(SUBDIRS\s+=\s+po)\s+po/$1/' Makefile.am
aclocal -I m4
autoheader
automake -a -c
automake -Wall -Wno-override -a -c
autoconf
if [ "$1" = "--noconfigure" ]; then
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
AC_PREREQ(2.57)
AC_INIT(popt, 1.15, popt-devel@rpm5.org)
AC_CANONICAL_TARGET
AC_INIT(popt, 1.16, popt-devel@rpm5.org)
AC_CONFIG_SRCDIR([popt.h])
AC_CONFIG_HEADERS([config.h])
AC_CANONICAL_TARGET
dnl Must come before AM_INIT_AUTOMAKE.
dnl AC_CONFIG_AUX_DIR([build-aux])
AC_CONFIG_MACRO_DIR([m4])
AM_INIT_AUTOMAKE([foreign -Wall])
AM_MAINTAINER_MODE
# Library code modified: REVISION++
# Interfaces changed/added/removed: CURRENT++ REVISION=0
......@@ -12,11 +18,11 @@ AC_SUBST(LT_CURRENT, 0)
AC_SUBST(LT_REVISION, 0)
AC_SUBST(LT_AGE, 8)
AM_INIT_AUTOMAKE([foreign])
ALL_LINGUAS="cs da de eo es fi fr ga gl hu id is it ja ko nb nl pl pt ro ru sk sl sv th tr uk vi wa zh_TW zh_CN"
ALL_LINGUAS="cs da de eo es fi fr ga gl hu id is it ja ko lv nb nl pl pt ro ru sk sl sv th tr uk vi wa zh_TW zh_CN"
AC_PROG_CC_STDC
AC_PROG_CC
AC_PROG_INSTALL
AC_PROG_LIBTOOL
......@@ -63,6 +69,16 @@ AC_ARG_ENABLE([ld-version-script],
[ : ] )
AM_CONDITIONAL(HAVE_LD_VERSION_SCRIPT, test "$have_ld_version_script" = "yes")
AC_ARG_ENABLE(build-gcov,
AS_HELP_STRING([--enable-build-gcov], [build POPT instrumented for gcov]), [dnl
if test ".$enableval" = .yes; then
if test ".`$CC --version 2>&1 | grep 'GCC'`" != .; then
dnl # GNU GCC (usually "gcc")
CFLAGS="$CFLAGS -fprofile-arcs -ftest-coverage"
fi
fi
])
AC_CHECK_FUNC(setreuid, [], [
AC_CHECK_LIB(ucb, setreuid, [if echo $LIBS | grep -- -lucb >/dev/null ;then :; else LIBS="$LIBS -lc -lucb" USEUCB=y;fi])
])
......@@ -75,9 +91,45 @@ popt_sysconfdir="${sysconfdir}"
eval "popt_sysconfdir=\"${popt_sysconfdir}\"" # expand contained ${prefix}
AC_DEFINE_UNQUOTED([POPT_SYSCONFDIR], ["$popt_sysconfdir"], [Full path to default POPT configuration directory])
# Define a (hope) portable Libs pkgconfig directive that
# - Don't harm if the default library search path include ${libdir}
# (https://bugzilla.novell.com/show_bug.cgi?id=529921)
# - Don't require a not upstream patch to pkgconfig
# (https://bugs.freedesktop.org/show_bug.cgi?id=16095)
popt_pkgconfig_libs='-L${libdir} -lpopt'
case "${host}" in
*-*-linux*)
case "${libdir}" in
/usr/lib|/usr/lib64|/lib|/lib64)
popt_pkgconfig_libs='-lpopt'
;;
*)
popt_pkgconfig_libs='-L${libdir} -lpopt'
;;
esac
;;
*-*-gnu*)
case "${libdir}" in
/usr/lib|/usr/lib64|/lib|/lib64)
popt_pkgconfig_libs='-lpopt'
;;
*)
popt_pkgconfig_libs='-L${libdir} -lpopt'
;;
esac
;;
esac
AC_SUBST([POPT_PKGCONFIG_LIBS],"$popt_pkgconfig_libs")
POPT_SOURCE_PATH="`pwd`"
AC_DEFINE_UNQUOTED(POPT_SOURCE_PATH, "$POPT_SOURCE_PATH",
[Full path to popt top_srcdir.])
AC_SUBST(POPT_SOURCE_PATH)
AC_OUTPUT([Doxyfile Makefile po/Makefile.in])
AC_CONFIG_SUBDIRS()
AC_CONFIG_FILES([ po/Makefile.in m4/Makefile
Doxyfile Makefile popt.pc popt.spec test-poptrc
auto/Makefile auto/desc auto/types
])
AC_OUTPUT
#! /bin/sh
# depcomp - compile a program generating dependencies as side-effects
scriptversion=2006-10-15.18
scriptversion=2009-04-28.21; # UTC
# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006 Free Software
# Foundation, Inc.
# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006, 2007, 2009 Free
# Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
......@@ -17,9 +17,7 @@ scriptversion=2006-10-15.18
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
# 02110-1301, USA.
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
......@@ -87,6 +85,15 @@ if test "$depmode" = dashXmstdout; then
depmode=dashmstdout
fi
cygpath_u="cygpath -u -f -"
if test "$depmode" = msvcmsys; then
# This is just like msvisualcpp but w/o cygpath translation.
# Just convert the backslash-escaped backslashes to single forward
# slashes to satisfy depend.m4
cygpath_u="sed s,\\\\\\\\,/,g"
depmode=msvisualcpp
fi
case "$depmode" in
gcc3)
## gcc 3 implements dependency tracking that does exactly what
......@@ -192,14 +199,14 @@ sgi)
' < "$tmpdepfile" \
| sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \
tr '
' ' ' >> $depfile
echo >> $depfile
' ' ' >> "$depfile"
echo >> "$depfile"
# The second pass generates a dummy entry for each header file.
tr ' ' '
' < "$tmpdepfile" \
| sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \
>> $depfile
>> "$depfile"
else
# The sourcefile does not contain any dependencies, so just
# store a dummy comment line, to avoid errors with the Makefile
......@@ -215,34 +222,39 @@ aix)
# current directory. Also, the AIX compiler puts `$object:' at the
# start of each line; $object doesn't have directory information.
# Version 6 uses the directory in both cases.
stripped=`echo "$object" | sed 's/\(.*\)\..*$/\1/'`
tmpdepfile="$stripped.u"
dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
test "x$dir" = "x$object" && dir=
base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
if test "$libtool" = yes; then
tmpdepfile1=$dir$base.u
tmpdepfile2=$base.u
tmpdepfile3=$dir.libs/$base.u
"$@" -Wc,-M
else
tmpdepfile1=$dir$base.u
tmpdepfile2=$dir$base.u
tmpdepfile3=$dir$base.u
"$@" -M
fi
stat=$?
if test -f "$tmpdepfile"; then :
else
stripped=`echo "$stripped" | sed 's,^.*/,,'`
tmpdepfile="$stripped.u"
fi
if test $stat -eq 0; then :
else
rm -f "$tmpdepfile"
rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
exit $stat
fi
for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
do
test -f "$tmpdepfile" && break
done
if test -f "$tmpdepfile"; then
outname="$stripped.o"
# Each line is of the form `foo.o: dependent.h'.
# Do two passes, one to just change these to
# `$object: dependent.h' and one to simply `dependent.h:'.
sed -e "s,^$outname:,$object :," < "$tmpdepfile" > "$depfile"
sed -e "s,^$outname: \(.*\)$,\1:," < "$tmpdepfile" >> "$depfile"
sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile"
# That's a tab and a space in the [].
sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
else
# The sourcefile does not contain any dependencies, so just
# store a dummy comment line, to avoid errors with the Makefile
......@@ -323,7 +335,12 @@ hp2)
if test -f "$tmpdepfile"; then
sed -e "s,^.*\.[a-z]*:,$object:," "$tmpdepfile" > "$depfile"
# Add `dependent.h:' lines.
sed -ne '2,${; s/^ *//; s/ \\*$//; s/$/:/; p;}' "$tmpdepfile" >> "$depfile"
sed -ne '2,${
s/^ *//
s/ \\*$//
s/$/:/
p
}' "$tmpdepfile" >> "$depfile"
else
echo "#dummy" > "$depfile"
fi
......@@ -399,7 +416,7 @@ dashmstdout)
# Remove the call to Libtool.
if test "$libtool" = yes; then
while test $1 != '--mode=compile'; do
while test "X$1" != 'X--mode=compile'; do
shift
done
shift
......@@ -450,32 +467,39 @@ makedepend)
"$@" || exit $?
# Remove any Libtool call
if test "$libtool" = yes; then
while test $1 != '--mode=compile'; do
while test "X$1" != 'X--mode=compile'; do
shift
done
shift
fi
# X makedepend
shift
cleared=no
for arg in "$@"; do
cleared=no eat=no
for arg
do
case $cleared in
no)
set ""; shift
cleared=yes ;;
esac
if test $eat = yes; then
eat=no
continue
fi
case "$arg" in
-D*|-I*)
set fnord "$@" "$arg"; shift ;;
# Strip any option that makedepend may not understand. Remove
# the object too, otherwise makedepend will parse it as a source file.
-arch)
eat=yes ;;
-*|$object)
;;
*)
set fnord "$@" "$arg"; shift ;;
esac
done
obj_suffix="`echo $object | sed 's/^.*\././'`"
obj_suffix=`echo "$object" | sed 's/^.*\././'`
touch "$tmpdepfile"
${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@"
rm -f "$depfile"
......@@ -495,7 +519,7 @@ cpp)
# Remove the call to Libtool.
if test "$libtool" = yes; then
while test $1 != '--mode=compile'; do
while test "X$1" != 'X--mode=compile'; do
shift
done
shift
......@@ -533,13 +557,27 @@ cpp)
msvisualcpp)
# Important note: in order to support this mode, a compiler *must*
# always write the preprocessed file to stdout, regardless of -o,
# because we must use -o when running libtool.
# always write the preprocessed file to stdout.
"$@" || exit $?
# Remove the call to Libtool.
if test "$libtool" = yes; then
while test "X$1" != 'X--mode=compile'; do
shift
done
shift
fi
IFS=" "
for arg
do
case "$arg" in
-o)
shift
;;
$object)
shift
;;