Changeset 42b03d10ecdcd1e9abbb73f32aa6d5bfb942eea3

Show
Ignore:
Timestamp:
24/01/08 18:53:34 (9 months ago)
Author:
Rémi Denis-Courmont <rem@videolan.org>
git-committer:
Rémi Denis-Courmont <rem@videolan.org> 1201197214 +0000
git-parent:

[b6bfe74a6bc5bd19ed26a043a4c6a4b4e590ea9e]

git-author:
Rémi Denis-Courmont <rem@videolan.org> 1201197214 +0000
Message:

Add sanity check for public headers

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • src/Makefile.am

    ra3597a0 r42b03d1  
    372372# Unit/regression test 
    373373############################################################################### 
    374 check_PROGRAMS = test_i18n_atof test_url test_utf8 test_control 
    375 dist_check_SCRIPTS = check_symbols 
     374check_PROGRAMS = \ 
     375    test_i18n_atof \ 
     376    test_url \ 
     377    test_utf8 \ 
     378    test_headers \ 
     379    test_control \ 
     380    $(NULL) 
     381 
     382dist_check_SCRIPTS = check_symbols check_headers 
    376383TESTS = $(check_PROGRAMS) $(dist_check_SCRIPTS) 
    377384 
     
    389396test_utf8_CFLAGS = $(CFLAGS_tests) 
    390397 
     398test_headers_SOURCES = test/headers.c 
     399test_headers_CFLAGS = $(CFLAGS_tests) 
     400 
    391401test_control_SOURCES = control/testapi.c 
    392402test_control_LDADD = libvlc-control.la 
    393403test_control_CFLAGS = $(CFLAGS_tests) 
    394404 
     405check-local: 
     406    for h in `echo $(dist_pkginclude_HEADERS) $(pkginclude_HEADERS) | sed -e s,\.\./include/,,g`; \ 
     407    do \ 
     408        echo grep - "#include <$$h>" $(srcdir)/test/headers.c ; \ 
     409        if ! grep -- "#include <$$h>" $(srcdir)/test/headers.c ; \ 
     410        then \ 
     411            echo "Header $$h not included in test/headers.c!"; \ 
     412            exit 1; \ 
     413        fi ; \ 
     414    done 
     415 
    395416FORCE: 
    396417    @echo "Generated source cannot be phony. Go away." >&2