From d0ee4188c509f8c7e86ef7a2bf538e42896419d4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Viktor=20S=C3=B6derqvist?= Date: Thu, 25 Apr 2024 23:19:15 +0200 Subject: [PATCH] Don't let install flags affect build (#382) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Don't let the Make valiable `USE_REDIS_SYMLINKS` affect the build. If it does, it causes the second line in the example below (`make install`) to recompile what was already compiled on the line above, and this time it's built without BUILD_TLS=yes USE_SYSTEMD=yes. make BUILD_TLS=yes USE_SYSTEMD=yes make PREFIX=custom/usr USE_REDIS_SYMLINKS=no install Fixes #377 Signed-off-by: Viktor Söderqvist --- src/Makefile | 3 +-- src/server.c | 4 +--- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/src/Makefile b/src/Makefile index 47b961862..b73d509fe 100644 --- a/src/Makefile +++ b/src/Makefile @@ -348,7 +348,6 @@ USE_REDIS_SYMLINKS?=yes ifeq ($(USE_REDIS_SYMLINKS),yes) MAYBE_INSTALL_REDIS_SYMLINK=$(INSTALL_REDIS_SYMLINK) MAYBE_UNINSTALL_REDIS_SYMLINK=@rm -f $(1)/$(subst $(ENGINE_NAME),redis,$(2)) - FINAL_CFLAGS+= -DUSE_REDIS_SYMLINKS else MAYBE_INSTALL_REDIS_SYMLINK= MAYBE_UNINSTALL_REDIS_SYMLINK= @@ -567,4 +566,4 @@ uninstall: $(call MAYBE_UNINSTALL_REDIS_SYMLINK,$(INSTALL_BIN),$(ENGINE_BENCHMARK_NAME)) $(call MAYBE_UNINSTALL_REDIS_SYMLINK,$(INSTALL_BIN),$(ENGINE_CHECK_RDB_NAME)) $(call MAYBE_UNINSTALL_REDIS_SYMLINK,$(INSTALL_BIN),$(ENGINE_CHECK_AOF_NAME)) - $(call MAYBE_UNINSTALL_REDIS_SYMLINK,$(INSTALL_BIN),$(ENGINE_SENTINEL_NAME)) \ No newline at end of file + $(call MAYBE_UNINSTALL_REDIS_SYMLINK,$(INSTALL_BIN),$(ENGINE_SENTINEL_NAME)) diff --git a/src/server.c b/src/server.c index 0864ec7d4..02191da78 100644 --- a/src/server.c +++ b/src/server.c @@ -7021,15 +7021,13 @@ int main(int argc, char **argv) { else if (strstr(exec_name,"valkey-check-aof") != NULL) redis_check_aof_main(argc,argv); - /* If enable USE_REDIS_SYMLINKS, valkey may install symlinks like + /* valkey may install symlinks like * redis-server -> valkey-server, redis-check-rdb -> valkey-check-rdb, * redis-check-aof -> valkey-check-aof, etc. */ -#ifdef USE_REDIS_SYMLINKS if (strstr(exec_name,"redis-check-rdb") != NULL) redis_check_rdb_main(argc, argv, NULL); else if (strstr(exec_name,"redis-check-aof") != NULL) redis_check_aof_main(argc,argv); -#endif if (argc >= 2) { j = 1; /* First option to parse in argv[] */