consortium / transformer

HTML 2 EPUB conversion using the Transpect tool set
1 stars 0 forks source link

Makefile OS X compatibility #1

Closed codingisacopingstrategy closed 8 years ago

codingisacopingstrategy commented 8 years ago

Hello,

The Makefile is at the moment not working on OS X.

uname -o is not recognised on OS X. Simply using uname does work, but I’m not sure it gives the required output on Cygwin.

readline -f doesn’t work in the version of BSD readline included in OS X. The Calabash front-end provides a work-around: https://github.com/transpect/calabash-frontend/blob/ad652804f5f292dd6e4b6abad707c0ae55c97f71/calabash.sh#L9

Cheers,

Eric

gimsieke commented 8 years ago

I would have thought that if GNU Make is installed, the other tools will also be installed in their GNU versions. The Makefile can probably be replaced with a shell script (that would have to be created). For a replacement Bash function for readlink -f, see https://github.com/transpect/calabash-frontend/blob/master/calabash.sh#L10

codingisacopingstrategy commented 8 years ago

GNU make is installed by default, but for many of the core GNU utils OS X provides a BSD version. I could try to adapt the makefile.

I don’t have cygwin ready, but I wondered, is it necessary to invoke uname -o? or would uname work?

gimsieke commented 8 years ago

The output of uname is CYGWIN_NT-10.0 on my computer, and it may be different on others. uname -o normalizes it to Cygwin. One could probably use the make function findstring to search for CYGWIN in the uname output.

gimsieke commented 8 years ago

I eliminated uname -o in b93793e

codingisacopingstrategy commented 8 years ago

I saw the latest commits, can confirm it works now. Thanks!