fonts
LICENSE LiberationMono-Bold.ttf LiberationMono-BoldItalic.ttf LiberationMono-Italic.ttf LiberationMono-Regular.ttf LiberationSans-Bold.ttf LiberationSans-BoldItalic.ttf LiberationSans-Italic.ttf LiberationSans-Regular.ttf LiberationSerif-Bold.ttf LiberationSerif-BoldItalic.ttf LiberationSerif-Italic.ttf LiberationSerif-Regular.ttftests
cmyk_2000x1500_537kb.jpg color_test_800x600_118kb.jpg exif_rich_3000x2000_3.81mb.jpg grayscale_1600x1200_188kb.jpg landscape_hires_4000x2667_6.83mb.jpg large_banner_1920x600_124kb.jpg progressive_1920x1080_319kb.jpg social_square_1080x1080_235kb.jpg thumbnail_150x150_10.5kb.jpg upload_test_5000x3333_11.6mb.jpg web_optimized_1200x800_97kb.jpg
makext.mk
raw
1# Makext is a collection of useful extensions for Makefiles, aimed at
2# simplifying and enhancing the functionality of Make-based projects. These
3# extensions provide additional features and convenience functions to
4# improve the build process, manage dependencies, and streamline common
5# tasks.
6#
7# Visit the GitHub repository at https://github.com/mitjafelicijan/makext
8# to learn more and contribute to the project.
9#
10# `makext` was written by Mitja Felicijan and is released under the BSD
11# two-clause license, see the LICENSE file for more information.
12
13# Load environmental files from `MEX_ENVIRONMENT`. By default GNU make
14# loads what is already in `env`. This extends it to other files.
15ifdef MEX_ENVIRONMENT
16TEMP_ENV_FILES=$(shell echo $(MEX_ENVIRONMENT) | tr ',' ' ')
17$(foreach file,$(TEMP_ENV_FILES),$(eval include $(file)))
18endif
19
20# Help extension that lists all the targets with descriptions
21# and adds description and license information if data provided.
22.PHONY: .help
23.help:
24ifdef MEX_DESCRIPTION
25 @printf "%s\n\n" $(MEX_DESCRIPTION) | fmt
26endif
27 @echo "Targets:"
28 @grep -vE '^[[:space:]]' $(MAKEFILE_LIST) | grep -E '^.*:.* #' | sed -E 's/(.*):(.*):.*#(.*)/ \2###\3/' | column -t -s '###'
29ifdef MEX_LICENSE
30 @printf "\n%s" $(MEX_LICENSE) | fmt
31endif
32
33# Checks `MEX_ASSURE` variable if all the programs declared actually
34# exist on a machine. If not this exists make with error.
35.PHONY: .assure
36.assure:
37ifndef MEX_ASSURE
38 @printf "Variable MEX_ASSURE is not defined. Can not check for programs.\n"
39else
40 @for prog in $(shell echo $(MEX_ASSURE)); do \
41 if ! which $$prog > /dev/null; then \
42 echo "Error: '$$prog' not found on this machine."; \
43 exit 1; \
44 fi; \
45 done
46endif