ack/util/cmisc/build.mk
David Given b0c238eb5d Made a start on building the runtimes for each platform and language; the
Linuxes all build.

--HG--
branch : dtrg-buildsystem
rename : modules/src/em_mes/build.mk => modules/src/read_em/build.mk
rename : plat/pc86/build.mk => plat/linux386/build.mk
rename : plat/pc86/build.mk => plat/linux68k/build.mk
rename : plat/pc86/build.mk => plat/linuxppc/build.mk
rename : util/ack/build.mk => util/misc/build.mk
2013-05-12 23:51:55 +01:00

33 lines
597 B
Makefile

# Building tabgen.
define build-tabgen-impl
$(call reset)
$(call cfile, util/cmisc/tabgen.c)
$(call cprogram, $(BINDIR)/tabgen)
$(eval TABGEN := $o)
endef
$(eval $(build-tabgen-impl))
# Using tabgen.
#
# $1 = input file
#
# Output file is compiled with cfile and queued.
define tabgen-impl
$(eval g := $(OBJDIR)/$(objdir)/$(strip $1).c)
$g: $1 $(TABGEN)
@echo TABGEN $g
@mkdir -p $(dir $g)
$(hide) $(TABGEN) -f$(strip $1) > $g || $(RM) $g
$(eval CLEANABLES += $g)
$(call $2,$g)
endef
tabgen = $(eval $(call tabgen-impl,$1,cfile))
acktabgen = $(eval $(call tabgen-impl,$1,ackfile))