Jordan Crouse submitted a patch to only include xregcomp.c when we actually use it, thus fixing building against uClibc with regex support disabled.
This commit was genuinely broken at the time (not related to our build system): scripts/config/mkconfigs.c (2005-08-01 - 2006-10-05 arasi) uretilen bbconfigopts.h icine .config satirlarini kacissiz, ham newline'larla gömüyordu - gecerli C degildi, busybox'un kendi bb_mkdep araci bile parse edemiyordu (7d219aab7 ile duzeltildi, mkconfigs shell scripte cevrildi)
No binary (build failed)
—
(log yok)
| @@ -29,7 +29,7 @@ LIBBB-y:= \ | |
| safe_strncpy.c setup_environment.c sha1.c simplify_path.c \ | |
| trim.c u_signal_names.c vdprintf.c verror_msg.c \ | |
| vherror_msg.c vperror_msg.c wfopen.c xconnect.c xgetcwd.c xstat.c \ | |
| - | xgethostbyname.c xgethostbyname2.c xreadlink.c xregcomp.c xgetlarg.c \ |
| + | xgethostbyname.c xgethostbyname2.c xreadlink.c xgetlarg.c \ |
| get_terminal_width_height.c fclose_nonstdin.c fflush_stdout_and_exit.c \ | |
| getopt_ulflags.c default_error_retval.c wfopen_input.c speed_table.c \ | |
| perror_nomsg_and_die.c perror_nomsg.c skip_whitespace.c bb_askpass.c \ | |
| @@ -49,6 +49,20 @@ LIBBB-$(CONFIG_LOGIN)+= correct_password.c | |
| LIBBB-$(CONFIG_DF)+= find_mount_point.c | |
| LIBBB-$(CONFIG_EJECT)+= find_mount_point.c | |
| + | # We shouldn't build xregcomp.c if we don't need it - this ensures we don't |
| + | # require regex.h to be in the include dir even if we don't need it thereby |
| + | # allowing us to build busybox even if uclibc regex support is disabled. |
| + | |
| + | regex-y:= |
| + | |
| + | regex-$(CONFIG_AWK) += xregcomp.c |
| + | regex-$(CONFIG_SED) += xregcomp.c |
| + | regex-$(CONFIG_LESS) += xregcomp.c |
| + | regex-$(CONFIG_DEVFSD) += xregcomp.c |
| + | |
| + | # Sort has the happy side efect of returning a unique list |
| + | LIBBB-y += $(sort $(regex-y)) |
| + | |
| LIBBB-y:=$(patsubst %,$(srcdir)/%,$(LIBBB-y)) | |
| get-file-subparts = $(addsuffix .o,$(shell sed -n -e "s/^\#ifdef L_//p" ${1})) | |