Re: Re: Build Under Linux

Home › Forums › Development › Build Under Linux › Re: Re: Build Under Linux

#27488
JimShorts
Member

@dynmosaic wrote:

For build under windows, the same Makefile won’t work, since there is no sudo -E command.

Yeah, I called the build steps dir1, dir2, dir3, etc. just to avoid the problem you discovered. I had thought of using d_pcre (for example) but thought it was too much typing.

If you’re interested in it building under windows also, better to just add some intelligence in the makefile itself, and use a single makefile.

Just have some conditional code like this in the Makefile:


ifeq ($(shell uname), Linux)
SUDO_CMD=sudo -E
else
SUDO_CMD=sudo
endif

all:
@echo sudo command is $(SUDO_CMD)