makephile

Love make, not jar


Makephile is a library for makefiles. It provides a set of functions to make writing makefiles easier.

How to use

Add the following snippet to your Makefile:

# Makephile configuration
# For more information, see https://makephile.empaphy.org
MAKEPHILE_VERSION = main

.makephile/bootstrap.mk:
	curl --create-dirs --output $@ https://makephile.empaphy.org/bootstrap.mk
include .makephile/bootstrap.mk

include .makephile/lib/usage.mk

Features

This is a non-exhaustive overview of the functions currently available in Makephile:

$(call makephile_MAKE_with_timeout_hours,target,hours,timeout_target)
Makes the target with a timeout, by providing a timeout target.
$(phil_target_info)
Prints information about the current target.

For example:

  .PHONY: foo
  foo:
  	$(makephile_target_info)
  	@echo "Hello, world!"

Will output:

  > Target foo
  Hello, world!