Update to makedepend 1.0.3. No functional change.

This commit is contained in:
matthieu 2010-10-31 16:58:47 +00:00
parent 8fe31817e3
commit 2d85ef3fd1
9 changed files with 1481 additions and 537 deletions

View File

@ -1,3 +1,57 @@
commit e67389ecc0c425bcfec0a3184ee48919e0e2c61a
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date: Fri Oct 29 22:45:35 2010 -0700
makedepend 1.0.3
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
commit bf25a6cb4888e5cf6827cd51cb7ee282cfb6cf47
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date: Fri Oct 29 22:39:51 2010 -0700
config: upgrade to util-macros 1.8 for additional man page support
Use MAN_SUBST now supplied in XORG_MANPAGE_SECTIONS
The value of MAN_SUBST is the same for all X.Org packages.
Use AC_PROG_SED now supplied by XORG_DEFAULT_OPTIONS
Enables use of platform appropriate version of sed.
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
commit 7963cc382a3a351410b1342a9783df3af8516944
Author: Gaetan Nadon <memsize@videotron.ca>
Date: Tue Jul 20 18:45:18 2010 -0400
config: update AC_PREREQ statement to 2.60
Unrelated to the previous patches, the new value simply reflects
the reality that the minimum level for autoconf to configure
all x.org modules is 2.60 dated June 2006.
ftp://ftp.gnu.org/gnu/autoconf/autoconf-2.60.tar.gz
Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
commit 58bd34e6c3662ef06e9ef0dd78d69f003df42bdc
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date: Fri May 14 21:14:44 2010 -0700
Convert testcase from bug 28045 into automake "make check" test
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
commit 8522c314da7537169996476fe5ba411f720a09fe
Author: Martin Pärtel <lagitus@mbnet.fi>
Date: Fri May 14 21:00:15 2010 -0700
Bug 28045 - makedepend fails on directory named like an include file
<https://bugs.freedesktop.org/show_bug.cgi?id=28045>
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
commit c976a7fc7c21772c00de9e61178cf467c6a10b57
Author: Alan Coopersmith <alan.coopersmith@sun.com>
Date: Sat Oct 10 22:08:09 2009 -0700

View File

@ -26,24 +26,8 @@ appman_DATA = $(appman_PRE:man=@APP_MAN_SUFFIX@)
CLEANFILES = $(appman_DATA)
SED = sed
# Strings to replace in man pages
XORGRELSTRING = @PACKAGE_STRING@
XORGMANNAME = X Version 11
MAN_SUBSTS = \
-e 's|__vendorversion__|"$(XORGRELSTRING)" "$(XORGMANNAME)"|' \
-e 's|__xorgversion__|"$(XORGRELSTRING)" "$(XORGMANNAME)"|' \
-e 's|__xservername__|Xorg|g' \
-e 's|__xconfigfile__|xorg.conf|g' \
-e 's|__projectroot__|$(prefix)|g' \
-e 's|__apploaddir__|$(appdefaultdir)|' \
-e 's|__appmansuffix__|$(APP_MAN_SUFFIX)|g' \
-e 's|__libmansuffix__|$(LIB_MAN_SUFFIX)|g' \
-e 's|__adminmansuffix__|$(ADMIN_MAN_SUFFIX)|g' \
-e 's|__miscmansuffix__|$(MISC_MAN_SUFFIX)|g' \
-e 's|__filemansuffix__|$(FILE_MAN_SUFFIX)|g' \
# String replacements in MAN_SUBSTS now come from xorg-macros.m4 via configure
MAN_SUBSTS += \
-e 's|__cpp__|$(RAWCPP)|g'
SUFFIXES = .$(APP_MAN_SUFFIX) .man
@ -68,3 +52,23 @@ ALL_LINT_FLAGS=$(LINT_FLAGS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
lint:
$(LINT) $(ALL_LINT_FLAGS) $(makedepend_SOURCES)
endif LINT
### Test cases - mostly for bug fixes submitted with a test case so far
TESTS =
# Absolute path to srcdir & builddir top that test scripts can reference
TEST_BUILDDIR_PATH = `cd $(top_builddir) && pwd`
TEST_SRCDIR_PATH = `cd $(top_srcdir) && pwd`
# Path to makedepend command being tested that can be found from test subdirs
TESTS_ENVIRONMENT = MAKEDEPEND="$(TEST_BUILDDIR_PATH)/makedepend"
# Path to writable testdirectory in build directory
TESTS_ENVIRONMENT += test_builddir="$(TEST_BUILDDIR_PATH)/tests"
# Path to testcase files in source directory
TESTS_ENVIRONMENT += test_srcdir="$(TEST_SRCDIR_PATH)/tests"
# Test for https://bugs.freedesktop.org/show_bug.cgi?id=28045
TESTS += tests/28045/makedep.sh
EXTRA_DIST += tests/28045/makedep.sh tests/28045/foo.cpp

View File

@ -89,12 +89,14 @@ am__remove_distdir = \
DIST_ARCHIVES = $(distdir).tar.gz $(distdir).tar.bz2
GZIP_ENV = --best
distuninstallcheck_listfiles = find . -type f -print
distcleancheck_listfiles = find . -type f -print
ACLOCAL = @ACLOCAL@
ADMIN_MAN_DIR = @ADMIN_MAN_DIR@
ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@
AMDEP_FALSE = @AMDEP_FALSE@
AMDEP_TRUE = @AMDEP_TRUE@
AMTAR = @AMTAR@
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
APP_MAN_DIR = @APP_MAN_DIR@
APP_MAN_SUFFIX = @APP_MAN_SUFFIX@
AUTOCONF = @AUTOCONF@
@ -121,6 +123,7 @@ EXEEXT = @EXEEXT@
FILE_MAN_DIR = @FILE_MAN_DIR@
FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@
GREP = @GREP@
INSTALL_CMD = @INSTALL_CMD@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
@ -136,6 +139,9 @@ LINT_FLAGS = @LINT_FLAGS@
LINT_TRUE = @LINT_TRUE@
LTLIBOBJS = @LTLIBOBJS@
MAKEINFO = @MAKEINFO@
# String replacements in MAN_SUBSTS now come from xorg-macros.m4 via configure
MAN_SUBSTS = @MAN_SUBSTS@ -e 's|__cpp__|$(RAWCPP)|g'
MISC_MAN_DIR = @MISC_MAN_DIR@
MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@
OBJEXT = @OBJEXT@
@ -147,10 +153,12 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
PKG_CONFIG = @PKG_CONFIG@
SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
VERSION = @VERSION@
XORG_MAN_PAGE = @XORG_MAN_PAGE@
X_CFLAGS = @X_CFLAGS@
X_LIBS = @X_LIBS@
ac_ct_CC = @ac_ct_CC@
@ -169,7 +177,6 @@ build_os = @build_os@
build_vendor = @build_vendor@
datadir = @datadir@
datarootdir = @datarootdir@
distcleancheck_listfiles = @distcleancheck_listfiles@
docdir = @docdir@
dvidir = @dvidir@
exec_prefix = @exec_prefix@
@ -210,37 +217,37 @@ makedepend_SOURCES = include.c \
AM_CPPFLAGS = -DOBJSUFFIX=\".${OBJEXT}\" -DINCLUDEDIR=\"/usr/include\"
AM_CFLAGS = $(CWARNFLAGS)
EXTRA_DIST = autogen.sh makedepend.man ChangeLog
EXTRA_DIST = autogen.sh makedepend.man ChangeLog \
tests/28045/makedep.sh tests/28045/foo.cpp
# Man page
appmandir = $(APP_MAN_DIR)
appman_PRE = makedepend.man
appman_DATA = $(appman_PRE:man=@APP_MAN_SUFFIX@)
CLEANFILES = $(appman_DATA)
SED = sed
# Strings to replace in man pages
XORGRELSTRING = @PACKAGE_STRING@
XORGMANNAME = X Version 11
MAN_SUBSTS = \
-e 's|__vendorversion__|"$(XORGRELSTRING)" "$(XORGMANNAME)"|' \
-e 's|__xorgversion__|"$(XORGRELSTRING)" "$(XORGMANNAME)"|' \
-e 's|__xservername__|Xorg|g' \
-e 's|__xconfigfile__|xorg.conf|g' \
-e 's|__projectroot__|$(prefix)|g' \
-e 's|__apploaddir__|$(appdefaultdir)|' \
-e 's|__appmansuffix__|$(APP_MAN_SUFFIX)|g' \
-e 's|__libmansuffix__|$(LIB_MAN_SUFFIX)|g' \
-e 's|__adminmansuffix__|$(ADMIN_MAN_SUFFIX)|g' \
-e 's|__miscmansuffix__|$(MISC_MAN_SUFFIX)|g' \
-e 's|__filemansuffix__|$(FILE_MAN_SUFFIX)|g' \
-e 's|__cpp__|$(RAWCPP)|g'
SUFFIXES = .$(APP_MAN_SUFFIX) .man
MAINTAINERCLEANFILES = ChangeLog
@LINT_TRUE@ALL_LINT_FLAGS = $(LINT_FLAGS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
@LINT_TRUE@ $(AM_CPPFLAGS) $(CPPFLAGS)
### Test cases - mostly for bug fixes submitted with a test case so far
# Test for https://bugs.freedesktop.org/show_bug.cgi?id=28045
TESTS = tests/28045/makedep.sh
# Absolute path to srcdir & builddir top that test scripts can reference
TEST_BUILDDIR_PATH = `cd $(top_builddir) && pwd`
TEST_SRCDIR_PATH = `cd $(top_srcdir) && pwd`
# Path to makedepend command being tested that can be found from test subdirs
# Path to writable testdirectory in build directory
# Path to testcase files in source directory
TESTS_ENVIRONMENT = MAKEDEPEND="$(TEST_BUILDDIR_PATH)/makedepend" \
test_builddir="$(TEST_BUILDDIR_PATH)/tests" \
test_srcdir="$(TEST_SRCDIR_PATH)/tests"
all: makedepend-config.h
$(MAKE) $(AM_MAKEFLAGS) all-am
@ -416,9 +423,83 @@ GTAGS:
distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
check-TESTS: $(TESTS)
@failed=0; all=0; xfail=0; xpass=0; skip=0; \
srcdir=$(srcdir); export srcdir; \
list='$(TESTS)'; \
if test -n "$$list"; then \
for tst in $$list; do \
if test -f ./$$tst; then dir=./; \
elif test -f $$tst; then dir=; \
else dir="$(srcdir)/"; fi; \
if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \
all=`expr $$all + 1`; \
case " $(XFAIL_TESTS) " in \
*" $$tst "*) \
xpass=`expr $$xpass + 1`; \
failed=`expr $$failed + 1`; \
echo "XPASS: $$tst"; \
;; \
*) \
echo "PASS: $$tst"; \
;; \
esac; \
elif test $$? -ne 77; then \
all=`expr $$all + 1`; \
case " $(XFAIL_TESTS) " in \
*" $$tst "*) \
xfail=`expr $$xfail + 1`; \
echo "XFAIL: $$tst"; \
;; \
*) \
failed=`expr $$failed + 1`; \
echo "FAIL: $$tst"; \
;; \
esac; \
else \
skip=`expr $$skip + 1`; \
echo "SKIP: $$tst"; \
fi; \
done; \
if test "$$failed" -eq 0; then \
if test "$$xfail" -eq 0; then \
banner="All $$all tests passed"; \
else \
banner="All $$all tests behaved as expected ($$xfail expected failures)"; \
fi; \
else \
if test "$$xpass" -eq 0; then \
banner="$$failed of $$all tests failed"; \
else \
banner="$$failed of $$all tests did not behave as expected ($$xpass unexpected passes)"; \
fi; \
fi; \
dashes="$$banner"; \
skipped=""; \
if test "$$skip" -ne 0; then \
skipped="($$skip tests were not run)"; \
test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \
dashes="$$skipped"; \
fi; \
report=""; \
if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \
report="Please report to $(PACKAGE_BUGREPORT)"; \
test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \
dashes="$$report"; \
fi; \
dashes=`echo "$$dashes" | sed s/./=/g`; \
echo "$$dashes"; \
echo "$$banner"; \
test -z "$$skipped" || echo "$$skipped"; \
test -z "$$report" || echo "$$report"; \
echo "$$dashes"; \
test "$$failed" -eq 0; \
else :; fi
distdir: $(DISTFILES)
$(am__remove_distdir)
mkdir $(distdir)
$(mkdir_p) $(distdir)/tests/28045
@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
list='$(DISTFILES)'; for file in $$list; do \
@ -546,6 +627,7 @@ distcleancheck: distclean
$(distcleancheck_listfiles) ; \
exit 1; } >&2
check-am: all-am
$(MAKE) $(AM_MAKEFLAGS) check-TESTS
check: check-am
all-am: Makefile $(PROGRAMS) $(DATA) makedepend-config.h
installdirs:
@ -631,16 +713,16 @@ ps-am:
uninstall-am: uninstall-appmanDATA uninstall-binPROGRAMS \
uninstall-info-am
.PHONY: CTAGS GTAGS all all-am am--refresh check check-am clean \
clean-binPROGRAMS clean-generic ctags dist dist-all dist-bzip2 \
dist-gzip dist-hook dist-shar dist-tarZ dist-zip distcheck \
distclean distclean-compile distclean-generic distclean-hdr \
distclean-tags distcleancheck distdir distuninstallcheck dvi \
dvi-am html html-am info info-am install install-am \
install-appmanDATA install-binPROGRAMS install-data \
install-data-am install-exec install-exec-am install-info \
install-info-am install-man install-strip installcheck \
installcheck-am installdirs maintainer-clean \
.PHONY: CTAGS GTAGS all all-am am--refresh check check-TESTS check-am \
clean clean-binPROGRAMS clean-generic ctags dist dist-all \
dist-bzip2 dist-gzip dist-hook dist-shar dist-tarZ dist-zip \
distcheck distclean distclean-compile distclean-generic \
distclean-hdr distclean-tags distcleancheck distdir \
distuninstallcheck dvi dvi-am html html-am info info-am \
install install-am install-appmanDATA install-binPROGRAMS \
install-data install-data-am install-exec install-exec-am \
install-info install-info-am install-man install-strip \
installcheck installcheck-am installdirs maintainer-clean \
maintainer-clean-generic mostlyclean mostlyclean-compile \
mostlyclean-generic pdf pdf-am ps ps-am tags uninstall \
uninstall-am uninstall-appmanDATA uninstall-binPROGRAMS \

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1,12 +1,13 @@
AC_PREREQ([2.57])
AC_INIT([makedepend], [1.0.2], [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg])
AC_PREREQ([2.60])
AC_INIT([makedepend], [1.0.3],
[https://bugs.freedesktop.org/enter_bug.cgi?product=xorg])
AM_INIT_AUTOMAKE([foreign dist-bzip2])
AM_CONFIG_HEADER(makedepend-config.h)
AM_CONFIG_HEADER([makedepend-config.h])
# Require xorg-macros 1.3 or later: XORG_DEFAULT_OPTIONS, XORG_WITH_LINT
# Require X.Org macros 1.8 or later for MAN_SUBSTS set by XORG_MANPAGE_SECTIONS
m4_ifndef([XORG_MACROS_VERSION],
[m4_fatal([must install xorg-macros 1.3 or later before running autoconf/autogen])])
XORG_MACROS_VERSION(1.3)
[m4_fatal([must install xorg-macros 1.8 or later before running autoconf/autogen])])
XORG_MACROS_VERSION(1.8)
dnl Checks for programs.
AC_PROG_CC

View File

@ -264,7 +264,7 @@ inc_path(const char *file, const char *include, int type)
if ((type == INCLUDEDOT) ||
(type == INCLUDENEXTDOT) ||
(*include == '/')) {
if (stat(include, &st) == 0)
if (stat(include, &st) == 0 && !S_ISDIR(st.st_mode))
return newinclude(include, include);
if (show_where_not)
warning1("\tnot in %s\n", include);
@ -286,7 +286,7 @@ inc_path(const char *file, const char *include, int type)
strcpy(path + (p-file) + 1, include);
}
remove_dotdot(path);
if (stat(path, &st) == 0)
if (stat(path, &st) == 0 && !S_ISDIR(st.st_mode))
return newinclude(path, include);
if (show_where_not)
warning1("\tnot in %s\n", path);
@ -304,7 +304,7 @@ inc_path(const char *file, const char *include, int type)
for (; *pp; pp++) {
sprintf(path, "%s/%s", *pp, include);
remove_dotdot(path);
if (stat(path, &st) == 0) {
if (stat(path, &st) == 0 && !S_ISDIR(st.st_mode)) {
includedirsnext = pp + 1;
return newinclude(path, include);
}

View File

@ -0,0 +1,2 @@
#include <one>

View File

@ -0,0 +1,28 @@
#!/bin/sh
# Test case from https://bugs.freedesktop.org/show_bug.cgi?id=28045
# modified to work with automake test framework
set -e
if [ "x$MAKEDEPEND" == "x" ]; then
MAKEDEPEND=makedepend
fi
mkdir -p ${test_builddir}/28045
cd ${test_builddir}/28045
# Create test conditions:
# - directory named "one"
# - directory named "two" containing empty file named "one"
mkdir one two
touch two/one
# Happens to work before fix for 28045
$MAKEDEPEND -f- -- -Itwo -Ione -I. -- ${test_srcdir}/28045/foo.cpp > /dev/null
# Happens to fail before fix for 28045
$MAKEDEPEND -f- -- -I. -Ione -Itwo -- ${test_srcdir}/28045/foo.cpp > /dev/null
# Clean up
rm -rf one two