.ONESHELL: ROOT_DIR := $(dir $(realpath $(lastword $(MAKEFILE_LIST)))) VERSION=1.27.3 all: src /home/pham/git/ngx-fancyindex cd $< ./configure \ --prefix=/etc/nginx \ --sbin-path=/usr/bin/nginx \ --conf-path=/etc/nginx/nginx.conf \ --pid-path=/run/nginx.pid \ --with-http_ssl_module \ --with-http_dav_module \ --with-http_image_filter_module \ --with-http_xslt_module \ --add-module=/home/pham/git/ngx-fancyindex make modules make sudo make install cd $(ROOT_DIR); rm -rf $< sudo ln -sf `pwd`/nginx.service /usr/lib/systemd/system/nginx.service src: curl -O https://nginx.org/download/nginx-${VERSION}.tar.gz tar zxvf nginx-${VERSION}.tar.gz && mv nginx-${VERSION} $@ config: ln -sf `pwd`/* /etc/nginx /home/pham/git/ngx_http_proxy_connect_module: git clone https://github.com/chobits/ngx_http_proxy_connect_module $@ /home/pham/git/ngx-fancyindex: git clone https://github.com/aperezdc/ngx-fancyindex $@