## Special rules.

## POSIX

# If not present as the first non-comment line the behaviour of Make is unspecified...

# This hints at how many incompatible implementations there must be out there.

.POSIX:

### PHONY

# If the target is given, use POSIX compliance

.PHONY: first depends depended depended2

### SUFFIXES

# List of file extension for which automatic rules shall be generated:

.SUFFIXES:

# You can retrive those extensions with the `SUFFIXES` automatic variable

### SILENT

# Supress command echoing from the given dependencies,
# much like `@` for individual lines.

# Try:

# `make silent`
# `make not-silent`

.SILENT: silent

## Default rule

# Whatever its name, the first rule is the default if no args.

# However, `all` is a very standard name whith you should use.

first:
	@echo first

depended:
	@echo depended

depended2:
	@echo depended2

## %

## Percent

# `%` equals the regex: `[^/]+`

# It generates a rule only when the input files exists.

# Or can be made by another rule.

# Try:

# - `make percent/a.elf`: 	a
# - `make a.elf`:			no rule because no input (`%` does not do `/`)
# - `make percent/b.elf`:	works because `b.c` is generated by another rule

percent/%.elf: percent/%.c
	@echo "percent/%.elf"
	#the `%` part:
	@echo "$*"

percent/b.c:
	touch percent/b.c

clean:
	percent/b.c
