Changeset 735ff1e in trunk


Ignore:
Timestamp:
2020-09-17T19:25:34Z (4 years ago)
Author:
Ross Patterson <me@…>
Branches:
master
Children:
775a3db
Parents:
da24739
Message:

build(make): Improve and clarify Makefile org

This is opinionated, so I understand if community members disagree and I'm happy to back
this out.

It's conventional (and I prefer) to group variables toward the top of the ./Makefile
so I've done that.

I also prefer separating task-oriented "phony" targets above any "real" targets (whose
recipes create/update actual build artifacts on the filesystem). The task-oriented
targets tend to be a better starting point for any developers approaching the
./Makefile to understand where to get started.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • TabularUnified Makefile

    rda24739 r735ff1e  
    1 
     1# Tahoe LFS Development and maintenance tasks
     2#
    23# NOTE: this Makefile requires GNU make
    34
     
    1213MAKEFLAGS += --no-builtin-rules
    1314
    14 default:
    15         @echo "no default target"
    16 
     15# Local target variables
    1716PYTHON=python
    1817export PYTHON
    1918PYFLAKES=flake8
    2019export PYFLAKES
    21 
    2220SOURCES=src/allmydata static misc setup.py
    2321APPNAME=tahoe-lafs
     22
     23
     24# Top-level targets
     25
     26default:
     27        @echo "no default target"
    2428
    2529# This is necessary only if you want to automatically produce a new
     
    2832make-version:
    2933        $(PYTHON) ./setup.py update_version
    30 
    31 src/allmydata/_version.py:
    32         $(MAKE) make-version
    3334
    3435# Build OS X pkg packages.
     
    6667## # --include appeared in coverage-3.4
    6768## COVERAGE_OMIT=--include '$(CURDIR)/src/allmydata/*' --omit '$(CURDIR)/src/allmydata/test/*'
    68 
    6969
    7070.PHONY: code-checks
     
    228228upload-tarballs:
    229229        @if [ "X${BB_BRANCH}" = "Xmaster" ] || [ "X${BB_BRANCH}" = "X" ]; then for f in dist/*; do flappclient --furlfile ~/.tahoe-tarball-upload.furl upload-file $$f; done ; else echo not uploading tarballs because this is not trunk but is branch \"${BB_BRANCH}\" ; fi
     230
     231
     232# Real targets
     233
     234src/allmydata/_version.py:
     235        $(MAKE) make-version
Note: See TracChangeset for help on using the changeset viewer.