Skip to content

Commit

Permalink
fix native/file
Browse files Browse the repository at this point in the history
- works with static build only
- cleanup cross/file/Makefile
  • Loading branch information
hgy59 committed Sep 21, 2023
1 parent e71bdf6 commit 866ae29
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 21 deletions.
22 changes: 1 addition & 21 deletions cross/file/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -15,29 +15,9 @@ GNU_CONFIGURE = 1

ADDITIONAL_CPPFLAGS = -Os

#COMPILE_TARGET = file_compile

#
# file -m /spksrc/native/file/work-native/install/usr/local/share/misc/magic.mgc -C -m magic



#BIN_PATH = $(abspath $(WORK_DIR)/../../../native/file/work-native/install/usr/local/bin)
#ENV += PATH:=$(BIN_PATH):$(PATH)
#MAGIC_FILE = $(abspath $(WORK_DIR)/../../../native/file/work-native/install/usr/local/share/misc/magic.mgc)
#ENV += NATIVE_MAGIC=$(MAGIC_FILE)

#NATIVE_FILE = $(BIN_PATH)/file
# Inject native/file into magic/Makefile (by patched Makefile.in)
NATIVE_FILE = $(abspath $(WORK_DIR)/../../../native/file/work-native/install/usr/local/bin/file)
ENV += NATIVE_FILE=$(NATIVE_FILE)
#export PATH:=$(BIN_PATH):$(PATH)

#COMPILE_MAKE_OPTIONS = MAGIC=$(MAGIC_FILE)

include ../../mk/spksrc.cross-cc.mk


.PHONY: file_compile
file_compile:
$(RUN) MAGIC=$(MAGIC_FILE) $(MAKE)

4 changes: 4 additions & 0 deletions native/file/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,9 @@ COMMENT = The file command is "a file type guesser", that is, a command-line to
LICENSE = https://github.com/file/file/blob/master/COPYING

GNU_CONFIGURE = 1
# force build of static version
# otherwise magic.mgc fails to build with error:
# Compiled magic version [545] does not match with shared library magic version [539]
CONFIGURE_ARGS += --enable-static --disable-shared

include ../../mk/spksrc.native-cc.mk

0 comments on commit 866ae29

Please sign in to comment.