~ubuntu-branches/ubuntu/raring/octave-pkg-dev/raring

« back to all changes in this revision

Viewing changes to octave-pkg.mk.in

  • Committer: Bazaar Package Importer
  • Author(s): Thomas Weber
  • Date: 2011-02-20 20:40:18 UTC
  • Revision ID: james.westby@ubuntu.com-20110220204018-aalloxtdoiiamccm
Tags: 0.7.4
* Bump Standards-Version to 3.9.1, no changes needed
* Search for tests in .cc files and execute them.
* Switch to dpkg-source 3.0 (native) format

Show diffs side-by-side

added added

removed removed

Lines of Context:
88
88
 
89
89
        @echo Checking package...
90
90
 
 
91
# Extract tests from installed m files
 
92
        @echo Checking m files ...
91
93
        @tmp=$$(tempfile) ;                                     \
92
94
        echo "addpath (genpath ([pwd(),'/debian']));" > $$tmp ; \
93
95
        find debian/ -name \*.m                                 \
98
100
        @OCTAVE@ $(octave_options) $$tmp ;                      \
99
101
        rm -f $$tmp
100
102
 
 
103
# Extract tests from .cc files - these are not installed, but the
 
104
# compiled .oct files are.
 
105
# We search for the tests in the .cc files, but invoke the .oct files;
 
106
# this means we must add generate a loadpath starting at the current
 
107
# directory and source PKG_ADD files (they might add autoload()
 
108
# directives)
 
109
 
 
110
# We deactivate the warning about relative paths used for the PKG_ADD file.
 
111
        @echo Checking CC files ...
 
112
        @tmp=$$(tempfile) ;                                     \
 
113
        echo "addpath (genpath ([pwd()]));" >> $$tmp ;          \
 
114
        echo "warning ('off', 'Octave:autoload-relative-file-name');" >> $$tmp ;        \
 
115
        if [ -f PKG_ADD ] ; then                                \
 
116
                echo "source('PKG_ADD');" >> $$tmp ;            \
 
117
        fi ;                                                    \
 
118
        if [ -f PKG_ADD.bak ] ; then                            \
 
119
                echo "source('PKG_ADD.bak');" >> $$tmp ;        \
 
120
        fi ;                                                    \
 
121
        find src/ -name \*.cc                                   \
 
122
                | xargs grep -l '^%!\(assert\|test\)'           \
 
123
                | perl -pe 's:.*/(.*)\.cc::;                    \
 
124
                         print "disp (\"[$$1]\")\ntest $$1"'    \
 
125
                >> $$tmp ;                                      \
 
126
        octave3.2 $(octave_options) $$tmp ;                     \
 
127
        rm -f $$tmp
 
128
 
101
129
        @if [ -f debian/check.m ] ; then                        \
102
130
                @OCTAVE@ $(octave_options) --eval               \
103
131
                        "addpath (genpath ([pwd(),'/debian'])); \