Blame Tools.mk

Packit 352660
# -*- encoding: utf-8 -*-
Packit 352660
#
Packit 352660
# Copyright © 2003  Keith Packard
Packit 352660
# Copyright © 2013  Google, Inc.
Packit 352660
#
Packit 352660
# Permission to use, copy, modify, distribute, and sell this software and its
Packit 352660
# documentation for any purpose is hereby granted without fee, provided that
Packit 352660
# the above copyright notice appear in all copies and that both that
Packit 352660
# copyright notice and this permission notice appear in supporting
Packit 352660
# documentation, and that the name of the author(s) not be used in
Packit 352660
# advertising or publicity pertaining to distribution of the software without
Packit 352660
# specific, written prior permission.  The authors make no
Packit 352660
# representations about the suitability of this software for any purpose.  It
Packit 352660
# is provided "as is" without express or implied warranty.
Packit 352660
#
Packit 352660
# THE AUTHOR(S) DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
Packit 352660
# INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
Packit 352660
# EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY SPECIAL, INDIRECT OR
Packit 352660
# CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
Packit 352660
# DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
Packit 352660
# TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
Packit 352660
# PERFORMANCE OF THIS SOFTWARE.
Packit 352660
#
Packit 352660
# Google Author(s): Behdad Esfahbod
Packit 352660
Packit 352660
DIR=fc-$(TAG)
Packit 352660
OUT=fc$(TAG)
Packit 352660
TMPL=$(OUT).tmpl.h
Packit 352660
TARG=$(OUT).h
Packit 352660
TSRC=$(DIR).c
Packit 352660
TOOL=./$(DIR)$(EXEEXT_FOR_BUILD)
Packit 352660
Packit 352660
EXTRA_DIST = $(TARG) $(TMPL) $(TSRC) $(DIST)
Packit 352660
Packit 352660
AM_CPPFLAGS = \
Packit 352660
	   -I$(builddir) \
Packit 352660
	   -I$(srcdir) \
Packit 352660
	   -I$(top_builddir)/src \
Packit 352660
	   -I$(top_srcdir)/src \
Packit 352660
	   -I$(top_builddir) \
Packit 352660
	   -I$(top_srcdir) \
Packit 352660
	   -DHAVE_CONFIG_H \
Packit 352660
	   $(WARN_CFLAGS)
Packit 352660
Packit 352660
$(TOOL): $(TSRC) $(ALIAS_FILES)
Packit 352660
	$(AM_V_GEN) $(CC_FOR_BUILD) -o $(TOOL) $< $(AM_CPPFLAGS)
Packit 352660
Packit 352660
$(TARG): $(TMPL) $(TSRC) $(DEPS)
Packit 352660
	$(AM_V_GEN) $(MAKE) $(TOOL) && \
Packit 352660
	$(RM) $(TARG) && \
Packit 352660
	$(TOOL) $(ARGS) < $< > $(TARG).tmp && \
Packit 352660
	mv $(TARG).tmp $(TARG) || ( $(RM) $(TARG).tmp && false )
Packit 352660
noinst_HEADERS=$(TARG)
Packit 352660
Packit 352660
ALIAS_FILES = fcalias.h fcaliastail.h
Packit 352660
Packit 352660
BUILT_SOURCES = $(ALIAS_FILES)
Packit 352660
Packit 352660
$(ALIAS_FILES):
Packit 352660
	$(AM_V_GEN) touch $@
Packit 352660
Packit 352660
CLEANFILES = $(ALIAS_FILES) $(TOOL)
Packit 352660
Packit 352660
MAINTAINERCLEANFILES = $(TARG)