Hello again, my sourcetree looks like this projectdir/ src/ source1.c source2.c header1.h liba/ source3.c header2.h libb/ ...
The Makefile.am for the src/ dir looks like noinst_HEADERS = header1.h SUBDIRS = liba libb LDADD = \ liba/liba.a \ libb/libb.a bin_PROGRAMS = app app_SOURCES = \ source1.c \ source2.c The Makefile.am for the library dirs is lib_LIBRARIES = librtbbasic.a librtbbasic_adir = $(includedir)/librtbbasic librtbbasic_a_SOURCES = \ memmgr.c \ mprintf.c \ errormsg.c \ argvprsr.c \ str.c librtbbasic_a_HEADERS = \ memmgr.h \ mprintf.h \ errormsg.h \ inc_strg.h \ inc_pthr.h \ inc_bool.h \ gcckywrd.h \ argvprsr.h \ str.h # tests for the library LDADD = librtbbasic.a check_PROGRAMS = \ test_mprintf \ test_errormsg \ test_memmgr \ test_argvprsr \ test_str test_memmgr_SOURCES = test_memmgr.c test_mprintf_SOURCES = test_mprintf.c test_errormsg_SOURCES = test_errormsg.c test_argvprsr_SOURCES = test_argvprsr.c test_str_SOURCES = test_str.c # add test for correct failing of functions? TESTS = $(check_PROGRAMS) In the end, only the binary & manuals should be installed, no libraries. Now for the complete distcheck output: > make distcheck { test ! -d phd-0.1 || { find phd-0.1 -type d ! -perm -200 -exec chmod u+w {} ';' && rm -fr phd-0.1; }; } test -d phd-0.1 || mkdir phd-0.1 list='src share '; for subdir in $list; do \ if test "$subdir" = .; then :; else \ test -d "phd-0.1/$subdir" \ || /bin/mkdir -p "phd-0.1/$subdir" \ || exit 1; \ distdir=`CDPATH="${ZSH_VERSION+.}:" && cd phd-0.1 && pwd`; \ top_distdir=`CDPATH="${ZSH_VERSION+.}:" && cd phd-0.1 && pwd`; \ (cd $subdir && \ make \ top_distdir="$top_distdir" \ distdir="$distdir/$subdir" \ am__remove_distdir=: \ am__skip_length_check=: \ distdir) \ || exit 1; \ fi; \ done make[1]: Entering directory `/home/zbh/projects/phd/recode/usr/src' list='librtbfallback librtbbasic'; for subdir in $list; do \ if test "$subdir" = .; then :; else \ test -d "/home/zbh/projects/phd/recode/usr/phd-0.1/src/$subdir" \ || /bin/mkdir -p "/home/zbh/projects/phd/recode/usr/phd-0.1/src/$subdir" \ || exit 1; \ distdir=`CDPATH="${ZSH_VERSION+.}:" && cd /home/zbh/projects/phd/recode/usr/phd-0.1/src && pwd`; \ top_distdir=`CDPATH="${ZSH_VERSION+.}:" && cd /home/zbh/projects/phd/recode/usr/phd-0.1 && pwd`; \ (cd $subdir && \ make \ top_distdir="$top_distdir" \ distdir="$distdir/$subdir" \ am__remove_distdir=: \ am__skip_length_check=: \ distdir) \ || exit 1; \ fi; \ done make[2]: Entering directory `/home/zbh/projects/phd/recode/usr/src/librtbfallback' make[2]: Leaving directory `/home/zbh/projects/phd/recode/usr/src/librtbfallback' make[2]: Entering directory `/home/zbh/projects/phd/recode/usr/src/librtbbasic' make[2]: Leaving directory `/home/zbh/projects/phd/recode/usr/src/librtbbasic' make[1]: Leaving directory `/home/zbh/projects/phd/recode/usr/src' make[1]: Entering directory `/home/zbh/projects/phd/recode/usr/share' list='misc '; for subdir in $list; do \ if test "$subdir" = .; then :; else \ test -d "/home/zbh/projects/phd/recode/usr/phd-0.1/share/$subdir" \ || /bin/mkdir -p "/home/zbh/projects/phd/recode/usr/phd-0.1/share/$subdir" \ || exit 1; \ distdir=`CDPATH="${ZSH_VERSION+.}:" && cd /home/zbh/projects/phd/recode/usr/phd-0.1/share && pwd`; \ top_distdir=`CDPATH="${ZSH_VERSION+.}:" && cd /home/zbh/projects/phd/recode/usr/phd-0.1 && pwd`; \ (cd $subdir && \ make \ top_distdir="$top_distdir" \ distdir="$distdir/$subdir" \ am__remove_distdir=: \ am__skip_length_check=: \ distdir) \ || exit 1; \ fi; \ done make[2]: Entering directory `/home/zbh/projects/phd/recode/usr/share/misc' list='emacs'; for subdir in $list; do \ if test "$subdir" = .; then :; else \ test -d "/home/zbh/projects/phd/recode/usr/phd-0.1/share/misc/$subdir" \ || /bin/mkdir -p "/home/zbh/projects/phd/recode/usr/phd-0.1/share/misc/$subdir" \ || exit 1; \ distdir=`CDPATH="${ZSH_VERSION+.}:" && cd /home/zbh/projects/phd/recode/usr/phd-0.1/share/misc && pwd`; \ top_distdir=`CDPATH="${ZSH_VERSION+.}:" && cd /home/zbh/projects/phd/recode/usr/phd-0.1 && pwd`; \ (cd $subdir && \ make \ top_distdir="$top_distdir" \ distdir="$distdir/$subdir" \ am__remove_distdir=: \ am__skip_length_check=: \ distdir) \ || exit 1; \ fi; \ done make[3]: Entering directory `/home/zbh/projects/phd/recode/usr/share/misc/emacs' make[3]: Leaving directory `/home/zbh/projects/phd/recode/usr/share/misc/emacs' make[2]: Leaving directory `/home/zbh/projects/phd/recode/usr/share/misc' make[1]: Leaving directory `/home/zbh/projects/phd/recode/usr/share' find phd-0.1 -type d ! -perm -777 -exec chmod a+rwx {} \; -o \ ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \ ! -type d ! -perm -400 -exec chmod a+r {} \; -o \ ! -type d ! -perm -444 -exec /bin/sh /home/zbh/projects/phd/recode/usr/share/misc/config/install-sh -c -m a+r {} {} \; \ || chmod -R a+r phd-0.1 tardir=phd-0.1 && /bin/sh /home/zbh/projects/phd/recode/usr/share/misc/config/missing --run tar chof - "$tardir" | GZIP=--best gzip -c >phd-0.1.tar.gz { test ! -d phd-0.1 || { find phd-0.1 -type d ! -perm -200 -exec chmod u+w {} ';' && rm -fr phd-0.1; }; } case 'phd-0.1.tar.gz' in \ *.tar.gz*) \ GZIP=--best gunzip -c phd-0.1.tar.gz | /bin/sh /home/zbh/projects/phd/recode/usr/share/misc/config/missing --run tar xf - ;;\ *.tar.bz2*) \ bunzip2 -c phd-0.1.tar.bz2 | /bin/sh /home/zbh/projects/phd/recode/usr/share/misc/config/missing --run tar xf - ;;\ *.tar.Z*) \ uncompress -c phd-0.1.tar.Z | /bin/sh /home/zbh/projects/phd/recode/usr/share/misc/config/missing --run tar xf - ;;\ *.shar.gz*) \ GZIP=--best gunzip -c phd-0.1.shar.gz | unshar ;;\ *.zip*) \ unzip phd-0.1.zip ;;\ esac chmod -R a-w phd-0.1; chmod a+w phd-0.1 mkdir phd-0.1/_build mkdir phd-0.1/_inst chmod a-w phd-0.1 dc_install_base=`CDPATH="${ZSH_VERSION+.}:" && cd phd-0.1/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ && dc_destdir="${TMPDIR-/tmp}/am-dc-$$/" \ && cd phd-0.1/_build \ && ../configure --srcdir=.. --prefix="$dc_install_base" \ \ && make \ && make dvi \ && make check \ && make install \ && make installcheck \ && make uninstall \ && make distuninstallcheck_dir="$dc_install_base" \ distuninstallcheck \ && chmod -R a-w "$dc_install_base" \ && ({ \ (cd ../.. && umask 077 && mkdir "$dc_destdir") \ && make DESTDIR="$dc_destdir" install \ && make DESTDIR="$dc_destdir" uninstall \ && make DESTDIR="$dc_destdir" \ distuninstallcheck_dir="$dc_destdir" distuninstallcheck; \ } || { rm -rf "$dc_destdir"; exit 1; }) \ && rm -rf "$dc_destdir" \ && make dist \ && rm -rf phd-0.1.tar.gz \ && make distcleancheck checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for a thread-safe mkdir -p... /bin/mkdir -p checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for emacs... emacs checking where .elc files should go... ${datarootdir}/emacs/site-lisp checking for gcc... gcc checking for C compiler default output file name... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ISO C89... none needed checking for style of include used by make... GNU checking dependency style of gcc... gcc3 checking for ranlib... ranlib checking for a BSD-compatible install... /usr/bin/install -c checking whether make sets $(MAKE)... (cached) yes checking whether to build development environment... no checking whether to enable memory checking... no checking whether to enable assertions... yes checking how to run the C preprocessor... gcc -E checking for grep that handles long lines and -e... /bin/grep checking for egrep... /bin/grep -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking for limits.h... yes checking for stddef.h... yes checking for stdbool.h that conforms to C99... yes checking for _Bool... yes checking for stdint.h... (cached) yes checking for SIZE_MAX... yes checking whether to check for POSIX threads... no checking for an ANSI C-conforming const... yes checking for size_t... yes checking for stdlib.h... (cached) yes checking for GNU libc compatible malloc... yes checking for stdlib.h... (cached) yes checking for GNU libc compatible realloc... yes checking for snprintf... yes checking for memchr... yes checking for memset... yes checking for strchr... yes checking for vprintf... yes checking for vfprintf... yes checking for strerror... yes configure: creating ./config.status config.status: creating Makefile config.status: creating src/Makefile config.status: creating src/librtbfallback/Makefile config.status: creating src/librtbbasic/Makefile config.status: creating share/Makefile config.status: creating share/misc/Makefile config.status: creating share/misc/emacs/Makefile config.status: creating src/config.h config.status: executing depfiles commands make[1]: Entering directory `/home/zbh/projects/phd/recode/usr/phd-0.1/_build' Making all in src make[2]: Entering directory `/home/zbh/projects/phd/recode/usr/phd-0.1/_build/src' make all-recursive make[3]: Entering directory `/home/zbh/projects/phd/recode/usr/phd-0.1/_build/src' Making all in librtbfallback make[4]: Entering directory `/home/zbh/projects/phd/recode/usr/phd-0.1/_build/src/librtbfallback' gcc -DHAVE_CONFIG_H -I. -I../../src -I../../../src/librtbfallback -g -O2 -Werror -Wextra -Winit-self -Wformat=2 -Wall -Wcast-qual -std=c99 -pedantic -Wstrict-prototypes -Wundef -Wshadow -Wcast-align -Wsign-compare -Wnested-externs -Winline -Wmissing-include-dirs -Wdeclaration-after-statement -Wundef -Wshadow -Wbad-function-cast -MT dummy.o -MD -MP -MF .deps/dummy.Tpo -c -o dummy.o ../../../src/librtbfallback/dummy.c mv -f .deps/dummy.Tpo .deps/dummy.Po rm -f librtbfallback.a ar cru librtbfallback.a dummy.o ranlib librtbfallback.a make[4]: Leaving directory `/home/zbh/projects/phd/recode/usr/phd-0.1/_build/src/librtbfallback' Making all in librtbbasic make[4]: Entering directory `/home/zbh/projects/phd/recode/usr/phd-0.1/_build/src/librtbbasic' gcc -DHAVE_CONFIG_H -I. -I../../src -I../../../src/librtbbasic -g -O2 -Werror -Wextra -Winit-self -Wformat=2 -Wall -Wcast-qual -std=c99 -pedantic -Wstrict-prototypes -Wundef -Wshadow -Wcast-align -Wsign-compare -Wnested-externs -Winline -Wmissing-include-dirs -Wdeclaration-after-statement -Wundef -Wshadow -Wbad-function-cast -MT memmgr.o -MD -MP -MF .deps/memmgr.Tpo -c -o memmgr.o ../../../src/librtbbasic/memmgr.c ../../../src/librtbbasic/memmgr.c:31:21: error: inc_cfg.h: No such file or directory ../../../src/librtbbasic/memmgr.c:35:34: error: librtbbasic/inc_bool.h: No such file or directory ../../../src/librtbbasic/memmgr.c:36:34: error: librtbbasic/inc_pthr.h: No such file or directory ../../../src/librtbbasic/memmgr.c:37:34: error: librtbbasic/inc_strg.h: No such file or directory ../../../src/librtbbasic/memmgr.c:38:33: error: librtbbasic/mprintf.h: No such file or directory ../../../src/librtbbasic/memmgr.c:39:34: error: librtbbasic/errormsg.h: No such file or directory ../../../src/librtbbasic/memmgr.c:40:34: error: librtbbasic/gcckywrd.h: No such file or directory ../../../src/librtbbasic/memmgr.c:41:32: error: librtbbasic/memmgr.h: No such file or directory cc1: warnings being treated as errors ../../../src/librtbbasic/memmgr.c: In function âmblist_delete_blockâ: ../../../src/librtbbasic/memmgr.c:165: warning: implicit declaration of function âxfreeâ ../../../src/librtbbasic/memmgr.c:165: warning: nested extern declaration of âxfreeâ ../../../src/librtbbasic/memmgr.c:176: warning: implicit declaration of function âTHROW_WARN_MSGâ ../../../src/librtbbasic/memmgr.c:176: warning: nested extern declaration of âTHROW_WARN_MSGâ ../../../src/librtbbasic/memmgr.c: In function âmblist_add_blockâ: ../../../src/librtbbasic/memmgr.c:205: warning: implicit declaration of function âxreallocâ ../../../src/librtbbasic/memmgr.c:205: warning: nested extern declaration of âxreallocâ ../../../src/librtbbasic/memmgr.c:209: warning: assignment makes pointer from integer without a cast ../../../src/librtbbasic/memmgr.c:212: warning: implicit declaration of function âTHROW_ERROR_MSGâ ../../../src/librtbbasic/memmgr.c:212: warning: nested extern declaration of âTHROW_ERROR_MSGâ ../../../src/librtbbasic/memmgr.c:214: error: âERR_MM_ALLOCâ undeclared (first use in this function) ../../../src/librtbbasic/memmgr.c:214: error: (Each undeclared identifier is reported only once ../../../src/librtbbasic/memmgr.c:214: error: for each function it appears in.) ../../../src/librtbbasic/memmgr.c:226: warning: implicit declaration of function âxmallocâ ../../../src/librtbbasic/memmgr.c:226: warning: nested extern declaration of âxmallocâ ../../../src/librtbbasic/memmgr.c:226: warning: implicit declaration of function âstrlenâ ../../../src/librtbbasic/memmgr.c:226: warning: incompatible implicit declaration of built-in function âstrlenâ ../../../src/librtbbasic/memmgr.c:226: warning: assignment makes pointer from integer without a cast ../../../src/librtbbasic/memmgr.c:227: warning: implicit declaration of function âstrcpyâ ../../../src/librtbbasic/memmgr.c:227: warning: incompatible implicit declaration of built-in function âstrcpyâ ../../../src/librtbbasic/memmgr.c: In function âmm_sys_add_blockâ: ../../../src/librtbbasic/memmgr.c:263: warning: implicit declaration of function âcall_warn_msgrâ ../../../src/librtbbasic/memmgr.c:263: warning: nested extern declaration of âcall_warn_msgrâ ../../../src/librtbbasic/memmgr.c:273: warning: assignment makes pointer from integer without a cast ../../../src/librtbbasic/memmgr.c:278: error: âERR_MM_ALLOCâ undeclared (first use in this function) ../../../src/librtbbasic/memmgr.c: At top level: ../../../src/librtbbasic/memmgr.c:387: error: conflicting types for âxmallocâ ../../../src/librtbbasic/memmgr.c:226: error: previous implicit declaration of âxmallocâ was here ../../../src/librtbbasic/memmgr.c: In function âxmallocâ: ../../../src/librtbbasic/memmgr.c:398: warning: implicit declaration of function âcall_error_msgrâ ../../../src/librtbbasic/memmgr.c:398: warning: nested extern declaration of âcall_error_msgrâ ../../../src/librtbbasic/memmgr.c: In function âchecked_xmallocâ: ../../../src/librtbbasic/memmgr.c:439: error: âERR_MM_ALLOCâ undeclared (first use in this function) ../../../src/librtbbasic/memmgr.c: At top level: ../../../src/librtbbasic/memmgr.c:473: error: conflicting types for âxreallocâ ../../../src/librtbbasic/memmgr.c:205: error: previous implicit declaration of âxreallocâ was here ../../../src/librtbbasic/memmgr.c: In function âchecked_xreallocâ: ../../../src/librtbbasic/memmgr.c:532: warning: implicit declaration of function âXFREEâ ../../../src/librtbbasic/memmgr.c:532: warning: nested extern declaration of âXFREEâ ../../../src/librtbbasic/memmgr.c: At top level: ../../../src/librtbbasic/memmgr.c:662: warning: conflicting types for âxfreeâ ../../../src/librtbbasic/memmgr.c:165: warning: previous implicit declaration of âxfreeâ was here make[4]: *** [memmgr.o] Error 1 make[4]: Leaving directory `/home/zbh/projects/phd/recode/usr/phd-0.1/_build/src/librtbbasic' make[3]: *** [all-recursive] Error 1 make[3]: Leaving directory `/home/zbh/projects/phd/recode/usr/phd-0.1/_build/src' make[2]: *** [all] Error 2 make[2]: Leaving directory `/home/zbh/projects/phd/recode/usr/phd-0.1/_build/src' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/home/zbh/projects/phd/recode/usr/phd-0.1/_build' make: *** [distcheck] Error 2 greetings, Stefan