|
Packit |
9ff65e |
##############################################################################
|
|
Packit |
9ff65e |
# ocaml-fileutils: files and filenames common operations #
|
|
Packit |
9ff65e |
# #
|
|
Packit |
9ff65e |
# Copyright (C) 2003-2014, Sylvain Le Gall #
|
|
Packit |
9ff65e |
# #
|
|
Packit |
9ff65e |
# This library is free software; you can redistribute it and/or modify it #
|
|
Packit |
9ff65e |
# under the terms of the GNU Lesser General Public License as published by #
|
|
Packit |
9ff65e |
# the Free Software Foundation; either version 2.1 of the License, or (at #
|
|
Packit |
9ff65e |
# your option) any later version, with the OCaml static compilation #
|
|
Packit |
9ff65e |
# exception. #
|
|
Packit |
9ff65e |
# #
|
|
Packit |
9ff65e |
# This library is distributed in the hope that it will be useful, but #
|
|
Packit |
9ff65e |
# WITHOUT ANY WARRANTY; without even the implied warranty of #
|
|
Packit |
9ff65e |
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the file #
|
|
Packit |
9ff65e |
# COPYING for more details. #
|
|
Packit |
9ff65e |
# #
|
|
Packit |
9ff65e |
# You should have received a copy of the GNU Lesser General Public License #
|
|
Packit |
9ff65e |
# along with this library; if not, write to the Free Software Foundation, #
|
|
Packit |
9ff65e |
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA #
|
|
Packit |
9ff65e |
##############################################################################
|
|
Packit |
9ff65e |
|
|
Packit |
9ff65e |
defaultl: test
|
|
Packit |
9ff65e |
|
|
Packit |
9ff65e |
# OASIS_START
|
|
Packit |
9ff65e |
# DO NOT EDIT (digest: a3c674b4239234cbbe53afe090018954)
|
|
Packit |
9ff65e |
|
|
Packit |
9ff65e |
SETUP = ocaml setup.ml
|
|
Packit |
9ff65e |
|
|
Packit |
9ff65e |
build: setup.data
|
|
Packit |
9ff65e |
$(SETUP) -build $(BUILDFLAGS)
|
|
Packit |
9ff65e |
|
|
Packit |
9ff65e |
doc: setup.data build
|
|
Packit |
9ff65e |
$(SETUP) -doc $(DOCFLAGS)
|
|
Packit |
9ff65e |
|
|
Packit |
9ff65e |
test: setup.data build
|
|
Packit |
9ff65e |
$(SETUP) -test $(TESTFLAGS)
|
|
Packit |
9ff65e |
|
|
Packit |
9ff65e |
all:
|
|
Packit |
9ff65e |
$(SETUP) -all $(ALLFLAGS)
|
|
Packit |
9ff65e |
|
|
Packit |
9ff65e |
install: setup.data
|
|
Packit |
9ff65e |
$(SETUP) -install $(INSTALLFLAGS)
|
|
Packit |
9ff65e |
|
|
Packit |
9ff65e |
uninstall: setup.data
|
|
Packit |
9ff65e |
$(SETUP) -uninstall $(UNINSTALLFLAGS)
|
|
Packit |
9ff65e |
|
|
Packit |
9ff65e |
reinstall: setup.data
|
|
Packit |
9ff65e |
$(SETUP) -reinstall $(REINSTALLFLAGS)
|
|
Packit |
9ff65e |
|
|
Packit |
9ff65e |
clean:
|
|
Packit |
9ff65e |
$(SETUP) -clean $(CLEANFLAGS)
|
|
Packit |
9ff65e |
|
|
Packit |
9ff65e |
distclean:
|
|
Packit |
9ff65e |
$(SETUP) -distclean $(DISTCLEANFLAGS)
|
|
Packit |
9ff65e |
|
|
Packit |
9ff65e |
setup.data:
|
|
Packit |
9ff65e |
$(SETUP) -configure $(CONFIGUREFLAGS)
|
|
Packit |
9ff65e |
|
|
Packit |
9ff65e |
configure:
|
|
Packit |
9ff65e |
$(SETUP) -configure $(CONFIGUREFLAGS)
|
|
Packit |
9ff65e |
|
|
Packit |
9ff65e |
.PHONY: build doc test all install uninstall reinstall clean distclean configure
|
|
Packit |
9ff65e |
|
|
Packit |
9ff65e |
# OASIS_STOP
|
|
Packit |
9ff65e |
|
|
Packit |
9ff65e |
# Precommit target
|
|
Packit |
9ff65e |
# Check style of code.
|
|
Packit |
9ff65e |
PRECOMMIT_ARGS= \
|
|
Packit |
9ff65e |
--exclude myocamlbuild.ml \
|
|
Packit |
9ff65e |
--exclude setup.ml \
|
|
Packit |
9ff65e |
--exclude README.txt \
|
|
Packit |
9ff65e |
--exclude INSTALL.txt \
|
|
Packit |
9ff65e |
--exclude Makefile \
|
|
Packit |
9ff65e |
--exclude configure \
|
|
Packit |
9ff65e |
--exclude _tags
|
|
Packit |
9ff65e |
|
|
Packit |
9ff65e |
precommit:
|
|
Packit |
9ff65e |
-@if command -v OCamlPrecommit > /dev/null; then \
|
|
Packit |
9ff65e |
OCamlPrecommit $(PRECOMMIT_ARGS); \
|
|
Packit |
9ff65e |
else \
|
|
Packit |
9ff65e |
echo "Skipping precommit checks.";\
|
|
Packit |
9ff65e |
fi
|
|
Packit |
9ff65e |
|
|
Packit |
9ff65e |
precommit-full:
|
|
Packit |
9ff65e |
OCamlPrecommit --full $(PRECOMMIT_ARGS)
|
|
Packit |
9ff65e |
|
|
Packit |
9ff65e |
test: precommit
|
|
Packit |
9ff65e |
|
|
Packit |
9ff65e |
.PHONY: precommit
|
|
Packit |
9ff65e |
|
|
Packit |
9ff65e |
# Headache target
|
|
Packit |
9ff65e |
# Fix license header of file.
|
|
Packit |
9ff65e |
|
|
Packit |
9ff65e |
headache:
|
|
Packit |
9ff65e |
find ./ \
|
|
Packit |
9ff65e |
-name _darcs -prune -false -o \
|
|
Packit |
9ff65e |
-name .git -prune -false -o \
|
|
Packit |
9ff65e |
-name _build -prune -false -o \
|
|
Packit |
9ff65e |
-type f \
|
|
Packit |
9ff65e |
| xargs headache -h _header -c _headache.config
|
|
Packit |
9ff65e |
|
|
Packit |
9ff65e |
.PHONY: headache
|
|
Packit |
9ff65e |
|
|
Packit |
9ff65e |
doc-dev-dist: doc fix-perms
|
|
Packit |
9ff65e |
./doc-dist.sh --version dev
|
|
Packit |
9ff65e |
|
|
Packit |
9ff65e |
.PHONY: doc-dev-dist
|
|
Packit |
9ff65e |
|
|
Packit |
9ff65e |
# Deploy target
|
|
Packit |
9ff65e |
# Deploy/release the software.
|
|
Packit |
9ff65e |
|
|
Packit |
9ff65e |
deploy: doc
|
|
Packit |
9ff65e |
mkdir dist || true
|
|
Packit |
9ff65e |
./doc-dist.sh --version $(shell oasis query version)
|
|
Packit |
9ff65e |
admin-gallu-deploy --verbose \
|
|
Packit |
9ff65e |
--forge_upload --forge_group ocaml-fileutils --forge_user gildor-admin \
|
|
Packit |
9ff65e |
--forge_extra_file "dist/ocaml-fileutils-doc-$(shell oasis query version).tar.gz"
|
|
Packit |
9ff65e |
admin-gallu-oasis-increment \
|
|
Packit |
9ff65e |
--setup_run --setup_args "-setup-update dynamic" --use_vcs
|
|
Packit |
9ff65e |
|
|
Packit |
9ff65e |
.PHONY: deploy
|
|
Packit |
9ff65e |
|
|
Packit |
9ff65e |
fix-perms:
|
|
Packit |
9ff65e |
chmod +x doc-dist.sh
|
|
Packit |
9ff65e |
|
|
Packit |
9ff65e |
.PHONY: fix-perms
|
|
Packit |
9ff65e |
|
|
Packit |
9ff65e |
website-clean:
|
|
Packit |
9ff65e |
cd website && $(MAKE) clean
|
|
Packit |
9ff65e |
|
|
Packit |
9ff65e |
clean: website-clean
|
|
Packit |
9ff65e |
|
|
Packit |
9ff65e |
website-distclean:
|
|
Packit |
9ff65e |
cd website && $(MAKE) distclean
|
|
Packit |
9ff65e |
|
|
Packit |
9ff65e |
distclean: website-distclean
|
|
Packit |
9ff65e |
|
|
Packit |
9ff65e |
.PHONY: website-distclean website-clean
|