generated_headers.am 1.15 KB
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

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

16
elpa/elpa_generated.h: $(top_srcdir)/src/elpa_driver/legacy_interface/elpa_driver_c_interface_legacy.F90 | elpa
17
18
	$(call extract_interface,!c>)

19
elpa/elpa_generated.h: $(top_srcdir)/src/elpa1/legacy_interface/elpa_1stage_c_interface_legacy.F90 | elpa
20
21
	$(call extract_interface,!c>)

22
elpa/elpa_generated.h: $(top_srcdir)/src/elpa2/legacy_interface/elpa_2stage_c_interface.F90 | elpa
23
24
	$(call extract_interface,!c>)

Andreas Marek's avatar
Andreas Marek committed
25
test/shared/generated.h: $(wildcard $(top_srcdir)/test/shared/*.*90) | test/shared
26
27
	$(call extract_interface,!c>)

28
elpa/elpa_generated_fortran_interfaces.h: $(wildcard $(top_srcdir)/src/elpa2/kernels/*.c) $(wildcard $(top_srcdir)/src/elpa2/kernels/*.s) | elpa
29
	$(call extract_interface,!f>)
30
	$(call extract_interface,#!f>)
31

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