Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix #448 and minor build system issues #453

Merged
merged 3 commits into from
Feb 29, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,5 @@ build_dynamic/
autom4te.cache/
.openssl_build_done
.openssl_configure_done
.mruby_version
.vagrant/
15 changes: 13 additions & 2 deletions Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -61,16 +61,27 @@ clean:
-rm -rf mrbgems_config mrbgems_config_dynamic

clobber: clean_mruby clean
-rm -rf tmp autom4te.cache config config.status config.log $(BUILD_DIR) .openssl_build_done .openssl_configure_done
-rm -rf tmp autom4te.cache config config.status config.log $(BUILD_DIR) .openssl_build_done .openssl_configure_done .mruby_version

#
# mruby
#
build_mruby: $(MRUBY_BUILD_DEPEND_TARGETS)
@if [ -f .mruby_version ]; then \
built_version=`cat .mruby_version`; \
current_version=`git log -1 --format="%H" mruby`; \
if [ $$built_version != $$current_version ]; then \
echo $$current_version > .mruby_version; \
cd $(MRUBY_ROOT) && rm -rf build; \
fi; \
else \
git log -1 --format="%H" mruby > .mruby_version; \
fi
cd $(MRUBY_ROOT) && $(RAKE) MRUBY_CONFIG=$(NGX_MRUBY_ROOT)/build_config.rb NGX_MRUBY_CFLAGS="$(NGX_MRUBY_CFLAGS)"

clean_mruby:
cd $(MRUBY_ROOT) && $(RAKE) deep_clean && rm -rf build
rm -f .mruby_version
cd $(MRUBY_ROOT) && $(RAKE) MRUBY_CONFIG=$(NGX_MRUBY_ROOT)/build_config.rb deep_clean && rm -rf build

$(MRUBY_MAK_FILE): build_mruby

Expand Down
7 changes: 0 additions & 7 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -87,13 +87,6 @@ else
OPENSSL_BUILD_OPT=''
fi

# FIXME: not sure if we really need this. even if we do, it should be moved to mruby/Rakefile
if [ -d "./mruby/${BUILD_DIR}" ]; then
echo "mruby Cleaning ..."
(cd mruby && rake clean MRUBY_CONFIG=../build_config.rb)
echo "mruby Cleaning ... Done"
fi

echo "ngx_mruby configure ..."
./configure ${CONFIG_OPT} --with-ngx-src-root=${NGINX_SRC} --with-ngx-config-opt="${NGINX_CONFIG_OPT}" ${OPENSSL_BUILD_OPT} $@
echo "ngx_mruby configure ... Done"
Expand Down