[xsd-users] Building on OSX

Daniel Berjón Díez asuranceturix at gmail.com
Fri Jun 26 19:53:37 EDT 2015


Hi, I am trying to contribute a formula (
https://github.com/Homebrew/homebrew/pull/40274 ) for building xsd on OSX
under Homebrew ( http://brew.sh ), but there is a problem
in xsd/examples/cxx/tree/makefile , where the Makefile script assumes GNU
find is installed. However, OSX comes with BSD find, which does not support
-printf. I suggest the following patch, that should be compatible with both
Linux and BSD.

Cheers,
Daniel


diff --git a/xsd/examples/cxx/tree/makefile b/xsd/examples/cxx/tree/makefile
index 172195a..d8c8198 100644
--- a/xsd/examples/cxx/tree/makefile
+++ b/xsd/examples/cxx/tree/makefile
@@ -39,7 +39,7 @@ $(install): $(addprefix $(out_base)/,$(addsuffix
/.install,$(all_examples)))
 $(dist): $(addprefix $(out_base)/,$(addsuffix /.dist,$(all_examples)))
        $(call
install-data,$(src_base)/README,$(dist_prefix)/$(path)/README)

-$(dist-win): export dirs := $(shell find $(src_base) -type d -exec test -f
{}/driver.cxx ';' -printf '%P ')
+$(dist-win): export dirs := $(shell find "$(src_base)" -type d -exec test
-f {}/driver.cxx ';' -exec bash -c 'd="{}"; printf "%s "
"${d#'"$(src_base)"'/}"' ";")
 $(dist-win): |$(out_root)/.dist-pre
 $(dist-win): $(addprefix $(out_base)/,$(addsuffix
/.dist-win,$(all_examples)))
        $(call
install-data,$(src_base)/README,$(dist_prefix)/$(path)/README.txt)


More information about the xsd-users mailing list