process roken.h.in with a perlscript when cross compiling

This commit is contained in:
Love Hornquist Astrand
2009-09-19 16:43:35 -07:00
parent 7b83dfbe72
commit 7005f1f3f9
2 changed files with 195 additions and 0 deletions

View File

@@ -188,6 +188,9 @@ SUFFIXES += .hin
.hin.h:
cp $< $@
# Make make-roken deprecated in 1.4 when we know that roken-h-process.pl works
if !CROSS_COMPILE
roken.h: make-roken$(EXEEXT)
@./make-roken$(EXEEXT) > tmp.h ;\
if [ -f roken.h ] && cmp -s tmp.h roken.h ; then rm -f tmp.h ; \
@@ -196,6 +199,16 @@ roken.h: make-roken$(EXEEXT)
make-roken.c: roken.h.in roken.awk
$(AWK) -f $(srcdir)/roken.awk $(srcdir)/roken.h.in > make-roken.c
else
roken.h: $(top_srcdir)/cf/roken-h-process.pl roken.h.in
perl $(top_srcdir)/cf/roken-h-process.pl \
-c $(top_builddir)/include/config.h \
-p $(srcdir)/roken.h.in -o roken.h
endif
EXTRA_DIST = \
roken.awk roken.h.in \
$(man_MANS) \