# Makefile to install Python modules for the # Raspberry Pi LPC1114 I/O Processor Expansion Board # Copyright (C)2013-2018, Philip Munts, President, Munts AM Corp. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # * Redistributions of source code must retain the above copyright notice, # this list of conditions and the following disclaimer. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE # ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE # LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF # SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS # INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN # CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE # POSSIBILITY OF SUCH DAMAGE. PYTHON ?= python3 default: API.html: spiagent.py python3 ./pydoc-customized.py -w `basename $^ .py` mv `basename $^ .py`.html $@ sed -i 's/spiagent.html/API.html/g' $@ sed -i 's/ defined here//g' $@ sed -i 's/self, //g' $@ sed -i 's/self//g' $@ sed -i 's/Data descriptors/Properties/g' $@ -tidy -q -m -w 80 $@ sed -i -e '17,20d' $@ awk '/Modules/ { printf("sed -i -e \"%d,%dd\" $@\n", NR-5, NR+16); }' <$@ | sort -r | sh awk '/__dict__|__weakref__/ { printf("sed -i -e \"%d,%dd\" $@\n", NR-1, NR+3); }' <$@ | sort -r | sh awk '/<\/td>/ { if (lastline=="Properties:
") printf("sed -i -e \"%d,%dd\" $@\n", NR-2, NR-1); } { lastline=$$0}' <$@ | sort -r | sh awk -F '"' '{ if (index($$0, "__init__")) sub(">__init__<", (">" substr($$2, 1, length($$2)-9)) "<"); print $$0 }' <$@ >$@.new mv $@.new $@ install: python3 install-spiagent.py ../scripts/update_services clean: -rm -rf __pycache__ *.pyc