Changeset 1b2669a for Makefile


Ignore:
Timestamp:
Dec 2, 2016, 3:07:16 AM (3 years ago)
Author:
Paul Brossier <piem@piem.org>
Branches:
feature/autosink, feature/constantq, feature/pitchshift, feature/pydocstrings, feature/timestretch, master, sampler, yinfft+
Children:
7faef58
Parents:
0ec7113
Message:

Makefile: verbose, improve clean, build_ext only for --enable-double, less flags

File:
1 edited

Legend:

Unmodified
Added
Removed
  • Makefile

    r0ec7113 r1b2669a  
    44#WAFOPTS:=
    55# turn on verbose mode
    6 #WAFOPTS += --verbose
     6WAFOPTS += --verbose
    77# build wafopts
    88WAFOPTS += --destdir $(DESTDIR)
     
    1212DESTDIR:=$(PWD)/build/dist
    1313PYDESTDIR:=$(PWD)/build/pydist
     14
     15BUILDID=$(shell mktemp -d -p $(PWD)/dist/)
    1416
    1517# default install locations
     
    5355        # install
    5456        $(WAFCMD) install $(WAFOPTS)
    55         make list_installed
    5657
    5758list_installed:
    58         find $(DESTDIR) -ls | sed 's|$(DESTDIR)|/«destdir»|'
     59        find $(DESTDIR) -ls | \
     60                sed 's|$(DESTDIR)|/«destdir»|'
     61        tar --full-time --mtime=$(PWD)/src/aubio.h -jcvf $(BUILDID)/aubio-dist.tar.bz2 -C $(DESTDIR)/ .
    5962
    6063list_installed_python:
    61         find $(PYDESTDIR) -ls | sed 's|$(PYDESTDIR)|/«pydestdir»|'
     64        ( find $(PYDESTDIR) -ls || make list_installed_python_package ) | \
     65                sed 's|$(PYDESTDIR)|/«pydestdir»|'
     66        [ -d $(PYDESTDIR) ] && \
     67                tar --full-time --mtime=$(PWD)/src/aubio.h -jcvf $(BUILDID)/python-aubio-dist.tar.bz2 -C $(PYDESTDIR)/ . || \
     68                true
     69
     70list_installed_python_package:
     71        pip show -f aubio
     72        PACKAGE_LOCATION=$(shell pip show -f aubio | grep ^Location | cut -d \  -f 2) \
     73                make list_installed_python_package_content
     74
     75list_installed_python_package_content:
     76        ( [ -d $(PACKAGE_LOCATION) ] && find $(PACKAGE_LOCATION) -ls ) || \
     77                unzip -l $(PACKAGE_LOCATION)
     78        cp -prv $(PACKAGE_LOCATION) $(BUILDID)
     79
     80list_all_installed: list_installed list_installed_python
    6281
    6382uninstall:
     
    7089build_python:
    7190        # build python-aubio, using locally built libaubio if found
    72         python ./setup.py build $(ENABLE_DOUBLE)
     91        python ./setup.py build_ext $(ENABLE_DOUBLE)
    7392
    7493build_python_extlib:
     
    7897        [ -f $(DESTDIR)/$(LIBDIR)/pkgconfig/aubio.pc ]
    7998        PKG_CONFIG_PATH=$(DESTDIR)/$(LIBDIR)/pkgconfig \
    80         CFLAGS="-I$(DESTDIR)/$(INCLUDEDIR) $(CFLAGS)" \
    81         LDFLAGS="-L$(DESTDIR)/$(LIBDIR) $(CFLAGS)" \
     99        CFLAGS="-I$(DESTDIR)/$(INCLUDEDIR)" \
     100        LDFLAGS="-L$(DESTDIR)/$(LIBDIR)" \
    82101                make build_python
    83         make list_installed
    84         cat $(DESTDIR)/$(LIBDIR)/pkgconfig/aubio.pc
    85102
    86103deps_python:
     
    125142        # also run with nose, multiple processes
    126143        nose2 -N 4
    127         # list installed files
    128         #find $(DESTDIR) -ls | sed 's|$(DESTDIR)||'
    129         make list_installed_python
    130144
    131145clean_python:
     
    140154        # optionnaly clean before build
    141155        -$(WAFCMD) clean
     156        # remove possible left overs
     157        -rm -rf doc/_build
    142158
    143159check_clean:
     
    171187
    172188# build only libaubio, no python-aubio
    173 test_lib_only: clean distclean configure build install
     189test_lib_only: clean distclean configure build install list_installed
    174190# additionally, clean after a fresh build
    175191test_lib_only_clean: test_lib_only uninstall check_clean check_distclean
     
    180196        configure build build_python \
    181197        install install_python \
    182         test_python
     198        test_python \
     199        list_all_installed
    183200
    184201test_lib_python_clean: test_lib_python \
     
    195212        build_python_extlib \
    196213        install_python \
    197         test_python
     214        test_python \
     215        list_all_installed
    198216
    199217test_lib_install_python_clean: test_lib_install_python \
     
    208226        build_python \
    209227        install_python \
    210         test_python
     228        test_python \
     229        list_installed_python
    211230
    212231test_python_only_clean: test_python_only \
Note: See TracChangeset for help on using the changeset viewer.