X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=modules%2Fgetdate;h=2f0fdb279c70f9ef5209326a0310be452133098e;hb=c94cedef255488e271ef59212a9899d9d22c1fae;hp=1328c221f987efb3e176ab0a3441271a6253dbf2;hpb=316a91c6f78b93aed27747bdbdc1ed0fdb9c5419;p=gnulib.git diff --git a/modules/getdate b/modules/getdate index 1328c221f..2f0fdb279 100644 --- a/modules/getdate +++ b/modules/getdate @@ -25,8 +25,20 @@ configure.ac: gl_GETDATE Makefile.am: +# This rule overrides the Automake generated .y.c rule, to ensure that the +# getdate.c file gets generated in the source directory, not in the build +# directory. +getdate.c: getdate.y + $(AM_V_GEN)$(SHELL) $(YLWRAP) $(srcdir)/getdate.y \ + y.tab.c getdate.c \ + y.tab.h getdate.h \ + y.output getdate.output \ + -- $(YACC) $(YFLAGS) $(AM_YFLAGS) && \ + mv getdate.c getdate.c-t && \ + mv getdate.c-t $(srcdir)/getdate.c lib_SOURCES += getdate.y BUILT_SOURCES += getdate.c +MOSTLYCLEANFILES += getdate.c-t MAINTAINERCLEANFILES += getdate.c EXTRA_DIST += getdate.c