meso-web

Sources of the |Méso|Star> website
git clone git://git.meso-star.fr/meso-web.git
Log | Files | Refs | README | LICENSE

commit 6c04daaa3e7ca03ed9a03e7bf943b3438e00c45f
parent 359d39131d3ee4f87851f4d60808b48dd978b699
Author: Vincent Forest <vincent.forest@meso-star.com>
Date:   Wed, 23 Feb 2022 14:49:23 +0100

Full rewrite of the main Makefile

Diffstat:
MMakefile | 53+++++++++++++++++++++++++++++++++++++++++------------
1 file changed, 41 insertions(+), 12 deletions(-)

diff --git a/Makefile b/Makefile @@ -12,25 +12,54 @@ # # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. +.POSIX: include config.mk -REMOTE_DIR=/$(shell basename ${REMOTE}) SUBDIRS=art schiff solstice star-engine stardis misc htrdr -.PHONY: default all publish -default: all +SCRIPTS=\ + build_htaccess.sh\ + check_html.sh\ + configure_targets.sh\ + convert_man.sh\ + meso-menu.sh -all: - @for subdir in ${SUBDIRS}; do make -C $$subdir; echo ""; done +build: + @for subdir in $(SUBDIRS); do \ + printf "\e[1m>>> %s\e[0m\n" $$subdir; \ + make -C $${subdir}; echo ""; done + +distclean: + @echo "Removing .htaccess" + @rm -f .htaccess && echo "" + @for subdir in $(SUBDIRS); do \ + printf "\e[1m>>> %s\e[0m\n" $$subdir; \ + make -C $${subdir} $@; echo ""; done -.htaccess: build_htaccess.sh - @bash build_htaccess.sh ${REMOTE_DIR} - clean: - @for subdir in ${SUBDIRS}; do make -C $$subdir clean; done - @rm .htaccess + @echo "Removing .htaccess" + @rm -f .htaccess && echo "" + @for subdir in $(SUBDIRS); do \ + printf "\e[1m>>> %s\e[0m\n" $$subdir; \ + make -C $${subdir} $@; echo ""; done + +check: + @for i in $(SCRIPTS); do \ + printf "Checking %s\n" "$${i}"; \ + shellcheck -o all -x "$${i}"; done + @echo "" + @for subdir in $(SUBDIRS); do \ + printf "\e[1m>>> %s\e[0m\n" $$subdir; \ + make -C $${subdir} $@; echo ""; done publish: .htaccess - @for subdir in ${SUBDIRS}; do REMOTE=${REMOTE} make -C $$subdir publish; done - rsync -avz solstice.html .htaccess fonts meso.css ${REMOTE} + @for subdir in $(SUBDIRS); do \ + printf "\e[1m>>> %s\e[0m\n" $$subdir; \ + make -C $$subdir $@; echo ""; done + @rsync -avzrR --delete-after --progress\ + solstice.html .htaccess fonts meso.css ${REMOTE} + +.htaccess: build_htaccess.sh + @echo "Building $@" + @sh build_htaccess.sh $$(basename "$(REMOTE)") > $@