Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

build: Fix FoX-config path after make install

FoX-config reports the location of libs and module
files for users of the FoX. If make install is run
(to install into the --prifix= location) these are
wrong. Update the reported location at install time
such that FoX-config still works if make install is
not run (i.e. FoX is used in-place). The fix is a
bit ugly but seems to work.
  • Loading branch information...
commit ff7d104bd54b324b6c4bd5d2c43996d4624c86d3 1 parent b289fa6
@andreww authored
Showing with 6 additions and 0 deletions.
  1. +6 −0 Makefile
6 Makefile
@@ -8,11 +8,17 @@ default: objsdir $(BUILD_TARGETS) examples_build
mkdir -p objs/lib objs/finclude
+# Note the hackery to fix the prefix in FoX-config when installed without breaking
+# use from the local directory (which would just need a one-line fix in
+# We restore the origional FoX-config so local version still works.
install: objsdir $(BUILD_TARGETS)
$(MKDIR_P) $(install_prefix)/lib $(install_prefix)/finclude $(install_prefix)/bin
$(INSTALL) objs/lib/* $(install_prefix)/lib
$(INSTALL) -m 644 objs/finclude/* $(install_prefix)/finclude
+ sed -e s#comp_prefix=.*#comp_prefix=$(install_prefix)# FoX-config > FoX-config.tmp
+ mv FoX-config FoX-config.old ; mv FoX-config.tmp FoX-config
$(INSTALL) FoX-config $(install_prefix)/bin
+ mv FoX-config.old FoX-config
examples_build: $(BUILD_TARGETS)
if test -d examples; then (cd examples; $(MAKE) VPATH=$(VPATH)/examples) fi
Please sign in to comment.
Something went wrong with that request. Please try again.