generated_headers.am 822 Bytes
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
define extract_interface
	@echo "Generating $@...";
	@grep -h "^ *$1" $^ | sed 's/^ *$1//;' > $@ || { rm $@; exit 1; }
endef

elpa test:
	mkdir $@

test/shared_sources: | test
	mkdir $@

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

elpa/elpa_generated_fortran_interfaces.h: $(wildcard $(top_srcdir)/src/elpa2_kernels/*.c) | elpa
	$(call extract_interface,!f>)

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