https://github.com/kwwette/swiglal
Raw File
Tip revision: 77e755f6b60cf6209af990c32b48131e8d3ff9c0 authored by Karl Wette on 16 April 2014, 19:03:41 UTC
Revert non-recursive build commits
Tip revision: 77e755f
swiglal_header.am
# SWIG makefile rules for generating header lists.
# Author: Karl Wette, 2011, 2012

if SWIG_BUILD

# SWIG interface header list
swig_iface_headers = $(top_builddir)/swig/@PACKAGE@swig_headers.list

# generate SWIG interface header list
all install .PHONY : swig-iface-headers
swig-iface-headers :
	@modified=false; \
	if test -f $(swig_iface_headers); then \
		patt=`echo '^$(subdir):' | $(SED) 's|\.|\\.|g'`; \
		match=`$(SED) -n "\\|$$patt|p" $(swig_iface_headers)`; \
		if test "x$$match" = x; then \
			echo '$(subdir): $(swig_headers)' >> $(swig_iface_headers); \
			modified=true; \
		else \
			patt=`echo '^$(subdir): $(swig_headers)$$' | $(SED) 's|\.|\\.|g'`; \
			match=`$(SED) -n "\\|$$patt|p" $(swig_iface_headers)`; \
			if test "x$$match" = x; then \
				$(SED) -i 's|^$(subdir):.*$$|$(subdir): $(swig_headers)|' $(swig_iface_headers); \
				modified=true; \
			fi; \
		fi; \
	else \
		echo '$(subdir): $(swig_headers)' > $(swig_iface_headers); \
		modified=true; \
	fi; \
	if test "x$$modified" = xtrue; then \
		for file in `find $(top_builddir)/swig -type f -name '*swig*.deps'`; do \
			echo '#erased' > $$file; \
		done; \
	fi

endif # SWIG_BUILD
back to top