Flex/Bison based compiler and interpreter written in C++ (using Boost)
Detail souboru
Zdrojový kód
# Copyright (C) 2008 Kamil Dudka <xdudka00@stud.fit.vutbr.cz>
#
# This file is part of vyp08 (compiler and interpreter of VYP08 language).
#
# vyp08 is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# any later version.
#
# vyp08 is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with vyp08. If not, see <http://www.gnu.org/licenses/>.
TAR?=tar
CMAKE?=cmake
VYP_RELEASE=vyp08-1.0pre1
VYP_DOC=$(VYP_RELEASE)
VYP_RELEASE_DOC=$(VYP_RELEASE)/$(VYP_DOC).pdf
VYP_RELEASE_TGZ=$(VYP_RELEASE).tar.gz
VYP_RELEASE_CONTENT=COPYING data doc Makefile README src
.PHONY: all build build_all build_dir check clean release distclean doc
build: build_dir
$(MAKE) vyp08 -C build
ln -sfT build/vyp08 ./vyp08
build_all: build_dir
$(MAKE) all -C build
check: build_all
$(MAKE) test -C build
build_dir:
test -d build || mkdir build
cd build && $(CMAKE) ../src
doc:
$(MAKE) -C doc
all: check doc
clean:
rm -rfv build
rm -fv ./vyp08
distclean: clean
$(MAKE) -C doc clean
rm -rfv $(VYP_RELEASE)
rm -fv $(VYP_RELEASE_TGZ)
release: distclean
$(MAKE) all
mv -vT doc/tex/vyp08.pdf ./vyp08.pdf
$(MAKE) distclean
mkdir $(VYP_RELEASE)
mv -vT ./vyp08.pdf $(VYP_RELEASE_DOC)
cp -vR -t $(VYP_RELEASE) $(VYP_RELEASE_CONTENT)
$(TAR) cfzv $(VYP_RELEASE_TGZ) $(VYP_RELEASE)