Skip to content

Commit

Permalink
New target "metadata"
Browse files Browse the repository at this point in the history
  • Loading branch information
fadado committed Apr 5, 2017
1 parent 9b250e5 commit 2e55c2e
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 6 deletions.
6 changes: 4 additions & 2 deletions docs/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,9 @@ Metadata := .yummy
# Layouts
# Styles

# While clobbering don't introspect
ifeq (,$(filter clobber,$(MAKECMDGOALS)))
# While clobbering don't introspect
#ifeq (,$(filter clobber,$(MAKECMDGOALS)))
ifneq (clobber,$(MAKECMDGOALS))

# Include metadata
include make.d/metadata.make
Expand Down Expand Up @@ -191,6 +192,7 @@ build: clean all

# Show targets
help:
@echo 'Usage: make TARGET [parameter=value...]'
@echo 'Targets:'; \
$(MAKE) --print-data-base --just-print 2>&1 \
| grep -v '^[mM]akefile' \
Expand Down
2 changes: 1 addition & 1 deletion docs/make.d/config.make
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ MAKECMDGOALS ?= all
# Check 'root' intentions
ifeq (,$(filter install uninstall,$(MAKECMDGOALS)))
ifeq (0,$(shell id --user))
$(error Root only can make "(un)install" targets)
$(error Root only can make "(un)install" targets)
endif
SUDO :=
else
Expand Down
11 changes: 8 additions & 3 deletions docs/make.d/metadata.make
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,13 @@
# Imported variables:
# Metadata

# Build all metadata files
.PHONY: metadata
metadata: \
$(Metadata)/config.json \
$(Metadata)/globals.make
@:

# Metadata directory
$(Metadata):
$(info ==> $@)
Expand Down Expand Up @@ -53,8 +60,6 @@ endif

# Variables to define in globals.make
define MAKE_GLOBALS :=
"# vim:syntax=make", \
"", \
"__globals__ := 1", \
"Destination := " + .Destination, \
"Assets := " + .Assets, \
Expand All @@ -63,7 +68,7 @@ define MAKE_GLOBALS :=
"Data := " + .Data, \
"Layouts := " + .Layouts, \
"Styles := " + .Styles, \
""
"# vim:syntax=make"
endef

# Create makefile with globals
Expand Down

0 comments on commit 2e55c2e

Please sign in to comment.