build(striker-ui): remove web UI build steps from 'make all'

main
Tsu-ba-me 4 years ago
parent 0d143df8a8
commit d0048ae235
  1. 37
      striker-ui/Makefile.am

@ -1,43 +1,46 @@
MAINTAINERCLEANFILES = Makefile.in MAINTAINERCLEANFILES = Makefile.in
htmldir = $(localstatedir)/www/html
nextoutdir = $(srcdir)/out
nextbuilddir = .next
# List of paths relative to the build output directory.
#
outindexfile = index.html
outjsmodulesdir = _next
outimagesdir = pngs
# The build output directory listed under EXTRA_DIST contains the files to be # The build output directory listed under EXTRA_DIST contains the files to be
# installed; there is no build process required. # installed; there is no build process required.
# #
EXTRA_DIST = out EXTRA_DIST = $(nextoutdir)
htmldir = $(localstatedir)/www/html
outdir = out
# Trigger build target on make call without parameters.
all: out
# Note: the input file to the generate endpoint prefix step must exist in # This target is for maintainers only; do not execute during CI/CD.
# EXTRA_DIST.
# #
out: out:
-@echo "Copying required build files to build (current) directory."
rsync -av --exclude "[Mm]ake*" $(srcdir)/ ./
-@echo "Allow tools to write to files in the build directory."
chmod -R +w .
-@echo "Install node modules (dependencies) prior to building." -@echo "Install node modules (dependencies) prior to building."
npm install --no-package-lock --ignore-scripts npm install --no-package-lock --ignore-scripts
-@echo "Generate endpoint prefix." -@echo "Generate endpoint prefix."
sed 's@=.*@=/cgi-bin@' <env.development >.env.local sed 's@=.*@=/cgi-bin@' <env.development >.env.local
-@echo "Build front-end project." -@echo "Build front-end project."
npm run build npm run build
-@echo "Stage only the build output directory."
git reset && git add $(nextoutdir)
-@echo "Commit the build output."
git commit -m "chore: rebuild web UI"
install-data-hook: install-data-hook:
-@echo "Place build output files." -@echo "Place build output files."
cp -r $(outdir)/index.html $(outdir)/_next $(DESTDIR)/$(htmldir)/ cp -r $(nextoutdir)/$(outindexfile) $(nextoutdir)/$(outjsmodulesdir) $(DESTDIR)/$(htmldir)/
-@echo "Create symlink to images to enable borrowing icon etc. without duplicating." -@echo "Create symlink to images to enable borrowing icon etc. without duplicating."
(cd $(DESTDIR)/$(htmldir); $(LN_S) skins/alteeve/images pngs) (cd $(DESTDIR)/$(htmldir); $(LN_S) skins/alteeve/images $(outimagesdir))
uninstall-hook: uninstall-hook:
-@echo "Remove all installed files of the current module." -@echo "Remove all installed files of the current module."
(cd $(DESTDIR)/$(htmldir); rm -rf index.html _next pngs) (cd $(DESTDIR)/$(htmldir); rm -rf $(outindexfile) $(outjsmodulesdir) $(outimagesdir))
clean-local: clean-local:
-@echo "Clean up build output files." -@echo "Clean up build output files."
test $(srcdir) == . && rm -rf $(outdir) .next || find . -mindepth 1 -maxdepth 1 -exec rm -rf {} + rm -rf $(nextoutdir) $(nextbuilddir)
distclean-local: clean-local distclean-local: clean-local

Loading…
Cancel
Save