]> git.ipfire.org Git - ipfire-2.x.git/commitdiff
fmt: Use in place of ccache bundled version
authorAdolf Belka <adolf.belka@ipfire.org>
Mon, 16 Feb 2026 10:51:49 +0000 (11:51 +0100)
committerMichael Tremer <michael.tremer@ipfire.org>
Tue, 17 Feb 2026 16:42:20 +0000 (16:42 +0000)
Signed-off-by: Adolf Belka <adolf.belka@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
lfs/fmt

diff --git a/lfs/fmt b/lfs/fmt
index 2c99ee9e7ffb6847fb92b50c562ec9d57b7884b8..c14652b60e7cb1f788abcd53c8a32aeb1006ef5a 100644 (file)
--- a/lfs/fmt
+++ b/lfs/fmt
@@ -1,7 +1,7 @@
 ###############################################################################
 #                                                                             #
 # IPFire.org - A linux based firewall                                         #
-# Copyright (C) 2007-2025  IPFire Team  <info@ipfire.org>                     #
+# Copyright (C) 2007-2026  IPFire Team  <info@ipfire.org>                     #
 #                                                                             #
 # This program is free software: you can redistribute it and/or modify        #
 # it under the terms of the GNU General Public License as published by        #
@@ -32,12 +32,27 @@ THISAPP    = fmt-$(VER)
 DL_FILE    = $(THISAPP).tar.gz
 DL_FROM    = $(URL_IPFIRE)
 DIR_APP    = $(DIR_SRC)/$(THISAPP)
-TARGET     = $(DIR_INFO)/$(THISAPP)
 PROG       = fmt
-PAK_VER    = 9
+PAK_VER    = 10
 
 DEPS       =
 
+SERVICES   =
+
+# Normal build or $(TOOLS_DIR) build.
+#
+ifeq "$(ROOT)" ""
+  TARGET     = $(DIR_INFO)/$(THISAPP)
+  CMAKE_OPTIONS = \
+       -D CMAKE_INSTALL_PREFIX=/usr \
+       -D BUILD_SHARED_LIBS=TRUE
+else
+  TARGET     = $(DIR_INFO)/$(THISAPP)-tools
+  CMAKE_OPTIONS = \
+       -D CMAKE_INSTALL_PREFIX=$(TOOLS_DIR) \
+       -D BUILD_SHARED_LIBS=TRUE
+endif
+
 ###############################################################################
 # Top-level Rules
 ###############################################################################
@@ -80,9 +95,9 @@ $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
        @$(PREBUILD)
        @rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar axf $(DIR_DL)/$(DL_FILE)
        cd $(DIR_APP) && mkdir -pv build
-       cd $(DIR_APP)/build && cmake .. \
-                           -D CMAKE_INSTALL_PREFIX=/usr \
-                           -D BUILD_SHARED_LIBS=TRUE
+       cd $(DIR_APP)/build && cmake \
+                               $(CMAKE_OPTIONS) \
+                               ..
        cd $(DIR_APP)/build && make $(MAKETUNING)
        cd $(DIR_APP)/build && make install
        @rm -rf $(DIR_APP)