FreeBSD make fails on BUILT_SOURCES file
Nate Bargmann <[email protected]> Wed, 24 Sep 2025 12:05:24 -0500
| Newsgroups | gmane.comp.sysutils.automake.general |
|---|---|
| Organization | Amateur Radio! |
| Message-ID | <vvgef75msuoadqixoa4ul35evy724b5jpeqe7ypf6cz3kbwode@mhuxekzgw5on> |
--heuffpvcnyfcoloy
Content-Type: text/plain; protected-headers=v1; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable
Subject: FreeBSD make fails on BUILT_SOURCES file
MIME-Version: 1.0
Hi All.
As maintainer of the Hamlib project I am working on a reported issue
involving the installed version of make in the distribution. I have
verified the issue locally. The failure is:
Making all in src
make[1]: don't know how to make ./hamlibdatetime.h. Stop
make[1]: stopped in /home/larry/Hamlib/src
*** Error code 1
Stop.
Which doesn't leave a lot to go on. I've used various debugging queries
of this make but it simply never processes the rule as near as I can
determine. It's as though this make doesn't see a valid rule stanza.
In our Makefile.am (https://github.com/Hamlib/Hamlib/blob/master/src/Makefi=
le.am)
there is the line:
BUILT_SOURCES =3D $(builddir)/hamlibdatetime.h
hamlibdatetime.h is also first in the variable that holds all of the
source files for this directory.
Further down is the rule:
# If we have a .git directory then we will generate the hamlibdate.h
# file and replace it if it is different. Fall back to a copy of a
# generic hamlibdatetime.h.in in the source tree. Build looks in build
# directory before the source directory for the hamlibdatetime.h
# header.
hamlibdatetime.h: FORCE
@if test -x $(top_srcdir)/.git ; then \
echo "/* This date time is from the last non-merge commit to Hamlib. */" =
> $(builddir)/$(@F).tmp ;\
echo "#define HAMLIBDATETIME "\"$$(TZ=3DUTC git --git-dir=3D$(top_srcdir)=
/.git log --no-merges --date=3D'format-local:%Y-%m-%dT%H:%M:%SZ SHA=3D' --f=
ormat=3D'%cd' -n 1)$$(git --git-dir=3D$(top_srcdir)/.git log --no-merges -n=
1 | head -n 1 | cut -c8-13)\" >> $(builddir)/$(@F).tmp ;\
diff -qN $(builddir)/$(@F).tmp $(builddir)/$(@F) ; test $$? -eq 0 || { ec=
ho "Generating SCS header \"$(builddir)/$(@F)\"" ; mv -f $(builddir)/$(@F).=
tmp $(builddir)/$(@F) ; } ;\
rm -f $(builddir)/$(@F).tmp ;\
touch -c $(top_srcdir)/src/version_dll.rc ;\
else \
test -f $(srcdir)/$(@F) || cp $(srcdir)/$(@F).in $(srcdir)/$(@F) ;\
fi
snapshot_data.o rig.o: hamlibdatetime.h
This all works as expected with GNU make on various platforms. Other
than recommending GNU make to the reporter, is there something we're
missing?
I can supply the Makefile from FreeBSD upon request, if that helps.
- Nate
--=20
"The optimist proclaims that we live in the best of all
possible worlds. The pessimist fears this is true."
Web: https://www.n0nb.us
Projects: https://github.com/N0NB
GPG fingerprint: 82D6 4F6B 0E67 CD41 F689 BBA6 FB2C 5130 D55A 8819
--heuffpvcnyfcoloy
Content-Type: application/pgp-signature; name="signature.asc"
-----BEGIN PGP SIGNATURE-----
iF0EABECAB0WIQSC1k9rDmfNQfaJu6b7LFEw1VqIGQUCaNQk1AAKCRD7LFEw1VqI
Gb8DAJ9ed2JA01J6/Rk/iYV5qCaJvhxDcgCfYtcbyPFrjJQlT9uCo04O0izlv7s=
=yv0N
-----END PGP SIGNATURE-----
--heuffpvcnyfcoloy--