Message ID | c7d3104b-1eeb-f0d5-6b2d-5374b5690f7b@suse.cz |
---|---|
State | New |
Headers | show |
Series | libcody: add mostlyclean Makefile target | expand |
On Mon, Oct 25, 2021 at 7:35 AM Martin Liška <mliska@suse.cz> wrote: > > Hello. > > The patch adds missing Makefile mostlyclean. > > Ready to be installed? > Thanks, > Martin > Generally the way the various "*clean" targets are arranged, in order of cleanliness, from least clean to most clean, is: mostlyclean clean distclean maintainer-clean ...with each target depending on the previous one in the order. So thus, instead of mostlyclean depending on clean, it'd be the other way around, with clean depending on mostlyclean. See how the gcc/ subdirectory does it, for example. See the "Standard Targets for Users" section of the GNU Coding Standards: https://www.gnu.org/prep/standards/html_node/Standard-Targets.html#Standard-Targets > PR other/102657 > > libcody/ChangeLog: > > * Makefile.in: Add mostlyclean Makefile target. > --- > libcody/Makefile.in | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/libcody/Makefile.in b/libcody/Makefile.in > index b8b45a2e310..d8f1e8216d4 100644 > --- a/libcody/Makefile.in > +++ b/libcody/Makefile.in > @@ -111,7 +111,7 @@ maintainer-clean:: distclean > clean:: > rm -f $(shell find $(srcdir) -name '*~') > > -.PHONY: all check clean distclean maintainer-clean > +.PHONY: all check clean distclean maintainer-clean mostlyclean > > CXXFLAGS/ := -I$(srcdir) > LIBCODY.O := buffer.o client.o fatal.o netclient.o netserver.o \ > @@ -127,6 +127,8 @@ clean:: > rm -f $(LIBCODY.O) $(LIBCODY.O:.o=.d) > rm -f libcody.a > > +mostlyclean: clean > + > CXXFLAGS/fatal.cc = -DSRCDIR='"$(srcdir)"' > > fatal.o: Makefile revision > -- > 2.33.1 >
On 10/25/21 18:10, Eric Gallager wrote: > On Mon, Oct 25, 2021 at 7:35 AM Martin Liška <mliska@suse.cz> wrote: >> >> Hello. >> >> The patch adds missing Makefile mostlyclean. >> >> Ready to be installed? >> Thanks, >> Martin >> > > Generally the way the various "*clean" targets are arranged, in order > of cleanliness, from least clean to most clean, is: > mostlyclean > clean > distclean > maintainer-clean > ...with each target depending on the previous one in the order. So > thus, instead of mostlyclean depending on clean, it'd be the other way > around, with clean depending on mostlyclean. See how the gcc/ > subdirectory does it, for example. See the "Standard Targets for > Users" section of the GNU Coding Standards: > https://www.gnu.org/prep/standards/html_node/Standard-Targets.html#Standard-Targets Thank you for the explanation. There's updated version of the patch. Patch can bootstrap on x86_64-linux-gnu and survives regression tests. Ready to be installed? Thanks, Martin > >> PR other/102657 >> >> libcody/ChangeLog: >> >> * Makefile.in: Add mostlyclean Makefile target. >> --- >> libcody/Makefile.in | 4 +++- >> 1 file changed, 3 insertions(+), 1 deletion(-) >> >> diff --git a/libcody/Makefile.in b/libcody/Makefile.in >> index b8b45a2e310..d8f1e8216d4 100644 >> --- a/libcody/Makefile.in >> +++ b/libcody/Makefile.in >> @@ -111,7 +111,7 @@ maintainer-clean:: distclean >> clean:: >> rm -f $(shell find $(srcdir) -name '*~') >> >> -.PHONY: all check clean distclean maintainer-clean >> +.PHONY: all check clean distclean maintainer-clean mostlyclean >> >> CXXFLAGS/ := -I$(srcdir) >> LIBCODY.O := buffer.o client.o fatal.o netclient.o netserver.o \ >> @@ -127,6 +127,8 @@ clean:: >> rm -f $(LIBCODY.O) $(LIBCODY.O:.o=.d) >> rm -f libcody.a >> >> +mostlyclean: clean >> + >> CXXFLAGS/fatal.cc = -DSRCDIR='"$(srcdir)"' >> >> fatal.o: Makefile revision >> -- >> 2.33.1 >>
On Tue, Oct 26, 2021 at 5:47 AM Martin Liška <mliska@suse.cz> wrote: > > On 10/25/21 18:10, Eric Gallager wrote: > > On Mon, Oct 25, 2021 at 7:35 AM Martin Liška <mliska@suse.cz> wrote: > >> > >> Hello. > >> > >> The patch adds missing Makefile mostlyclean. > >> > >> Ready to be installed? > >> Thanks, > >> Martin > >> > > > > Generally the way the various "*clean" targets are arranged, in order > > of cleanliness, from least clean to most clean, is: > > mostlyclean > > clean > > distclean > > maintainer-clean > > ...with each target depending on the previous one in the order. So > > thus, instead of mostlyclean depending on clean, it'd be the other way > > around, with clean depending on mostlyclean. See how the gcc/ > > subdirectory does it, for example. See the "Standard Targets for > > Users" section of the GNU Coding Standards: > > https://www.gnu.org/prep/standards/html_node/Standard-Targets.html#Standard-Targets > > Thank you for the explanation. > > There's updated version of the patch. > > Patch can bootstrap on x86_64-linux-gnu and survives regression tests. > > Ready to be installed? Hi, the patch looks ok to me, although I can't approve it... Who is the libcody maintainer, anyways? Nathan? Should that be listed in the MAINTAINERS file? Thanks, Eric Gallager > Thanks, > Martin > > > > >> PR other/102657 > >> > >> libcody/ChangeLog: > >> > >> * Makefile.in: Add mostlyclean Makefile target. > >> --- > >> libcody/Makefile.in | 4 +++- > >> 1 file changed, 3 insertions(+), 1 deletion(-) > >> > >> diff --git a/libcody/Makefile.in b/libcody/Makefile.in > >> index b8b45a2e310..d8f1e8216d4 100644 > >> --- a/libcody/Makefile.in > >> +++ b/libcody/Makefile.in > >> @@ -111,7 +111,7 @@ maintainer-clean:: distclean > >> clean:: > >> rm -f $(shell find $(srcdir) -name '*~') > >> > >> -.PHONY: all check clean distclean maintainer-clean > >> +.PHONY: all check clean distclean maintainer-clean mostlyclean > >> > >> CXXFLAGS/ := -I$(srcdir) > >> LIBCODY.O := buffer.o client.o fatal.o netclient.o netserver.o \ > >> @@ -127,6 +127,8 @@ clean:: > >> rm -f $(LIBCODY.O) $(LIBCODY.O:.o=.d) > >> rm -f libcody.a > >> > >> +mostlyclean: clean > >> + > >> CXXFLAGS/fatal.cc = -DSRCDIR='"$(srcdir)"' > >> > >> fatal.o: Makefile revision > >> -- > >> 2.33.1 > >>
On 10/26/2021 3:47 AM, Martin Liška wrote: > On 10/25/21 18:10, Eric Gallager wrote: >> On Mon, Oct 25, 2021 at 7:35 AM Martin Liška <mliska@suse.cz> wrote: >>> >>> Hello. >>> >>> The patch adds missing Makefile mostlyclean. >>> >>> Ready to be installed? >>> Thanks, >>> Martin >>> >> >> Generally the way the various "*clean" targets are arranged, in order >> of cleanliness, from least clean to most clean, is: >> mostlyclean >> clean >> distclean >> maintainer-clean >> ...with each target depending on the previous one in the order. So >> thus, instead of mostlyclean depending on clean, it'd be the other way >> around, with clean depending on mostlyclean. See how the gcc/ >> subdirectory does it, for example. See the "Standard Targets for >> Users" section of the GNU Coding Standards: >> https://www.gnu.org/prep/standards/html_node/Standard-Targets.html#Standard-Targets >> > > Thank you for the explanation. > > There's updated version of the patch. > > Patch can bootstrap on x86_64-linux-gnu and survives regression tests. > > Ready to be installed? > Thanks, > Martin > >> >>> PR other/102657 >>> >>> libcody/ChangeLog: >>> >>> * Makefile.in: Add mostlyclean Makefile target. >>> --- >>> libcody/Makefile.in | 4 +++- >>> 1 file changed, 3 insertions(+), 1 deletion(-) >>> >>> diff --git a/libcody/Makefile.in b/libcody/Makefile.in >>> index b8b45a2e310..d8f1e8216d4 100644 >>> --- a/libcody/Makefile.in >>> +++ b/libcody/Makefile.in >>> @@ -111,7 +111,7 @@ maintainer-clean:: distclean >>> clean:: >>> rm -f $(shell find $(srcdir) -name '*~') >>> >>> -.PHONY: all check clean distclean maintainer-clean >>> +.PHONY: all check clean distclean maintainer-clean mostlyclean >>> >>> CXXFLAGS/ := -I$(srcdir) >>> LIBCODY.O := buffer.o client.o fatal.o netclient.o netserver.o \ >>> @@ -127,6 +127,8 @@ clean:: >>> rm -f $(LIBCODY.O) $(LIBCODY.O:.o=.d) >>> rm -f libcody.a >>> >>> +mostlyclean: clean >>> + >>> CXXFLAGS/fatal.cc = -DSRCDIR='"$(srcdir)"' >>> >>> fatal.o: Makefile revision >>> -- >>> 2.33.1 >>> > > 0001-libcody-add-mostlyclean-Makefile-target.patch > > From fcad6039f910b49dfc4022d3b1eeb993025dabca Mon Sep 17 00:00:00 2001 > From: Martin Liska <mliska@suse.cz> > Date: Mon, 25 Oct 2021 16:32:55 +0200 > Subject: [PATCH] libcody: add mostlyclean Makefile target > > PR other/102657 > > libcody/ChangeLog: > > * Makefile.in: Add mostlyclean Makefile target. OK jeff
diff --git a/libcody/Makefile.in b/libcody/Makefile.in index b8b45a2e310..d8f1e8216d4 100644 --- a/libcody/Makefile.in +++ b/libcody/Makefile.in @@ -111,7 +111,7 @@ maintainer-clean:: distclean clean:: rm -f $(shell find $(srcdir) -name '*~') -.PHONY: all check clean distclean maintainer-clean +.PHONY: all check clean distclean maintainer-clean mostlyclean CXXFLAGS/ := -I$(srcdir) LIBCODY.O := buffer.o client.o fatal.o netclient.o netserver.o \ @@ -127,6 +127,8 @@ clean:: rm -f $(LIBCODY.O) $(LIBCODY.O:.o=.d) rm -f libcody.a +mostlyclean: clean + CXXFLAGS/fatal.cc = -DSRCDIR='"$(srcdir)"' fatal.o: Makefile revision