Commit 840447c4 authored by Thomas Jahns's avatar Thomas Jahns 🤸
Browse files

Fix dependency tracking of M4-generated files.

parent 6138a9e5
\(^\|/\).gitignore$
^include/config.h.in$
^src/m4.deps$
^src/pkgconfig/scales-ppm.pc.in$
^src/pkgconfig/scales-ppm-core.pc.in$
^util/check_m4$
......
......@@ -244,7 +244,21 @@ CLEANFILES = $(GENERATED_F90)
nodist_libscalesppm_la_SOURCES =
if MAINTAINER_MODE
%.f90: %.f90.m4 Makefile
# extra dependencies on m4 macro files
@am__include@ @am__quote@$(srcdir)/m4.deps@am__quote@ # am--include-marker
$(srcdir)/m4.deps: \
$(sort $(wildcard $(srcdir)/*/*.f90.m4))
$(AM_V_GEN){ srcdirpat=`echo $(ECHO_N) '$(srcdir)/' \
| $(PERL) -e 'print quotemeta(<>);'` ; \
for f in $^ ; do \
sed -n -e '/include(/{' \
-e 's@include({\([^}]*\)})dnl@'"$$f"': $$(top_srcdir)/m4/\1@' \
-e 's@'"$$srcdirpat"'\(.*\)\.m4: @\1: @;p;}' \
"$$f" ; done >$@.new ; \
cmp $@ $@.new >/dev/null 2>&1 || mv $@.new $@ ; }
%.f90: %.f90.m4
$(AM_V_GEN)$(MKDIR_P) ppm \
&& (echo '!' && echo "! AUTOGENERATED FILE, DON'T MODIFY!" &&\
echo '!' && echo '! Base file: $(patsubst $(srcdir)/%,%,$<)' && \
......@@ -375,7 +389,9 @@ distclean-local: mostlyclean
-rmdir core crypto pkgconfig ppm solver testdata || exit 0
EXTRA_DIST = main_doc.dox ppm/howto.dox solver/howto.dox \
ppm/dist_array.f90.m4 ppm/ppm_ptr_bnds_remap.f90.m4
ppm/dist_array.f90.m4 ppm/ppm_ptr_bnds_remap.f90.m4 \
m4.deps
install-exec-local:
$(mkinstalldirs) "$(DESTDIR)$(libdir)/pkgconfig"
......
ppm/dist_array.f90: $(top_srcdir)/m4/forloop2.m4
ppm/ppm_ptr_bnds_remap.f90: $(top_srcdir)/m4/forloop2.m4
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment