diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0f2c507..ac543a0 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -60,13 +60,19 @@ jobs: steps: - uses: actions/checkout@v3 + with: + fetch-depth: 0 + + - name: Git describe + id: ghd + uses: proudust/gh-describe@v1 - name: Install and setup MSYS2 mingw if: runner.os == 'Windows' && matrix.compiler == 'mingw-w64' uses: msys2/setup-msys2@v2 with: msystem: MINGW64 - install: mingw-w64-x86_64-toolchain make gcc diffutils + install: mingw-w64-x86_64-toolchain make gcc diffutils git - name: Build and test windows mingw if: runner.os == 'Windows' && matrix.compiler == 'mingw-w64' @@ -75,13 +81,13 @@ jobs: make - name: Install and setup msvc prompt - if: runner.os == 'Windows' + if: runner.os == 'Windows' && matrix.compiler == 'cl' uses: ilammy/msvc-dev-cmd@v1 - name: Build and test windows MSVC if: runner.os == 'Windows' && matrix.compiler == 'cl' run: | - .\build_msvc.bat --clean + .\build_msvc.bat --version ${{ steps.ghd.outputs.describe }} - name: Install and setup Linux packages if: runner.os == 'Linux' diff --git a/.github/workflows/debs.yml b/.github/workflows/debs.yml index c2029a1..6d5f65d 100644 --- a/.github/workflows/debs.yml +++ b/.github/workflows/debs.yml @@ -48,6 +48,7 @@ jobs: with: docker-image: "debian:${{ matrix.dist }}-slim" buildpackage-opts: --build=binary --no-sign + extra-build-deps: git - name: Upload deb files uses: actions/upload-artifact@v3 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 1e4fb1a..98616de 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -48,6 +48,7 @@ jobs: with: docker-image: "debian:${{ matrix.dist }}-slim" buildpackage-opts: --build=binary --no-sign + extra-build-deps: git - name: Upload deb files uses: actions/upload-artifact@v3 @@ -65,7 +66,7 @@ jobs: id: get_version run: | echo "VERSION=${GITHUB_REF/refs\/tags\//}" >> $GITHUB_ENV - echo ${{ env.VERSION }} + echo ${VERSION } - uses: actions/checkout@v3 with: @@ -74,6 +75,11 @@ jobs: # download all artifacts to project dir - uses: actions/download-artifact@v3 + - name: Generate source release + run: | + make cccc dist + ls dist + - name: Generate changes file uses: sarnold/gitchangelog-action@v1 with: @@ -92,3 +98,4 @@ jobs: prerelease: false files: | packages/*.deb + dist/*.gz diff --git a/.github/workflows/smoke.yml b/.github/workflows/smoke.yml index d80d4af..85b7c34 100644 --- a/.github/workflows/smoke.yml +++ b/.github/workflows/smoke.yml @@ -20,6 +20,8 @@ jobs: steps: - uses: actions/checkout@v3 + with: + fetch-depth: 0 - name: Add 64-bit mingw-w64 to the PATH run: | @@ -27,11 +29,18 @@ jobs: which gcc if: startsWith(matrix.os, 'win') - - name: build - run: make cccc + - uses: actions/setup-python@v4 + with: + python-version: '3.9' - - name: run test - run: make test + - name: Add requirements + run: | + python -m pip install --upgrade pip + pip install tox + + - name: Build and test + run: | + tox -e build windows: runs-on: windows-2019 @@ -39,10 +48,14 @@ jobs: steps: - uses: actions/checkout@v3 + - name: Git describe + id: ghd + uses: proudust/gh-describe@v1 + - name: Enable Developer Command Prompt uses: ilammy/msvc-dev-cmd@v1 - name: Build run: | - .\build_msvc.bat --clean - .\cccc.exe + .\build_msvc.bat --version ${{ steps.ghd.outputs.describe }} + .\cccc.exe --version diff --git a/.gitignore b/.gitignore index caa242f..ac23742 100644 --- a/.gitignore +++ b/.gitignore @@ -2,6 +2,7 @@ cccc/cccc +dist/ doxygen/* ccccout/* pccts/bin/* @@ -20,6 +21,7 @@ cccc/Jtokens.h cccc/cccc.cpp cccc/java.cpp cccc/parser.dlg +cccc/cccc_ver.h # generated test output test/.cccc/* diff --git a/Makefile b/Makefile index 5604c6a..795bf8a 100644 --- a/Makefile +++ b/Makefile @@ -15,7 +15,7 @@ LD ?= g++ DOX = doxygen CCCC = ./cccc/cccc CCCOPTS = --lang=c++ -CCCCSRC = ./cccc/*.cc ./cccc/*.h +CCCCSRC = ./cccc/*.cc ./cccc/*.cpp ./cccc/*.h GENSRC = cccc/CLexer.cpp \ cccc/CLexer.h \ cccc/CParser.cpp \ @@ -30,7 +30,7 @@ GENSRC = cccc/CLexer.cpp \ cccc/java.cpp \ cccc/parser.dlg -.PHONY : all mini pccts cccc test +.PHONY : all mini pccts cccc test dist clean all : mini cccc test @@ -70,12 +70,21 @@ docs : Doxyfile.html_cfg $(CCCCSRC) $(DOCS)/.keep_dir $(DOX) Doxyfile.html_cfg @echo "API docs now in $(DOCS)/html" +# dist target requires VERSION set in build environment +dist : clean + mkdir -p dist/cccc-$(VERSION) + cp *.rst *.md build* LICENSE tox.ini Makefile dist/cccc-$(VERSION)/ + cp -r cccc conda test dist/cccc-$(VERSION)/ + tar -czf dist/cccc-$(VERSION).tar.gz -C dist cccc-$(VERSION) + clean : - rm -rf cccc/*.o cccc/cccc $(GENSRC) pccts/bin/* + rm -f cccc/*.o cccc/cccc reallyclean : clean - rm -rf ccccout/* doxygen/html test/.cccc $(TESTOBJ) + rm -f pccts/bin/* $(TESTOBJ) $(GENSRC) + rm -rf ccccout/ doxygen/ test/.cccc dist/ make -C pccts clean clobber : reallyclean + rm -f cccc/cccc_ver.h make -C pccts scrub diff --git a/README.md b/README.rst similarity index 76% rename from README.md rename to README.rst index 05ffed9..34a67bd 100644 --- a/README.md +++ b/README.rst @@ -1,17 +1,14 @@ README for CCCC versions 3.2.x ============================== -[![Github CI](https://github.com/sarnold/cccc/actions/workflows/ci.yml/badge.svg)](https://github.com/sarnold/cccc/actions/workflows/ci.yml) -[![Conda CI](https://github.com/sarnold/cccc/actions/workflows/conda.yml/badge.svg)](https://github.com/sarnold/cccc/actions/workflows/conda.yml) -[![Debian packages](https://github.com/sarnold/cccc/actions/workflows/debs.yml/badge.svg)](https://github.com/sarnold/cccc/actions/workflows/debs.yml) -[![Release CI](https://github.com/sarnold/cccc/actions/workflows/release.yml/badge.svg)](https://github.com/sarnold/cccc/actions/workflows/release.yml) +|ci| |conda| |debs| |release| -[![CCCC License](https://img.shields.io/badge/license-GPL2-green.svg?dummy)](https://github.com/sarnold/cccc/blob/master/cccc/COPYING) -![GitHub tag (latest SemVer pre-release)](https://img.shields.io/github/v/tag/sarnold/cccc?include_prereleases) -[![Github Issues](https://img.shields.io/github/issues/sarnold/cccc)](https://github.com/sarnold/cccc/issues?q=is:issue+is:open) +|tag| |license| |issues| -[![Conda Version](https://img.shields.io/conda/vn/conda-forge/cccc.svg)](https://anaconda.org/conda-forge/cccc) -[![Conda Platforms](https://img.shields.io/conda/pn/conda-forge/cccc.svg)](https://anaconda.org/conda-forge/cccc) +|vconda| |pconda| + +What is it? +----------- This is a maintenance update of the last (sourceforge) release of the program CCCC (C and C++ Code Counter). This software performs analysis and reports @@ -21,12 +18,22 @@ Ada95, which were supported in previous versions are presently not supported new site for CCCC development is: https://github.com/sarnold/cccc and for current documentation see: http://sarnold.github.io/cccc/ -* [Github Action](https://github.com/marketplace/actions/cccc-action) - Now available as a github action! -* [Quick Install](https://github.com/sarnold/cccc/blob/master/README_install.rst) - Quick start install instructions -* [User Guide](http://sarnold.github.io/cccc/CCCC_User_Guide.html) - User guide (updated) -* [Release Notes](https://github.com/sarnold/cccc/blob/master/CHANGELOG.md) - Autogenerated changelog for github releases (with a little SVN history for context) -* [Software API docs](http://sarnold.github.io/cccc/api/html/index.html) - Software API documentation with design diagrams, etc -* [Complexity Metrics](http://sarnold.github.io/cccc/metrics/cccc.html) - Source code metrics for a source code metrics tool... ;) +* `Github Action`_ - Now available as a github action! +* `Quick Install`_ - Quick start install instructions +* `User Guide`_ - User guide (updated) +* `Release Notes`_ - Autogenerated changelog for github releases (with a little SVN history for context) +* `Software API docs`_ - Software API documentation with design diagrams, etc +* `Complexity Metrics`_ - Source code metrics for a source code metrics tool... ;) + +.. _Github Action: https://github.com/marketplace/actions/cccc-action +.. _Quick Install: https://github.com/sarnold/cccc/blob/master/README_install.rst +.. _User Guide: http://sarnold.github.io/cccc/CCCC_User_Guide.html +.. _Release Notes: https://github.com/sarnold/cccc/blob/master/CHANGELOG.md +.. _Software API docs: http://sarnold.github.io/cccc/api/html/index.html +.. _Complexity Metrics: http://sarnold.github.io/cccc/metrics/cccc.html + +Background +---------- CCCC is a command line tool, originally implemented for Linux and other POSIX-style platforms, but also buildable on the Win32 platform. Files @@ -67,6 +74,9 @@ to which you have and whether it is installed at the default position in the filesystem). On Linux and similar platforms the shell script build_posixgcc.sh should still work. +Historical +---------- + As of the last upstream release (ver 3.1.4) the reference build tool for the Win32 platform is the freely distributed Microsoft Visual C++ Toolkit 2003. As this toolkit does not contain a 'make' style program the script @@ -125,7 +135,10 @@ domain with no restrictions, other than the pious hope that should anyone base a derivative work on it I will be given due credit. The current version is released under the GNU Public License (including the bundled PCCTS source). -The upcoming 3.1.5 release will be a maintenance release to clean up the build and +Notes from the maintainer +------------------------- + +The initial 3.1.5 release was a maintenance release to clean up the build and makefile config (enabling parallel make) and fix a build error with recent gcc. The pccts build target "mini" builds only the tools required to build cccc, while the make target "pccts" builds the complete toolset, and "all" will build @@ -137,10 +150,8 @@ of (expensive) commercial engineering tools. It has a simple CLI and other support like Jenkins plugins. Use it to find out your own complexity metrics. You might be surprised... -The above updates by Stephen L Arnold. - Notes from the original author -============================== +------------------------------ CCCC was originally developed as a proof-of-concept tool for some ideas relating to software metrics which I was investigating as an academic @@ -169,13 +180,38 @@ available for the forseeable future from https://github.com/sarnold/cccc as well as the original home at http://cccc.sourceforge.net +.. |ci| image:: https://github.com/sarnold/cccc/actions/workflows/ci.yml/badge.svg + :target: https://github.com/sarnold/cccc/actions/workflows/ci.yml + :alt: CI Status +.. |conda| image:: https://github.com/sarnold/cccc/actions/workflows/conda.yml/badge.svg + :target: https://github.com/sarnold/cccc/actions/workflows/conda.yml + :alt: Conda Status +.. |debs| image:: https://github.com/sarnold/cccc/actions/workflows/debs.yml/badge.svg + :target: https://github.com/sarnold/cccc/actions/workflows/release.yml + :alt: Debian packages +.. |release| image:: https://github.com/sarnold/cccc/actions/workflows/release.yml/badge.svg + :target: https://github.com/sarnold/cccc/actions/workflows/release.yml + :alt: Release Status +.. |license| image:: https://img.shields.io/badge/license-GPL2-green.svg?dummy + :target: https://github.com/sarnold/cccc/blob/master/cccc/COPYING + :alt: License +.. |tag| image:: https://img.shields.io/github/v/tag/sarnold/cccc?include_prereleases + :target: https://github.com/sarnold/cccc/releases + :alt: GitHub tag (latest SemVer pre-release) +.. |issues| image:: https://img.shields.io/github/issues/sarnold/cccc + :target: https://github.com/sarnold/cccc/issues?q=is:issue+is:open + :alt: Issues +.. |vconda| image:: https://img.shields.io/conda/vn/conda-forge/cccc.svg + :target: https://anaconda.org/conda-forge/cccc + :alt: Conda Version - - +.. |pconda| image:: https://img.shields.io/conda/pn/conda-forge/cccc.svg + :target: https://anaconda.org/conda-forge/cccc + :alt: Conda Platforms diff --git a/build_msvc.bat b/build_msvc.bat index 46b234c..70a8a9f 100755 --- a/build_msvc.bat +++ b/build_msvc.bat @@ -17,10 +17,10 @@ REM for cccc.exe install set BIN_DIR="%PREFIX%"\\bin set arg1=%1 - if "%arg1%"=="--version" ( - echo // This version built on %HOSTNAME% at %DATE% > cccc\cccc_ver.h - echo #define CCCC_VERSION %2 >> cccc\cccc_ver.h + echo #define BUILD_HOST %HOSTNAME% > cccc\cccc_ver.h + echo #define BUILD_TIME %DATE% >> cccc\cccc_ver.h + echo #define CCCC_VERSION_DEV %2 >> cccc\cccc_ver.h echo #define CCCC_VERSION_STRING "%2" >> cccc\cccc_ver.h set arg1=--clean ) @@ -28,7 +28,6 @@ if "%arg1%"=="--installer" ( goto :buildInstaller ) - if "%arg1%"=="--clean" ( for %%d in ( pccts\dlg pccts\antlr cccc ) do ( if exist %%d\*.obj del %%d\*.obj @@ -145,8 +144,10 @@ call run_test java prn13 call run_test java prn14 call run_test java prn15 call run_test java prn16 +echo All tests passed cd .. endlocal +if not exist "c:\Program Files\My Inno Setup Extensions\iscc.exe" goto :end rem The visual C++ addin can't be built using MS Visual C++ Toolkit 2003 rem because it doesn't provide MFC header files and libraries @@ -185,10 +186,4 @@ echo Please rerun the script with the argument --clean to build these binaries. goto :end - :end - - - - - diff --git a/cccc/cccc_ver.h b/cccc/cccc_ver.h deleted file mode 100644 index 367dc40..0000000 --- a/cccc/cccc_ver.h +++ /dev/null @@ -1,3 +0,0 @@ -// This version built on kepler at 20210219-220832 -#define CCCC_VERSION 3.1.6 -#define CCCC_VERSION_STRING "3.1.6" diff --git a/cccc/ccccmain.cc b/cccc/ccccmain.cc index c2c5098..206a731 100644 --- a/cccc/ccccmain.cc +++ b/cccc/ccccmain.cc @@ -44,6 +44,12 @@ #include "ALexer.h" #endif +#if defined(VERSION_FORMAT_DEV) +#define VERSION_INFO CCCC_VERSION_DEV +#else +#define VERSION_INFO CCCC_VERSION_STRING +#endif + #define NEW_PAGE "\f\n" CCCC_Project *prj=NULL; @@ -106,6 +112,7 @@ class Main void HandleReportOption(const string&); void PrintCredits(ostream& os); void PrintUsage(ostream& os); + void Version(const char *prog); int ParseFiles(); int DumpDatabase(); int LoadDatabase(); @@ -157,6 +164,11 @@ void Main::HandleArgs(int argc, char **argv) PrintUsage(cout); exit(0); } + else if(next_arg=="--version") + { + Version(argv[0]); + exit(0); + } else { // the options below this point are all of the form --opt=val, @@ -603,20 +615,22 @@ void Main::PrintCredits(ostream& os) { // the principal purpose of the constructor is to set up the // two lots of boilerplate text that this class requires - string version_string="Version "; - version_string.append(CCCC_VERSION_STRING); + string version_string="CCCC version "; + version_string.append(VERSION_INFO); const char *credit_strings[] = { "CCCC - a code counter for C and C++", "===================================", "", - "A program to analyse C and C++ source code and report on", - "some simple software metrics", version_string.c_str(), - "Copyright Tim Littlefair, 1995, 1996, 1997, 1998, 1999, 2000", - "with contributions from Bill McLean, Herman Hueni, Lynn Wilson ", - "Peter Bell, Thomas Hieber and Kenneth H. Cox.", + "", + "A program to analyse C and C++ source code and report on", + "some simple software metrics.", + "", + "Copyright Tim Littlefair, 1995, 1996, 1997, 1998, 1999, 2000, 2022", + "with contributions from Bill McLean, Herman Hueni, Lynn Wilson ", + "Peter Bell, Thomas Hieber, Kenneth H. Cox, and Stephen Arnold.", "", "The development of this program was heavily dependent on", "the Purdue Compiler Construction Tool Set (PCCTS) ", @@ -664,6 +678,8 @@ void Main::DescribeOutput() } } +void Main::Version(const char *prog) { std::cout << VERSION_INFO << '\n'; } + /* ** the usage message is printed on cerr if unexpected options are found, ** and on cout if option --help is found. diff --git a/cccc/posixgcc.mak b/cccc/posixgcc.mak index f558724..f150e23 100644 --- a/cccc/posixgcc.mak +++ b/cccc/posixgcc.mak @@ -28,7 +28,7 @@ PATHSEP=/ CCC ?= g++ INCLUDES = -I../pccts/h -I. -CCC_OPTS = -c $(CFLAGS) $(DEBUG_FLAGS) $(INCLUDES) -std=c++98 -x c++ +CCC_OPTS = -c $(CFLAGS) $(DEBUG_FLAGS) $(CPPFLAGS) $(INCLUDES) -std=c++98 -x c++ C_OFLAG = -o LD_OPTS = $(LDFLAGS) $(DEBUG_LFLAGS) LD_OFLAG = -o diff --git a/cccc/rules.mak b/cccc/rules.mak index 3fee067..e290815 100644 --- a/cccc/rules.mak +++ b/cccc/rules.mak @@ -15,7 +15,40 @@ ## makes including GNU Make. The way I have dealt with this ## is to exclude use of preprocessor features from this file ## while using them freely in the platform-specific files. -## + +# generate build/version info +ifeq ($(SHELL), cmd.exe) +BUILD_DATE := $(shell python -c "from datetime import datetime; print(datetime.utcnow().strftime('%d/%m/%Y, %H:%M'))" +BUILD_MACHINE := $(shell echo %username%)@$(shell hostname) +else +BUILD_DATE := $(shell date -u +"%d/%m/%Y, %H:%M") +BUILD_MACHINE := $(shell whoami)@$(shell hostname) +endif + +version := $(subst -, ,$(shell git describe --long --dirty --tags)) +COMMIT := $(strip $(word 3, $(version))) +COMMITS_PAST := $(strip $(word 2, $(version))) +DIRTY := $(strip $(word 4, $(version))) + +ifneq ($(COMMITS_PAST), 0) +BUILD_INFO_COMMITS := .$(COMMITS_PAST) +endif + +ifneq ($(DIRTY),) +BUILD_INFO_DIRTY :=+ +endif + +BUILD_INFO := $(COMMIT)$(BUILD_INFO_COMMITS)$(BUILD_INFO_DIRTY) +VERSION_TAG :=$(strip $(word 1, $(version))) + +VERSION_DEV := $(VERSION_TAG)-$(BUILD_INFO) +VERSION_SEM := $(VERSION_TAG)$(BUILD_INFO_COMMITS) + +$(info Build Time: $(BUILD_DATE)) +$(info Build Host: $(BUILD_MACHINE)) +$(info Build Version: $(VERSION_SEM)) +$(info Build Version Dev: $(VERSION_DEV)) + ## The following make variables must be defined before entering this ## file: ## @@ -130,7 +163,17 @@ USR_OBJ = \ ALL_OBJ = $(SPAWN_OBJ) $(USR_OBJ) $(PCCTS_OBJ) +cccc_ver.h: rules.mak + @echo "Generating $@" + @echo #ifndef CCCC_VER_H_ > $@ + @echo #define CCCC_VER_H_ >> $@ + @echo "#define BUILD_TIME \"$(BUILD_DATE)\"" >> $@ + @echo "#define BUILD_HOST \"$(BUILD_MACHINE)\"" >> $@ + @echo "#define CCCC_VERSION_STRING \"$(VERSION_SEM)\"" >> $@ + @echo "#define CCCC_VERSION_DEV \"$(VERSION_DEV)\"" >> $@ + @echo #endif >> $@ +cccc.cpp : cccc_ver.h all: $(CCCC_EXE) @@ -138,7 +181,7 @@ all: $(CCCC_EXE) $(CCCC_EXE): $(USR_G) $(ANLTR_SPAWN) $(DLG_SPAWN) $(USR_H) $(USR_C) $(ALL_OBJ) $(CCC) $(ALL_OBJ) $(LD_OPTS) $(LD_EXTRA_LIBS) $(LD_OFLAG)$(CCCC_EXE) -.SUFFIXES: .cc .$(OBJEXT) .cpp .cxx .g .g_info +.SUFFIXES: .cc .$(OBJEXT) .cpp .cxx .g .g_info .h ## ANTLR can give us some very useful documentation including a ## cross reference of the rules and a list of first token sets @@ -148,7 +191,7 @@ $(CCCC_EXE): $(USR_G) $(ANLTR_SPAWN) $(DLG_SPAWN) $(USR_H) $(USR_C) $(ALL_OBJ) $(ANTLR) $(AFLAGS) -gc -gx -pa $< > $*.1st $(ANTLR) $(AFLAGS) -gc -gx -cr $< > $*.xrf -ccccmain.$(OBJEXT) : ccccmain.cc +ccccmain.$(OBJEXT) : ccccmain.cc $(CCC) $(CCC_OPTS) $(LANG_DEFINES) ccccmain.cc diff --git a/debian/docs b/debian/docs index b43bf86..a1320b1 100644 --- a/debian/docs +++ b/debian/docs @@ -1 +1 @@ -README.md +README.rst diff --git a/debian/rules b/debian/rules index a711ea9..cad141b 100755 --- a/debian/rules +++ b/debian/rules @@ -23,7 +23,7 @@ buildflags := CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" override_dh_auto_build: $(MAKE) -C cccc -f posixgcc.mak $(buildflags) \ - PCCTS_H=/usr/include/pccts PCCTS_BIN=/usr/bin $(CROSS) + PCCTS_H=/usr/include/pccts PCCTS_BIN=/usr/bin $(CROSS) cccc override_dh_auto_test: ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS))) @@ -37,7 +37,7 @@ override_dh_auto_clean: -rm -rf test/.cccc test/*.xml test/*.html test/*.db override_dh_auto_install: - # The default 'make install' uses su! + # The default makefile has no install target override_dh_installdocs: dh_installdocs 'cccc/CCCC User Guide.html' diff --git a/release.sh b/release.sh deleted file mode 100755 index 784118a..0000000 --- a/release.sh +++ /dev/null @@ -1,24 +0,0 @@ -#! /usr/bin/env bash -# release.sh -# set the release version in the header file before building -# - -set -e - -PATH=/usr/bin:/bin:/usr/sbin:/sbin -export LC_ALL=C - -DATE=$(date +%Y%m%d-%H%M%S) -UNAME_N=$(uname -n) - -if [[ $1 == "--version" ]]; then - RELEASE_VERSION="${2}" -elif [[ -n $VERSION ]]; then - RELEASE_VERSION="${VERSION}" -else - RELEASE_VERSION=$(git describe --tags) -fi - -echo "// This version built on ${UNAME_N} at ${DATE}" > cccc/cccc_ver.h -echo "#define CCCC_VERSION ${RELEASE_VERSION}" >> cccc/cccc_ver.h -echo "#define CCCC_VERSION_STRING \"${RELEASE_VERSION}\"" >> cccc/cccc_ver.h diff --git a/tox.ini b/tox.ini index 78f59fc..1f544f4 100644 --- a/tox.ini +++ b/tox.ini @@ -16,6 +16,7 @@ setenv = CXX = {env:CXX:g++} CCC = {env:CXX:g++} LD = {env:CXX:g++} + CPPFLAGS = {env:CPPFLAGS:-DVERSION_FORMAT_DEV} passenv = pythonLocation @@ -38,9 +39,10 @@ passenv = XDG_* GITHUB* PIP_DOWNLOAD_CACHE + VERSION whitelist_externals = - {build,clang,lint,clean,changes}: bash + {build,clang,lint,clean,changes,sdist}: bash deps = {build,clang,lint,clean}: pip>=19.0.1 @@ -50,8 +52,12 @@ deps = lint: beautysh commands = - {build,clang}: bash -c 'make -j1 CCC=$CXX CC=$CC cccc' - {build,clang}: bash -c 'make -j1 CCC=$CXX test 2>&1 | tail -n5' + #{build,clang}: bash release.sh + {build,clang}: bash -c 'make -j{posargs:1} CXX=$CXX CC=$CC mini' + {build,clang}: bash -c 'make -j{posargs:1} CCC=$CXX CC=$CC cccc' + {build,clang}: bash -c 'make -j1 CCC=$CXX test 2>&1 | tail -n5' + {build,clang}: bash -c './cccc/cccc --version' lint: bash -c 'cpplint --output=gsed {toxinidir}/cccc/*' + sdist: bash -c 'make dist' changes: bash -c 'gitchangelog {posargs} > CHANGELOG.md' - clean: bash -c 'make reallyclean' + clean: bash -c 'make {posargs:clean}'