| 1 |
#! /usr/bin/make -f |
| 2 |
# |
| 3 |
# This is free software, and you are welcome to redistribute it under |
| 4 |
# certain conditions; see the end of this file for copyright |
| 5 |
# information, grant of license, and disclaimer of warranty. |
| 6 |
|
| 7 |
# Makefile for this code base. |
| 8 |
|
| 9 |
PYTHON ?= /usr/bin/python3 |
| 10 |
PYTHON_OPTS ?= -bb |
| 11 |
|
| 12 |
PY_MODULE_SUFFIX = .py |
| 13 |
PY_MODULE_BYTECODE_SUFFIX = .pyc |
| 14 |
package_modules = $(shell find ${CURDIR}/dput/ -name '*${PY_MODULE_SUFFIX}') |
| 15 |
python_modules = $(shell find ${CURDIR}/ -name '*${PY_MODULE_SUFFIX}') |
| 16 |
|
| 17 |
GENERATED_FILES := |
| 18 |
GENERATED_FILES += $(patsubst \ |
| 19 |
%${PY_MODULE_SUFFIX},%${PY_MODULE_BYTECODE_SUFFIX}, \ |
| 20 |
${python_modules}) |
| 21 |
GENERATED_FILES += ${CURDIR}/*.egg-info |
| 22 |
GENERATED_FILES += ${CURDIR}/build ${CURDIR}/dist |
| 23 |
|
| 24 |
DOC_DIR = doc |
| 25 |
MANPAGE_GLOB = *.[1-8] |
| 26 |
MANPAGE_DIR = ${DOC_DIR}/man |
| 27 |
manpage_paths = $(wildcard ${MANPAGE_DIR}/${MANPAGE_GLOB}) |
| 28 |
|
| 29 |
|
| 30 |
.PHONY: all |
| 31 |
all: |
| 32 |
|
| 33 |
|
| 34 |
.PHONY: clean |
| 35 |
clean: |
| 36 |
$(RM) -r ${GENERATED_FILES} |
| 37 |
|
| 38 |
|
| 39 |
.PHONY: tags |
| 40 |
tags: TAGS |
| 41 |
|
| 42 |
GENERATED_FILES += TAGS |
| 43 |
|
| 44 |
TAGS: ${python_modules} |
| 45 |
etags --output "$@" --lang=python ${python_modules} |
| 46 |
|
| 47 |
|
| 48 |
include test.mk |
| 49 |
include stylecheck.mk |
| 50 |
|
| 51 |
|
| 52 |
# Copyright © 2015–2024 Ben Finney <[email protected]> |
| 53 |
# |
| 54 |
# This is free software: you may copy, modify, and/or distribute this work |
| 55 |
# under the terms of the GNU General Public License as published by the |
| 56 |
# Free Software Foundation; version 3 of that license or any later version. |
| 57 |
# No warranty expressed or implied. See the file ‘LICENSE.GPL-3’ for details. |
| 58 |
|
| 59 |
|
| 60 |
# Local variables: |
| 61 |
# coding: utf-8 |
| 62 |
# mode: makefile |
| 63 |
# End: |
| 64 |
# vim: fileencoding=utf-8 filetype=make : |