|
From: | Bruno Haible |
Subject: | Re: More systematic naming of LIB variables |
Date: | Sat, 07 Jan 2023 18:05:15 +0100 |
There are more variables to rename for this convention: $(ACOS_LIBM) etc. $(FILE_HAS_ACL_LIB) $(GETADDRINFO_LIB) $(GETHOSTNAME_LIB) $(GETLOADAVG_LIBS) $(HOSTENT_LIB) $(INET_NTOP_LIB) $(INET_PTON_LIB) $(LIB_CLOCK_GETTIME) -> $(CLOCK_TIME_LIB) $(LIB_CRYPTO) $(LIB_DUPLOCALE) -> $(DUPLOCALE_LIB) $(LIB_EACCESS) -> $(EUIDACCESS_LIBGEN) $(LIB_EXECINFO) $(LIB_FDATASYNC) -> $(FDATASYNC_LIB) $(LIB_GETHRXTIME) -> $(GETHRXTIME_LIB) $(LIB_GETLOGIN) -> $(GETLOGIN_LIB) $(LIB_GETRANDOM) -> $(GETRANDOM_LIB) $(LIB_HARD_LOCALE) -> $(HARD_LOCALE_LIB) $(LIB_MBRTOWC) -> $(MBRTOWC_LIB) $(LIB_NANOSLEEP) -> $(NANOSLEEP_LIB) $(LIB_POLL) -> $(POLL_LIB) $(LIB_POSIX_SPAWN) -> $(POSIX_SPAWN_LIB) $(LIB_PTHREAD_SIGMASK) -> $(PTHREAD_SIGMASK_LIB) $(LIB_SCHED_YIELD) -> $(SCHED_YIELD_LIB) $(LIB_SELECT) -> $(SELECT_LIB) $(LIB_SELINUX) $(LIB_SETLOCALE) -> $(SETLOCALE_LIB) $(LIB_SETLOCALE_NULL) -> $(SETLOCALE_NULL_LIB) $(LIBSOCKET) $(LIB_TIMER_TIME) -> $(TIMER_TIME_LIB) $(PTY_LIB) $(SERVENT_LIB) $(YIELD_LIB) Still, I think this convention is good to follow, because - for $(ACOS_LIBM) etc. and $(EUIDACCESS_LIBGEN) it allows to include both the module and the library name, - given the variable name, e.g. LIB_POLL, you don't need to guess whether it will link to libpoll, - for the ACL module, it allows to distinguish between $(ACL_LIB) and $(LIB_ACL). We can very well have $(LIB_ACL) = -lacl together with $(ACL_LIB) = -lattr or $(ACL_LIB) = -lacl -lattr. On the other hand, sometimes (for libraries that are likely to be installed by the user, not part of the system) we need to distinguish between $(LIBFOO) - used when linking without libtool, $(LTLIBFOO) - used when linking with libtool. But this applies to few variables only. So far, only LIBCSTACK / LTLIBCSTACK is in this category and stands out against the the convention. I think in the past, I wanted all LIB variables to start with LIB, so that they could have a LTLIB counterpart. But now that we use only system-provided libraries for multithreading (GNU pth support was removed a long time ago), this theoretical advantage is not important any more. 2023-01-07 Bruno Haible <bruno@clisp.org> timer_time: Rename LIB_TIMER_TIME to TIMER_TIME_LIB. * m4/timer_time.m4: Rename LIB_TIMER_TIME to TIMER_TIME_LIB. All uses changed. * NEWS: Mention the change 2023-01-07 Bruno Haible <bruno@clisp.org> setlocale-null: Rename LIB_SETLOCALE_NULL to SETLOCALE_NULL_LIB. * m4/setlocale_null.m4: Rename LIB_SETLOCALE_NULL to SETLOCALE_NULL_LIB. All uses changed. * NEWS: Mention the change 2023-01-07 Bruno Haible <bruno@clisp.org> setlocale: Rename LIB_SETLOCALE to SETLOCALE_LIB. * m4/setlocale.m4: Rename LIB_SETLOCALE to SETLOCALE_LIB. All uses changed. * NEWS: Mention the change. 2023-01-07 Bruno Haible <bruno@clisp.org> select: Rename LIB_SELECT to SELECT_LIB. * m4/select.m4: Rename LIB_SELECT to SELECT_LIB. All uses changed. * NEWS: Mention the change. 2023-01-07 Bruno Haible <bruno@clisp.org> sched_yield: Rename LIB_SCHED_YIELD to SCHED_YIELD_LIB. * m4/threadlib.m4: Rename LIB_SCHED_YIELD to SCHED_YIELD_LIB. All uses changed. * NEWS: Mention the change. 2023-01-07 Bruno Haible <bruno@clisp.org> pthread_sigmask: Rename LIB_PTHREAD_SIGMASK to PTHREAD_SIGMASK_LIB. * m4/pthread_sigmask.m4: Rename LIB_PTHREAD_SIGMASK to PTHREAD_SIGMASK_LIB. All uses changed. * NEWS: Mention the change. 2023-01-07 Bruno Haible <bruno@clisp.org> posix_spawn: Rename LIB_POSIX_SPAWN to POSIX_SPAWN_LIB. * m4/spawn_h.m4: Rename LIB_POSIX_SPAWN to POSIX_SPAWN_LIB. All uses changed. * NEWS: Mention the change. 2023-01-07 Bruno Haible <bruno@clisp.org> poll: Rename LIB_POLL to POLL_LIB. * m4/poll.m4: Rename LIB_POLL to POLL_LIB. All uses changed. * NEWS: Mention the change. 2023-01-07 Bruno Haible <bruno@clisp.org> nanosleep: Rename LIB_NANOSLEEP to NANOSLEEP_LIB. * m4/nanosleep.m4: Rename LIB_NANOSLEEP to NANOSLEEP_LIB. All uses changed. * NEWS: Mention the change. 2023-01-07 Bruno Haible <bruno@clisp.org> mbrtowc: Rename LIB_MBRTOWC to MBRTOWC_LIB. * m4/mbrtowc.m4: Rename LIB_MBRTOWC to MBRTOWC_LIB. All uses changed. * NEWS: Mention the change. 2023-01-07 Bruno Haible <bruno@clisp.org> hard-locale: Rename LIB_HARD_LOCALE to HARD_LOCALE_LIB. * modules/hard-locale (configure.ac): Rename LIB_HARD_LOCALE to HARD_LOCALE_LIB. All uses changed. * NEWS: Mention the change. 2023-01-07 Bruno Haible <bruno@clisp.org> getrandom: Rename LIB_GETRANDOM to GETRANDOM_LIB. * m4/getrandom.m4: Rename LIB_GETRANDOM to GETRANDOM_LIB. All uses changed. * NEWS: Mention the change. 2023-01-07 Bruno Haible <bruno@clisp.org> getlogin, getlogin_r: Rename LIB_GETLOGIN to GETLOGIN_LIB. * m4/getlogin.m4: Rename LIB_GETLOGIN to GETLOGIN_LIB. All uses changed. * NEWS: Mention the change. 2023-01-07 Bruno Haible <bruno@clisp.org> gethrxtime: Rename LIB_GETHRXTIME to GETHRXTIME_LIB. * m4/gethrxtime.m4: Rename LIB_GETHRXTIME to GETHRXTIME_LIB. All uses changed. * NEWS: Mention the change. 2023-01-07 Bruno Haible <bruno@clisp.org> fdatasync: Rename LIB_FDATASYNC to FDATASYNC_LIB. * m4/fdatasync.m4: Rename LIB_FDATASYNC to FDATASYNC_LIB. All uses changed. * NEWS: Mention the change. 2023-01-07 Bruno Haible <bruno@clisp.org> euidaccess: Rename LIB_EACCESS to EUIDACCESS_LIBGEN. * m4/euidaccess.m4: Rename LIB_EACCESS to EUIDACCESS_LIBGEN. All uses changed. * NEWS: Mention the change. 2023-01-07 Bruno Haible <bruno@clisp.org> duplocale: Rename LIB_DUPLOCALE to DUPLOCALE_LIB. * m4/duplocale.m4: Rename LIB_DUPLOCALE to DUPLOCALE_LIB. All uses changed. * NEWS: Mention the change. 2023-01-07 Bruno Haible <bruno@clisp.org> clock_time: Rename LIB_CLOCK_GETTIME to CLOCK_TIME_LIB. * m4/clock_time.m4: Rename LIB_CLOCK_GETTIME to CLOCK_TIME_LIB. All uses changed. * NEWS: Mention the change.
0001-clock_time-Rename-LIB_CLOCK_GETTIME-to-CLOCK_TIME_LI.patch
Description: Text Data
0002-duplocale-Rename-LIB_DUPLOCALE-to-DUPLOCALE_LIB.patch
Description: Text Data
0003-euidaccess-Rename-LIB_EACCESS-to-EUIDACCESS_LIBGEN.patch
Description: Text Data
0004-fdatasync-Rename-LIB_FDATASYNC-to-FDATASYNC_LIB.patch
Description: Text Data
0005-gethrxtime-Rename-LIB_GETHRXTIME-to-GETHRXTIME_LIB.patch
Description: Text Data
0006-getlogin-getlogin_r-Rename-LIB_GETLOGIN-to-GETLOGIN_.patch
Description: Text Data
0007-getrandom-Rename-LIB_GETRANDOM-to-GETRANDOM_LIB.patch
Description: Text Data
0008-hard-locale-Rename-LIB_HARD_LOCALE-to-HARD_LOCALE_LI.patch
Description: Text Data
0009-mbrtowc-Rename-LIB_MBRTOWC-to-MBRTOWC_LIB.patch
Description: Text Data
0010-nanosleep-Rename-LIB_NANOSLEEP-to-NANOSLEEP_LIB.patch
Description: Text Data
0011-poll-Rename-LIB_POLL-to-POLL_LIB.patch
Description: Text Data
0012-posix_spawn-Rename-LIB_POSIX_SPAWN-to-POSIX_SPAWN_LI.patch
Description: Text Data
0013-pthread_sigmask-Rename-LIB_PTHREAD_SIGMASK-to-PTHREA.patch
Description: Text Data
0014-sched_yield-Rename-LIB_SCHED_YIELD-to-SCHED_YIELD_LI.patch
Description: Text Data
0015-select-Rename-LIB_SELECT-to-SELECT_LIB.patch
Description: Text Data
0016-setlocale-Rename-LIB_SETLOCALE-to-SETLOCALE_LIB.patch
Description: Text Data
0017-setlocale-null-Rename-LIB_SETLOCALE_NULL-to-SETLOCAL.patch
Description: Text Data
0018-timer_time-Rename-LIB_TIMER_TIME-to-TIMER_TIME_LIB.patch
Description: Text Data
[Prev in Thread] | Current Thread | [Next in Thread] |