Changeset 1440 for trunk


Ignore:
Timestamp:
Dec 20, 2011, 5:50:31 AM (9 years ago)
Author:
Peter Johansson
Message:

add new make target syntax-check

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Makefile.am

    r1392 r1440  
    3131  cd test && $(MAKE) $(AM_MAKEFLAGS) $@
    3232
    33 clean-local: 
     33clean-local:
    3434  rm -rf svndigest *~
    3535
     
    3737
    3838## need to declare these variables here so they can be appended below
    39 BUILT_SOURCES = 
    40 CLEANFILES = 
    41 CONFIG_STATUS_DEPENDENCIES = 
     39BUILT_SOURCES =
     40CLEANFILES =
     41CONFIG_STATUS_DEPENDENCIES =
    4242DISTCLEANFILES =
    43 EXTRA_DIST = 
     43EXTRA_DIST =
    4444
    4545include $(top_srcdir)/svn_revision.am
     
    9191  svn revert -R build_support/macport
    9292  svn update build_support/macport
    93   cp build_support/Portfile build_support/macport/Portfile 
     93  cp build_support/Portfile build_support/macport/Portfile
    9494  svn diff build_support/macport/Portfile > $@
    9595  svn revert build_support/macport/Portfile
     
    119119  ^/branches/$(SVNDIGEST_MAJOR_VERSION).$(SVNDIGEST_MINOR_VERSION)-stable\
    120120  ^/tags/$(VERSION) -m "tagging version $(VERSION)"
     121
     122syntax-check: assert-header-without-use \
     123  assert-without-header \
     124  errno-header-without-use
     125
     126assert-header-without-use:
     127  @files=`grep -l "^#include *<cassert>" $(srcdir)/*/*.cc`;\
     128  grep -L "assert *(" $$files | grep $(srcdir) && \
     129  { echo "$@: in files listed above"; exit 1; } || :;
     130
     131assert-without-header:
     132  @files=`grep -l "assert *(" $(srcdir)/*/*.cc`;\
     133  grep -L "^#include *<cassert>" $$files | grep $(srcdir) && \
     134  { echo "$@: in files listed above"; exit 1; } || :;
     135
     136errno-header-without-use:
     137  files=`grep -l "^#include *<cerrno>" $(srcdir)/*/*.cc`;\
     138  test -n "$$files" || exit 0;\
     139  grep -LE "[^ \t\(=]errno" $$files | grep $(srcdir) && \
     140  { echo "$@: in files listed above"; exit 1; } || :;
     141
Note: See TracChangeset for help on using the changeset viewer.