summaryrefslogtreecommitdiff
path: root/lib/am/compile.am
diff options
context:
space:
mode:
Diffstat (limited to 'lib/am/compile.am')
-rw-r--r--lib/am/compile.am25
1 files changed, 12 insertions, 13 deletions
diff --git a/lib/am/compile.am b/lib/am/compile.am
index 86c016bfd..af0537484 100644
--- a/lib/am/compile.am
+++ b/lib/am/compile.am
@@ -14,16 +14,15 @@
## You should have received a copy of the GNU General Public License
## along with this program. If not, see <http://www.gnu.org/licenses/>.
-DEFAULT_INCLUDES = %DEFAULT_INCLUDES%
-
-mostlyclean-am: mostlyclean-compile
-mostlyclean-compile:
- -rm -f *.$(OBJEXT)
-?MOSTLYRMS?%MOSTLYRMS%
-
-distclean-am: distclean-compile
-distclean-compile:
- -rm -f *.tab.c
-?DISTRMS?%DISTRMS%
-
-.PHONY: mostlyclean-compile distclean-compile
+if %?STDINC%
+AM_DEFAULT_INCLUDES = \
+ $(call am.memoize,AM_DEFAULT_INCLUDES,$(strip \
+## We want '-I. -I$(srcdir)', but the latter -I is redundant and
+## unaesthetic in non-VPATH builds, so get rid of it if it is not
+## actually needed.
+ $(call am.util.uniq, -I. -I$(srcdir) \
+ $(foreach h, $(AM_CONFIG_HEADERS), \
+ $(patsubst %/,%,-I$(dir $h))))))
+else !%?STDINC%
+AM_DEFAULT_INCLUDES =
+endif !%?STDINC%