GNU gettext and a couple of gnulib modules need only half of the 'dirname-lgpl' module, namely essentially the 'basename' equivalent function (now called 'last_component'). In order to minimize dependencies, let me split this out into a separate module. So, 'dirname-lgpl' now depends on 'basename-lgpl'. Also, let me enhance the documentation of function 'last_component'. In particular, the documentation should state - what is the return value in case of a trailing slash, - why it is called 'last_component' and not 'basename', - what is the different w.r.t. glibc 'basename'. 2020-07-05 Bruno Haible mkancesdirs: Trim module dependencies. * lib/mkancesdirs.c: Include filename.h instead of dirname.h. * modules/mkancesdirs (Depends-on): Remove dirname-lgpl. Add filename. 2020-07-05 Bruno Haible getprogname: Trim module dependencies. * lib/getprogname.c: Include basename-lgpl.h instead of dirname.h. * modules/getprogname (Depends-on): Remove dirname-lgpl. Add basename-lgpl. 2020-07-05 Bruno Haible filenamecat-lgpl: Trim module dependencies. * lib/filenamecat-lgpl.c: Include basename-lgpl.h, filename.h instead of dirname.h. * modules/filenamecat-lgpl (Depends-on): Remove dirname-lgpl. Add basename-lgpl, filename. 2020-07-05 Bruno Haible backupfile, backup-rename: Trim module dependencies. * lib/backupfile.c: Include basename-lgpl.h instead of dirname.h. * modules/backupfile (Depends-on): Remove dirname-lgpl. Add basename-lgpl. * modules/backup-rename (Depends-on): Likewise. 2020-07-05 Bruno Haible argp: Trim module dependencies. * lib/argp-namefrob.h: Include basename-lgpl.h instead of dirname.h. * modules/argp (Depends-on): Remove dirname-lgpl. Add basename-lgpl. 2020-07-05 Bruno Haible basename-lgpl: New module. * lib/basename-lgpl.h: New file, based on lib/dirname.h and lib/basename-lgpl.c. * lib/basename-lgpl.c: Include basename-lgpl.h, not dirname.h. Include , filename.h. (last_component): Rename a local variable. * lib/dirname.h: Include basename-lgpl.h. (DOUBLE_SLASH_IS_DISTINCT_ROOT): Remove macro. (last_component, base_len): Remove declarations. * modules/basename-lgpl: New file. * modules/dirname-lgpl (Files): Remove lib/basename-lgpl.c. (Depends-on): Add basename-lgpl. Remove double-slash-root. (Makefile.am): Don't compile basename-lgpl.c. * doc/posix-functions/basename.texi: Mention the module 'basename-lgpl', not 'dirname'. 2020-07-05 Bruno Haible dirname, dirname-lgpl: Simplify. * m4/dirname.m4: Remove file. * modules/dirname (configure.ac): Don't invoke gl_DIRNAME. * modules/dirname-lgpl (Files): Remove m4/dirname.m4. (configure.ac): Don't invoke gl_DIRNAME_LGPL.