hroptatyr / dateutils

nifty command line date and time utilities; fast date calculations and conversion in the shell
http://www.fresse.org/dateutils/
Other
618 stars 42 forks source link

Top level "make" on FreeBSD fails to create lib/version.c from lib/version.c.in #74

Open resuna opened 6 years ago

resuna commented 6 years ago

There seems to be a build ordering issue or something.

$ make
Making all in build-aux
make  yuck-bootstrap
  CC       yuck_bootstrap-yuck.o
  CCLD     yuck-bootstrap
  GEN      yuck.m4i
  GEN      yuck.yucc
make  all-am
  CC       yuck-yuck.o
  CC       yuck-yuck-scmver.o
yuck-scmver.c: In function 'run':
yuck-scmver.c:296:2: warning: implicit declaration of function 'vfork' [-Wimplicit-function-declaration]
  switch ((p = vfork())) {
  ^
  CCLD     yuck
Making all in data
make  all-am
Making all in lib
  GEN      version.c
0.4.3.git2.9e20475.dirty
make  ltrcc
  CC       ltrcc-ltrcc.o
ltrcc.c:54:21: fatal error: version.c: No such file or directory
 #include "version.c"
                     ^
compilation terminated.
*** Error code 1

Then

$ ls lib/version*
lib/version.c.in    lib/version.h

You'd think the "GEN version.c" bit would have DTRT...?

resuna commented 6 years ago

Ah, needs GNU make.

hroptatyr commented 6 years ago

Hey Peter, that's a git build, right? Can you verify though that a tarball-build would indeed work with bsd make?

resuna commented 6 years ago

As expected, the tarball build v0.4.3.tar.gz has the same failure mode

ltrcc.c:54:21: fatal error: version.c: No such file or directory
 #include "version.c"
                     ^
compilation terminated.

gmake works.

hroptatyr commented 6 years ago

Ah thanks for verifying. The tarball does work with AIX's make for me because version.c is already included and doesn't need regenerating.

Will have to fix this on a real BSD machine, I just hope it's not a timestamp issue or something.

Thanks for the report.

hroptatyr commented 6 years ago

This is addressed in d34083e and should be fixed now.