source: Makefile @ ea7428a

feature/autosinkfeature/cnnfeature/cnn_orgfeature/constantqfeature/crepefeature/crepe_orgfeature/pitchshiftfeature/pydocstringsfeature/timestretchfix/ffmpeg5pitchshiftsamplertimestretchyinfft+
Last change on this file since ea7428a was ea7428a, checked in by Paul Brossier <piem@piem.org>, 8 years ago

Makefile: update waf to 1.9.1

  • Property mode set to 100644
File size: 2.6 KB
RevLine 
[81ad577]1WAFCMD=python waf
[ea7428a]2WAFURL=https://waf.io/waf-1.9.1
[6a6cb48]3
[be06e53]4SOX=sox
5
[6a6cb48]6ENABLE_DOUBLE := $(shell [ -z $(HAVE_DOUBLE) ] || echo --enable-double )
[ceb884d]7TESTSOUNDS := python/tests/sounds
[6a6cb48]8
[8e94af5]9all: build
10
11checkwaf:
12        @[ -f waf ] || make getwaf
13
14getwaf:
[288c193]15        @( which wget > /dev/null && wget -qO waf $(WAFURL) ) || ( which curl > /dev/null && curl $(WAFURL) > waf )
[81ad577]16        @chmod +x waf
17
18expandwaf:
[8e94af5]19        @[ -d wafilb ] || rm -fr waflib
[81ad577]20        @$(WAFCMD) --help > /dev/null
[0e39e88]21        @mv .waf*/waflib . && rm -fr .waf*
[6121dd4]22        @sed '/^#==>$$/,$$d' waf > waf2 && mv waf2 waf
[8e94af5]23        @chmod +x waf
24
[e372a0f]25configure: checkwaf
[6a6cb48]26        $(WAFCMD) configure $(WAFOPTS) $(ENABLE_DOUBLE)
[e372a0f]27
28build: configure
[3fc5696]29        $(WAFCMD) build $(WAFOPTS)
[8e94af5]30
[972a326]31build_python:
[1167631]32        python ./setup.py generate $(ENABLE_DOUBLE) build
[972a326]33
[1167631]34test_python: export LD_LIBRARY_PATH=$(PWD)/build/src
[69212a0]35test_python:
[1167631]36        pip install -v -r requirements.txt
37        pip install -v .
38        nose2 --verbose
39        pip uninstall -y -v aubio
[39122f0]40
41test_python_osx:
[1167631]42        # create links from ~/lib/lib* to build/src/lib*
[b099f50]43        [ -f build/src/libaubio.[0-9].dylib ] && ( mkdir -p ~/lib && cp -prv build/src/libaubio.4.dylib ~/lib ) || true
[1167631]44        # then run the tests
45        pip install --user -v -r requirements.txt
46        pip install --user -v .
47        nose2 --verbose
48        pip uninstall -y -v aubio
[69212a0]49
[972a326]50clean_python:
[1167631]51        ./setup.py clean
[972a326]52
[f465088]53test_pure_python:
54        -pip uninstall -v -y aubio
55        -rm -rf build/ python/gen/
56        -rm -f dist/*.egg
57        -pip install -v -r requirements.txt
58        CFLAGS=-Os python setup.py bdist_egg
[c69c219]59        [ "$(TRAVIS_OS_NAME)" == "osx" ] && easy_install --user dist/*.egg || \
60                easy_install dist/*.egg
[f465088]61        nose2 -N 4
62        pip uninstall -v -y aubio
63
64test_pure_python_wheel:
65        -pip uninstall -v -y aubio
66        -rm -rf build/ python/gen/
67        -rm -f dist/*.whl
68        -pip install -v -r requirements.txt
69        -pip install -v wheel
70        CFLAGS=-Os python setup.py bdist_wheel --universal
71        wheel install dist/*.whl
72        nose2 -N 4
73        pip uninstall -v -y aubio
74
[a2ae70a]75build_python3:
[1167631]76        python3 ./setup.py generate $(ENABLE_DOUBLE) build
[a2ae70a]77
78clean_python3:
[1167631]79        python3 ./setup.py clean
[a2ae70a]80
[ddd9861]81clean:
[81ad577]82        $(WAFCMD) clean
[ddd9861]83
[e372a0f]84distcheck: checkwaf
[7aed123]85        $(WAFCMD) distcheck $(WAFOPTS) $(ENABLE_DOUBLE)
[8e94af5]86
87help:
[81ad577]88        $(WAFCMD) --help
[be06e53]89
90create_test_sounds:
[3a7b7c6]91        -[ -z `which $(SOX)` ] && ( echo $(SOX) could not be found) || true
92        -mkdir -p $(TESTSOUNDS)
[ceb884d]93        -$(SOX) -r 44100 -b 16 -n "$(TESTSOUNDS)/44100Hz_1f_silence.wav"      synth 1s   silence 0
94        -$(SOX) -r 22050 -b 16 -n "$(TESTSOUNDS)/22050Hz_5s_brownnoise.wav"   synth 5    brownnoise      vol 0.9
95        -$(SOX) -r 32000 -b 16 -n "$(TESTSOUNDS)/32000Hz_127f_sine440.wav"    synth 127s sine 440        vol 0.9
96        -$(SOX) -r  8000 -b 16 -n "$(TESTSOUNDS)/8000Hz_30s_silence.wav"      synth 30   silence 0       vol 0.9
97        -$(SOX) -r 48000 -b 32 -n "$(TESTSOUNDS)/48000Hz_60s_sweep.wav"       synth 60   sine 100-20000  vol 0.9
Note: See TracBrowser for help on using the repository browser.