Zhaoming Luo, le sam. 11 janv. 2025 10:05:55 +0800, a ecrit: > I haven't added `USE_PARTED` to exlcude the parted module, but I have > added `?=` to `dir` and `libname` to factorize the Makefile. However, > the libstore-noparted.so.0.3 file does not link to libparted. It is > expected to link to libparted before I use `USE_PARTED` to exclude the > parted module. > > The commands to reproduce: > ``` > mkdir build > cd build && ../configure > make libstore-noparted > ldd libstore-noparted/libstore-noparted.so.0.3 > ``` > > --- > Makefile | 1 + > libstore-noparted/Makefile | 9 +++++++++ > libstore/Makefile | 5 +++-- > 3 files changed, 13 insertions(+), 2 deletions(-) > create mode 100644 libstore-noparted/Makefile > > diff --git a/Makefile b/Makefile > index 9d9e33c3..f8e38b71 100644 > --- a/Makefile > +++ b/Makefile > @@ -33,6 +33,7 @@ lib-subdirs = libshouldbeinlibc libihash libiohelp libports > \ > libbpf \ > libmachdev \ > libirqhelp \ > + libstore-noparted \ > > # Hurd programs > prog-subdirs = auth proc exec term \ > diff --git a/libstore-noparted/Makefile b/libstore-noparted/Makefile > new file mode 100644 > index 00000000..694218c1 > --- /dev/null > +++ b/libstore-noparted/Makefile > @@ -0,0 +1,9 @@ > +# Use the source files from the libstore library > + > +dir := libstore-noparted > + > +libname := libstore-noparted > + > +VPATH += $(top_srcdir)/libstore
This also needs libstore-noparted.so-LDLIBS += -ldl It's just by luck that nowadays dlopen etc. are in libc and libdl.so is empty. > +include ../libstore/Makefile > diff --git a/libstore/Makefile b/libstore/Makefile > index c7af958b..62b25bd6 100644 > --- a/libstore/Makefile > +++ b/libstore/Makefile > @@ -20,10 +20,11 @@ > # along with this program; if not, write to the Free Software > # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA. > > -dir := libstore > +dir ?= libstore > +libname ?= libstore > + > makemode := library > > -libname = libstore > SRCS = create.c derive.c make.c rdwr.c set.c \ > enc.c encode.c decode.c clone.c argp.c kids.c flags.c \ > open.c xinl.c typed.c map.c url.c unknown.c \ > -- > 2.47.1 > -- Samuel jr> J'ai fait. Ne bougez pas, l'aide soignante va venir nettoyer. -+- FF in GNU - Le vieil homme et la merde -+-