[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] lib/readline/doc makefiles clean targets
From: |
Mike Jonkmans |
Subject: |
Re: [PATCH] lib/readline/doc makefiles clean targets |
Date: |
Mon, 4 Nov 2024 15:44:01 +0100 |
On Sun, Nov 03, 2024 at 03:28:27PM -0500, Chet Ramey wrote:
> On 11/1/24 6:20 PM, Mike Jonkmans wrote:
> > On Fri, Nov 01, 2024 at 01:25:46PM -0400, Chet Ramey wrote:
> > > On 10/29/24 1:04 PM, Mike Jonkmans wrote:
> > > > Hi Chet et al.,
> > > >
> > > > If I run, on devel (4917f285):
> > > > - ./configure
> > > > - make
> > > > - make clean
> > > > - git status
> > > >
> > > > I would expect to see nothing special.
> > > > Instead:
> > > > a) a whole bunch of files got deleted in lib/readline/doc.
> > > Yeah. Those files aren't part of the bash distribution, and so they get
> > > cleaned. I left them there the last couple of pushes because I wanted
> > > people to get a look at the documentation updates I made. It was easier
> > > for me than splitting the files between the bash and readline devel
> > > branches.
> > Ok, i see.
> > Sort of a problem is, that these files aren't explicitly made by make.
> They are. Unless you mean the intermediate files created by running tex
> to make the dvi files.
I see you pushed some changes here, nice.
> > According to info (make)Standard Targets, we should have:
> > mostlyclean < clean < distclean < maintainer-clean
> That hierarchy isn't gospel.
Agreed, but...
> The current Makefile rules are fine.
There are some issues though. Some less important.
1) After 'make distclean', it doesn't build: some .o files need y.tab.h.
2) The use of recursive make, makes it harder to do dependencies right;
2a) Building outside of the source tree does not have proper deps;
3) The various Makefiles disagree on 'clean: mostlyclean' versus
'mostlyclean: clean';
4) .PHONY is not used for the sub-makes *clean rules;
5) git (status), .gitignore and make are disconnected;
6) There is redundancy/duplication in the actions of various rules;
6) Same for the definitions of variables.
> > (One could argue, whether the devel branch is a distribution.)
> It's not. It's a snapshot of ongoing work.
As such, it has the purpose of:
- bringing in early fixes/patches;
- communicating future changes, eliciting comments.
So the devel branch should be easy to work with for outsiders.
That, in my opinion, would warrant more adherence to the
standard make targets. It doesn't need to be religious,
perhaps stating deviations and/or documenting what the expectations
are on the various make-targets. INSTALL already has some text.
Are you often building from devel yourself? As maybe a check, in git,
on a push to devel, would be nice to have.
Anyway, I suppose that for the clean-targets (not maintainer-clean)
git restore .; configure; make `clean-target'
should see no deleted/modified files in 'git status'.
This currently is not the case for mostlyclean and distclean.
> > Would you accept patches for:
> > a) reversing mostlyclean/clean;
> > b) rewrite mostlyclean/clean/distclean as described;
> > c) rewrite maintainer-clean so that it reuses the other clean-targets.
> I can make the appropriate changes, you don't need to send patches.
Not doing things, I can do that ;)
> > I guess that config.h, buildconf.h etc. - products of running configure
> > or config.status - are 'files recording the configuration'.
> > Thus should be exempt from 'make clean mostlyclean'.
> They already are.
Correct.
I was merely wondering what 'files recording the configuration' means.
That could also be interpreted as only config.status,
not the files generated from the various *.in files.
Misc notes
- examples/loadables/Makefile(.in) has no mostlyclean target.
The error is ignored, but clutters the output.
- 'make mostlyclean' removes doc/bashref.* and doc/Makefile.
No recovery, must run 'git restore doc; configure'.
- in doc/Makefile: the maybe-clean test should use realpath (cd ...; pwd -P)
--
Regards, Mike Jonkmans
- Re: [PATCH] lib/readline/doc makefiles clean targets, Chet Ramey, 2024/11/01
- Re: [PATCH] lib/readline/doc makefiles clean targets, Mike Jonkmans, 2024/11/01
- Re: [PATCH] lib/readline/doc makefiles clean targets, Chet Ramey, 2024/11/03
- Re: [PATCH] lib/readline/doc makefiles clean targets,
Mike Jonkmans <=
- Re: [PATCH] lib/readline/doc makefiles clean targets, Chet Ramey, 2024/11/07
- Re: [PATCH] lib/readline/doc makefiles clean targets, Mike Jonkmans, 2024/11/08
- Re: [PATCH] lib/readline/doc makefiles clean targets, Chet Ramey, 2024/11/11
- Re: [PATCH] lib/readline/doc makefiles clean targets, Mike Jonkmans, 2024/11/14
- Re: [PATCH] lib/readline/doc makefiles clean targets, Chet Ramey, 2024/11/14
- Re: [PATCH] lib/readline/doc makefiles clean targets, Zachary Santer, 2024/11/12
- Re: [PATCH] lib/readline/doc makefiles clean targets, Grisha Levit, 2024/11/12
- Re: [PATCH] lib/readline/doc makefiles clean targets, Chet Ramey, 2024/11/13
- Re: [PATCH] lib/readline/doc makefiles clean targets, Grisha Levit, 2024/11/18
- Re: [PATCH] lib/readline/doc makefiles clean targets, Chet Ramey, 2024/11/19