generated_headers.am 865 Bytes
Newer Older
1
2
define extract_interface
	@echo "Generating $@...";
3
	@grep -h "^ *$1" $^ | sed 's/^ *$1//;' >> $@ || { rm $@; exit 1; }
4
5
6
endef

elpa test:
7
	@mkdir $@
8

9
test/shared: | test
10
	@mkdir $@
11
12
13
14
15
16
17
18

config-f90.h: config.h
	@echo "Generating $@...";
	@grep "^#define" $^ > $@ || { rm $@; exit 1; }

elpa/elpa_generated.h: $(top_srcdir)/src/elpa_c_interface.F90 | elpa
	$(call extract_interface,!c>)

19
test/shared/generated.h: $(wildcard $(top_srcdir)/test/shared/*.F90) | test/shared
20
21
	$(call extract_interface,!c>)

22
elpa/elpa_generated_fortran_interfaces.h: $(wildcard $(top_srcdir)/src/elpa2/kernels/*.c) $(wildcard $(top_srcdir)/src/elpa2/kernels/*.s) | elpa
23
	$(call extract_interface,!f>)
24
	$(call extract_interface,#!f>)
25

26
generated_headers= config-f90.h elpa/elpa_generated.h test/shared/generated.h elpa/elpa_generated_fortran_interfaces.h
27
generated-headers: $(generated_headers)