Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#27 Build-Error (install-target for shared lib broken)

closed-fixed
nobody
None
5
2012-03-10
2012-01-02
Michael Sandino
No

Hi!
A few things I noticed when trying to build libjson 7.4.1 as shared library:

1.) The install-path is never created which causes $(inst_path)/lib to be the library file instead of a directory with the file in it.
2.) The ifneq-statement cannot be used in the target itself (because it's not bash code).

Here's the corrected version which worked for me:

ifeq ($(SHARED),1)
install: banner install_headers $(lib_target)
@echo "Install shared library"
mkdir -p $(inst_path)
cp -f ./$(lib_target) $(inst_path)
cd $(inst_path) ; \ ln -sf $(lib_target) $(libname_shared_major_version) ; \ ln -sf $(libname_shared_major_version) $(libname_shared)
if [ "$(OS)" != "Darwin" ]; then ldconfig; fi
@echo "Install shared library: Done."
else
install: banner install_headers $(lib_target)
@echo "Install static library"
cp -f ./$(lib_target) $(inst_path)
@echo "Install static library: Done."
endif

Discussion

  • Thanks for letting me know, it's been fixed in the release currently undergoing testing.

     
    • status: open --> closed-fixed