A collection of makefiles "libraries", to use in (almost) all your projects.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
Glenn Y. Rolland d5627404e1 Improve graphviz 1 year ago
Makefile Initial import 1 year ago
README.md Improve usage documentation 1 year ago
graphviz.mk Improve graphviz 1 year ago
mocodo.mk Fill content for graphviz, mocodo & plantuml 1 year ago
mypaint.mk Add mypaint file 1 year ago
plantuml.mk Fill content for graphviz, mocodo & plantuml 1 year ago

README.md

Makefiles Forever

A drop-in collection of makefiles libraries for your projects

Description

  • plantuml.makefile — Build plantuml diagrams
  • dot.mk — Build graphviz graph diagrams
  • mocodo.mk — Build mocodo entity-relation and logical diagrams

Usage

Add this repository as a GIT submodule of your project

$ git submodule add https://github.com/glenux/makefiles-forever .makefiles

Include needed features in the end of your makefile

# [...]

-include .makefiles/featureA.mk
-include .makefiles/featureB.mk  

Declare API variables (ex: *_SRC_DIR, *_DEST_DIR) for each module

# Configuration for featureA from Makefiles Forever
FEATUREA_SRC_DIR=/path/to/somewhere
FEATUREA_DEST_DIR=/some/other/path

# Configuration for featureB from Makefiles Forever
FEATUREA_SRC_DIR=/another/path
FEATUREB_DEST_DIR=/a/different/one

Use pre-defined targets as dependencies of your targets:

build: featureA-build
build: featureB-build

clean: featureA-clean
clean: featureB-clean

Feature files usually define more targets than just build and clean, and you can use those too!

Good practices for coding .mk files

  • Keep task parallelism in mind
    • Make all targets available from root makefile
    • Do not descend in subdirectories