[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
"make depend(s)" broken
From: |
Martin D Kealey |
Subject: |
"make depend(s)" broken |
Date: |
Wed, 11 Sep 2024 10:21:45 +1000 |
As part of merging "shopt" and "set -o", I've had to update quite a lot of
files, including adding and removing #includes.
So I thought I should run "make depends" to fix up the Makefile.
Problem 1: the generated .depends file doesn't seem to be connected to the
Makefile.
Oh well, I'll just take the .depends file and use it to update Makefile.in
... errm ... well, possible, but hardly "simple".
Is there some recommended way of doing this that doesn't involve lots of
hand-editing?
Problem 2: it appears that “make depends” and “make depend” have been
broken since:
> commit 6078dd9a9708077bb32d7027b3699a4bcc3d0a93
> Author: Chet Ramey <chet.ramey@case.edu>
> Date: 2018-04-20 11:38:52 -0400
which replaced support/mkdep with a version that lacked the “-c compiler”
option and the “--” end-of-options marker, both of which are required for
the “depends” make target:
> $(Program) $(SUPPORT_SRC)mkdep* -c ${CC} -- *${CCFLAGS} ${CSOURCES}
I note that the “depend” and “depends” targets have been present since:
> commit bb70624e964126b7ac4ff085ba163a9c35ffa18f (tag: bash-2.04-tarball)
> Author: Jari Aalto <jari.aalto@cante.net>
> Date: 2000-03-17 21:46:59 +0000
>
(and that was just to fix a typo from when it was created in 1997)
-Martin
PS: It seems like that Makefile line should use “sh” rather than
“$(Program)”, otherwise it would be impossible to go “make depend” before
the initial build.
PPS: "mkdep" seems like a deficient exemplar of a robust shell script; lack
of quoting; broken and missing error checking; error messages to stdout
instead of stderr.
- "make depend(s)" broken,
Martin D Kealey <=