File: test_parallel_make.Makefile

package info (click to toggle)
firebuild 0.8.5.1-1
  • links: PTS, VCS
  • area: non-free
  • in suites: forky, sid
  • size: 2,552 kB
  • sloc: cpp: 13,693; ansic: 6,086; python: 2,313; sh: 261; makefile: 40; awk: 33
file content (18 lines) | stat: -rw-r--r-- 584 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
check: parallel_make_test_main
	./$<

parallel_make_test.%.c:
	printf "void _"$(subst .,_,$@)"(){}" > $@

parallel_make_test_main.c:
	printf "#include <stdio.h>\nint main() {printf(\"ok\\\n\"); return 0;}" > $@

# Note the '+' prefix before the commad. This makes make keep the jobserver pipe open even when not invoking a sub-make.
# See: https://savannah.gnu.org/bugs/?47392
parallel_make_test_main: parallel_make_test_main.c $(patsubst %,parallel_make_test.%.o,$(shell seq 8))
	+gcc -flto=auto -o $@ $^

clean:
	rm -f parallel_make_test.*.? parallel_make_test_main*

.PHONY: clean