generated_headers.am 905 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_sources: | test
10
	@mkdir $@
11
12
13
14
15
16
17
18
19
20
21

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>)

test/shared_sources/generated.h: $(wildcard $(top_srcdir)/test/shared_sources/*.F90) | test/shared_sources
	$(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
27

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