diff --git a/.gitignore b/.gitignore index 64217e167..1a868b218 100644 --- a/.gitignore +++ b/.gitignore @@ -1,94 +1,37 @@ -*.DS_Store -*.Plo -*.aux -*.bbl -*.blg -*.brf -*.d -*.g6 -*.gz -*.html -*.idx -*.ilg -*.ind -*.la -*.la -*.lab -*.lab -*.lo -*.log -*.orig -*.out -*.pdf -*.pnr -*.pyc -*.pyc -*.semigroups -*.six -*.swo -*.swp -*.synctex.gz -*.tex -*.toc -*.top -*.tui -*.txt -.dirstamp -.libs -/libsemigroups/ -Makefile -/Makefile.in -Transitions* -_*.xml -_AutoDocMainFile.xml -_Chunks.xml -aclocal.m4 -autom4te* -autom4te.* -autom4te.cache -bibliography.xml.bib -bin -cnf -config.log -config.status +/aclocal.m4 +/autom4te.cache/ +/bin/ +/config.guess +/config.status +/config.sub /configure -doc/*.css -doc/*.js -doc/main.aux -doc/main.bbl -doc/main.blg -doc/main.brf -doc/main.idx -doc/main.ilg -doc/main.ind -doc/main.log -doc/main.out -doc/main.pnr -doc/main.tex -doc/main.toc -doc/manual.pdf -doc/manual.six -gapbind14/demo/gen/ -gh-pages -lcov* -libtool -libtool.m4 -ltmain.sh -ltoptions.m4 -ltsugar.m4 -ltversion.m4 -lt~obsolete.m4 -main.xml -new_bibliography.xml.bib -pkgconfig.h.in~ -semigroups-config.hpp -src/.deps -src/.dirstamp -src/.libs -src/_pkgconfig.h -src/stamp-h1 -tags -title.xml -tmp -tst/workspaces/test-output.w -wiki/ +/doc/_*.xml +/doc/*.aux +/doc/*.bbl +/doc/*.blg +/doc/*.brf +/doc/*.css +/doc/*.html +/doc/*.idx +/doc/*.ilg +/doc/*.ind +/doc/*.js +/doc/*.log +/doc/*.out +/doc/*.pdf +/doc/*.pnr +/doc/*.tex +/doc/*.toc +/doc/*.txt +/doc/*.xml.bib +/doc/main.xml +/doc/manual.lab +/doc/manual.six +/doc/title.xml +/gapbind14/demo/gen/ +/gen/ +/gh-pages/ +/libsemigroups/ +/Makefile +/src/pkgconfig.h.in +/src/semigroups-config.hpp diff --git a/Makefile.am b/Makefile.am deleted file mode 100644 index b096582fe..000000000 --- a/Makefile.am +++ /dev/null @@ -1,120 +0,0 @@ -# -# Semigroups -# -# This file is part of the build system of a GAP kernel extension. -# Requires automake. -# -ACLOCAL_AMFLAGS = -I m4 - -if WITH_INCLUDED_LIBSEMIGROUPS - SUBDIRS = libsemigroups - # the following triggers "make install" on libsemigroups - # note that making it a concrete file prevents this target - # to be needlessly re-run if libsemigroups/ is not changed. - BUILT_SOURCES = bin/include/libsemigroups/libsemigroups.hpp -endif - -AM_CPPFLAGS = @LIBSEMIGROUPS_CFLAGS@ - -BINARCHDIR = bin/$(GAPARCH) -GAPINSTALLLIB = $(abs_top_srcdir)/$(BINARCHDIR)/semigroups.so - -lib_LTLIBRARIES = semigroups.la - -semigroups_la_SOURCES = src/bipart.cpp -semigroups_la_SOURCES += src/cong.cpp -semigroups_la_SOURCES += src/froidure-pin-base.cpp -semigroups_la_SOURCES += src/froidure-pin-bipart.cpp -semigroups_la_SOURCES += src/froidure-pin-bmat.cpp -semigroups_la_SOURCES += src/froidure-pin-fallback.cpp -semigroups_la_SOURCES += src/froidure-pin-matrix.cpp -semigroups_la_SOURCES += src/froidure-pin-max-plus-mat.cpp -semigroups_la_SOURCES += src/froidure-pin-min-plus-mat.cpp -semigroups_la_SOURCES += src/froidure-pin-pbr.cpp -semigroups_la_SOURCES += src/froidure-pin-pperm.cpp -semigroups_la_SOURCES += src/froidure-pin-transf.cpp -semigroups_la_SOURCES += src/pkg.cpp -semigroups_la_SOURCES += src/to_gap.cpp -semigroups_la_SOURCES += gapbind14/src/gapbind14.cpp - -semigroups_la_CXXFLAGS = $(GAP_CFLAGS) @LIBSEMIGROUPS_CFLAGS@ -std=gnu++14 -O3 -semigroups_la_CPPFLAGS = $(GAP_CPPFLAGS) @LIBSEMIGROUPS_CFLAGS@ -semigroups_la_CPPFLAGS += -I$(top_srcdir)/gapbind14/include - -if HPCOMBI_CONSTEXPR_FUN_ARGS -semigroups_la_CPPFLAGS += -DHPCOMBI_CONSTEXPR_FUN_ARGS -endif - -if LIBSEMIGROUPS_HPCOMBI_ENABLED -semigroups_la_CXXFLAGS += $(HPCOMBI_CXXFLAGS) -endif - -semigroups_la_CFLAGS = $(GAP_CFLAGS) - -if WITH_INCLUDED_LIBSEMIGROUPS -# FIXME(later) all the include paths should point into bin/include/ and not to -# the sources, or otherwise we should stop make installing into bin -if LIBSEMIGROUPS_HPCOMBI_ENABLED -semigroups_la_CPPFLAGS += -I$(top_srcdir)/libsemigroups/extern/HPCombi/include -semigroups_la_CPPFLAGS += -I$(top_srcdir)/libsemigroups/extern/HPCombi/include/fallback -endif -semigroups_la_CPPFLAGS += -I$(top_srcdir)/libsemigroups/extern/fmt-8.0.1/include -semigroups_la_CPPFLAGS += -I$(top_srcdir)/libsemigroups/include -endif -semigroups_la_CPPFLAGS += -DFMT_HEADER_ONLY - -if KERNEL_DEBUG -semigroups_la_CPPFLAGS += -DDEBUG -else -semigroups_la_CPPFLAGS += -DNDEBUG -endif - -semigroups_la_LDFLAGS = $(GAP_LDFLAGS) -module -avoid-version - -semigroups_la_LIBADD = @LIBSEMIGROUPS_LIBS@ - -if SYS_IS_CYGWIN -semigroups_la_LDFLAGS += -no-undefined -version-info 0:0:0 -Wl,$(GAPROOT)/bin/$(GAPARCH)/gap.dll -endif - -# the following is only run if BUILT_SOURCES is wound up -bin/include/libsemigroups/libsemigroups.hpp: - $(MAKE) -C libsemigroups install - -all-local: semigroups.la - $(mkdir_p) $(top_srcdir)/$(BINARCHDIR) - rm -f $(GAPINSTALLLIB) # workaround for macOS code signing -if SYS_IS_CYGWIN - cp .libs/semigroups.dll $(GAPINSTALLLIB) -if WITH_INCLUDED_LIBSEMIGROUPS -# Cygwin will only look in this directory for dlls - cp libsemigroups/.libs/cygsemigroups-*.dll $(GAPROOT)/.libs -endif -else - cp .libs/semigroups.so $(GAPINSTALLLIB) -endif - -if KERNEL_DEBUG - @echo "SUCCESS (debug mode enabled)!" -else - @echo "SUCCESS!" -endif - -distclean-local: - rm -rf bin/* - -doc: doc/manual.six - -doc/manual.six: doc/*.xml PackageInfo.g - ($(GAPROOT)/bin/gap.sh -A makedoc.g) - -lint: - etc/gaplint.sh - etc/cpplint.sh - -format: - clang-format -i src/*.hpp src/*.cpp - -superclean: distclean - git clean -xdf --exclude *.swp --exclude *.swo -.PHONY: superclean diff --git a/Makefile.gappkg b/Makefile.gappkg new file mode 100644 index 000000000..30416303f --- /dev/null +++ b/Makefile.gappkg @@ -0,0 +1,220 @@ +######################################################################## +# +# The build rules in this file are intended for use by GAP packages that +# want to build a simple GAP kernel extensions. They are based on the +# GAP build system, and require GNU make. To use this in your GAP +# package, `include` this file from your primary Makefile. You must also +# set several variables beforehand: +# +# - GAPPATH must be set to the location of the GAP installation against +# which to build your package. +# - KEXT_NAME should be the name of your kernel extension (without +# file extensions like .so or .dll) +# - KEXT_SOURCES must contain a list of .c or .cc files to be linked +# into your kernel extension +# - optionally, you can set KEXT_CFLAGS, KEXT_CXXFLAGS, KEXT_LDFLAGS +# - if you are using autoconf to produce your configure script, set +# KEXT_USE_AUTOCONF to 1 to enable dependency rules that enable +# regenerating the configure script etc. when necessary +# +# The contents of this file are released into the public domain; hence +# you may edit this file as you wish, bundle and distribute it with your +# package, etc. +# +# If you bundle this file with your package, please try not to edit it, +# so that we can keep it identical across all GAP packages. Instead, if +# you find that you must edit it, please submit your changes back to +# the GAP team, so that a future version of this file can be adjusted +# to cover your usecase without modifications, thus ensuring you can +# always easily update to newer version of it. +# +######################################################################## + +# read GAP's build settings +include $(GAPPATH)/sysinfo.gap + +# hack to support GAP <= 4.9 +ifndef GAP_KERNEL_MAJOR_VERSION + KEXT_CFLAGS += -I$(GAP_LIB_DIR)/src + KEXT_CXXFLAGS += -I$(GAP_LIB_DIR)/src +endif + +# honor used supplied flags +KEXT_CFLAGS += $(CPPFLAGS) +KEXT_CFLAGS += $(CFLAGS) +KEXT_CXXFLAGS += $(CPPFLAGS) +KEXT_CXXFLAGS += $(CXXFLAGS) +KEXT_LDFLAGS += $(LDFLAGS) + +# various derived settings +KEXT_BINARCHDIR = bin/$(GAParch) +KEXT_SO = $(KEXT_BINARCHDIR)/$(KEXT_NAME).so + +# the following settings are provided by sysinfo.gap in GAP >= 4.12; +# for compatibility with older GAP version (at least 4.9, 4.10, 4.11) +# we try to "guess" suitable values here +GAP ?= $(GAPPATH)/gap +GAC ?= $(GAPPATH)/gac +GAP_OBJEXT ?= lo + +# override KEXT_RECONF if your package needs a different invocation +# for reconfiguring (e.g. `./config.status --recheck` for autoconf) +ifdef KEXT_USE_AUTOCONF +KEXT_RECONF ?= ./config.status Makefile +else +KEXT_RECONF ?= ./configure "$(GAPPATH)" +endif + +# default target +all: $(KEXT_SO) +.PHONY: all + +######################################################################## +# Object files +# For each file FOO.c in SOURCES, add gen/FOO.$(GAP_OBJEXT) to KEXT_OBJS +# and similar for .cc files +######################################################################## +KEXT_OBJS = $(patsubst %.s,gen/%.$(GAP_OBJEXT), \ + $(patsubst %.cpp,gen/%.$(GAP_OBJEXT), \ + $(patsubst %.c,gen/%.$(GAP_OBJEXT), \ + $(KEXT_SOURCES)))) + +######################################################################## +# Quiet rules. +# +# Replace regular output with quiet messages, unless V is set, +# e.g. "make V=1" +######################################################################## +ifneq ($(findstring $(MAKEFLAGS),s),s) +ifndef V +QUIET_GAC = @echo " GAC $< => $@";>/dev/null # keep the trailing space! +endif +endif + +######################################################################## +# Rules for automatic header dependency tracking. +# This is based on the GAP build system. +######################################################################## + +# List of all (potential) dependency files, derived from KEXT_OBJS +KEXT_DEPFILES = $(patsubst %.$(GAP_OBJEXT),%.d,$(KEXT_OBJS)) + +# Include the dependency tracking files +-include $(KEXT_DEPFILES) + +# Mark *.d files as PHONY. This stops make from trying to recreate them +# (which it can't), and in particular from looking for potential source +# files. This can save quite a bit of disk access time. +.PHONY: $(KEXT_DEPFILES) + +# The following flags instruct the compiler to enable advanced +# dependency tracking. Supported by GCC 3 and newer; clang; Intel C +# compiler; and more. +KEXT_DEPFLAGS = -MQ "$@" -MMD -MP -MF $(@D)/$(*F).d + +# build rule for C code +# The dependency on Makefile ensures that re-running configure recompiles everything +gen/%.$(GAP_OBJEXT): %.c Makefile + @mkdir -p $(@D) + $(QUIET_GAC)$(GAC) -d -p "$(KEXT_DEPFLAGS)" -p "$(KEXT_CFLAGS)" -c $< -o $@ + +# build rule for C++ code +# The dependency on Makefile ensures that re-running configure recompiles everything +gen/%.$(GAP_OBJEXT): %.cpp Makefile + @mkdir -p $(@D) + $(QUIET_GAC)$(GAC) -d -p "$(KEXT_DEPFLAGS)" -p "$(KEXT_CXXFLAGS)" -c $< -o $@ + +# build rule for assembler code +# The dependency on Makefile ensures that re-running configure recompiles everything +gen/%.$(GAP_OBJEXT): %.s Makefile + @mkdir -p $(@D) + $(QUIET_GAC)$(GAC) -d -p "$(KEXT_DEPFLAGS)" -p "$(KEXT_CFLAGS)" -c $< -o $@ + +# build rule for linking all object files together into a kernel extension +$(KEXT_SO): $(KEXT_OBJS) + @mkdir -p $(@D) + $(QUIET_GAC)$(GAC) -d -p "$(KEXT_DEPFLAGS)" -P "$(KEXT_LDFLAGS)" $(KEXT_OBJS) -o $@ + +# hook into `make clean` +clean: clean-kext +clean-kext: + rm -rf $(KEXT_BINARCHDIR) gen + +# hook into `make distclean` +distclean: distclean-kext +distclean-kext: + rm -rf bin gen Makefile + rm -rf doc/_*.xml + rm -rf doc/*.aux doc/*.bbl doc/*.blg doc/*.brf doc/*.idx doc/*.idx + rm -rf doc/*.ilg doc/*.ind doc/*.log doc/*.out doc/*.pnr doc/*.toc + +# hook into `make doc` +doc: doc-kext +doc-kext: + $(GAP) --quitonbreak -b -q < makedoc.g + +# hook into `make check` +check: check-kext +check-kext: + $(GAP) tst/testall.g + +# re-run configure if configure, Makefile.in or GAP itself changed +Makefile: configure Makefile.in $(GAPPATH)/sysinfo.gap + $(KEXT_RECONF) + +ifdef KEXT_USE_AUTOCONF + +# react to modifications of the build system +configure_deps = configure.ac $(wildcard m4/*.m4) + +ifneq ($(MAINTAINER_MODE),no) +configure: $(configure_deps) + @if command -v autoconf >/dev/null 2>&1 ; then \ + echo "running autoconf" ; \ + autoconf ; \ + else \ + echo "autoconf not available, proceeding with stale configure" ; \ + fi +endif # MAINTAINER_MODE + +# re-run configure if configure, Makefile.in or GAP itself changed +config.status: configure $(GAPPATH)/sysinfo.gap + ./config.status --recheck + +# update Makefile if config.status changed +Makefile: config.status + +gen/pkgconfig.h: gen/pkgconfig.h.stamp + @if test ! -f $@; then rm -f $<; else :; fi + @if test ! -f $@; then $(MAKE) $<; else :; fi + +gen/pkgconfig.h.stamp: src/pkgconfig.h.in config.status + @rm -f $@ + @mkdir -p $(@D) + ./config.status gen/pkgconfig.h + echo > $@ + +ifneq ($(MAINTAINER_MODE),no) +src/pkgconfig.h.in: $(configure_deps) + @if command -v autoheader >/dev/null 2>&1 ; then \ + mkdir -p $(@D) ; \ + echo "running autoheader" ; \ + autoheader ; \ + rm -f gen/pkgconfig.h.stamp ; \ + else \ + echo "autoheader not available, proceeding with stale config.h" ; \ + fi + touch $@ +endif # MAINTAINER_MODE + +endif # KEXT_USE_AUTOCONF + +.PHONY: check clean distclean doc +.PHONY: check-kext clean-kext distclean-kext doc-kext + +######################################################################## +# Makefile debugging trick: +# call print-VARIABLE to see the runtime value of any variable +######################################################################## +print-%: + @echo '$*=$($*)' diff --git a/Makefile.in b/Makefile.in new file mode 100644 index 000000000..f7b64c0f2 --- /dev/null +++ b/Makefile.in @@ -0,0 +1,110 @@ +# +# Makefile rules for the semigroups package +# +KEXT_NAME = semigroups + +KEXT_CXXFLAGS = @LIBSEMIGROUPS_CFLAGS@ -std=gnu++14 -O3 +KEXT_LDFLAGS = -lstdc++ # add C++ library + +# configure settings +GAPPATH = @GAPROOT@ +HPCOMBI_CONSTEXPR_FUN_ARGS = @HPCOMBI_CONSTEXPR_FUN_ARGS@ +LIBSEMIGROUPS_HPCOMBI_ENABLED = @LIBSEMIGROUPS_HPCOMBI_ENABLED@ +WITH_INCLUDED_LIBSEMIGROUPS = @WITH_INCLUDED_LIBSEMIGROUPS@ +SYS_IS_CYGWIN = @SYS_IS_CYGWIN@ + +# sources +KEXT_SOURCES = src/bipart.cpp +KEXT_SOURCES += src/cong.cpp +KEXT_SOURCES += src/froidure-pin-base.cpp +KEXT_SOURCES += src/froidure-pin-bipart.cpp +KEXT_SOURCES += src/froidure-pin-bmat.cpp +KEXT_SOURCES += src/froidure-pin-fallback.cpp +KEXT_SOURCES += src/froidure-pin-matrix.cpp +KEXT_SOURCES += src/froidure-pin-max-plus-mat.cpp +KEXT_SOURCES += src/froidure-pin-min-plus-mat.cpp +KEXT_SOURCES += src/froidure-pin-pbr.cpp +KEXT_SOURCES += src/froidure-pin-pperm.cpp +KEXT_SOURCES += src/froidure-pin-transf.cpp +KEXT_SOURCES += src/pkg.cpp +KEXT_SOURCES += src/to_gap.cpp +KEXT_SOURCES += gapbind14/src/gapbind14.cpp + +KEXT_CPPFLAGS = -Igapbind14/include/ + +ifdef HPCOMBI_CONSTEXPR_FUN_ARGS +KEXT_CPPFLAGS += -DHPCOMBI_CONSTEXPR_FUN_ARGS +endif + +ifdef LIBSEMIGROUPS_HPCOMBI_ENABLED +KEXT_CXXFLAGS += $(HPCOMBI_CXXFLAGS) +endif + +ifdef WITH_INCLUDED_LIBSEMIGROUPS +KEXT_LDFLAGS += -Wl,-rpath,bin/lib +# FIXME(later) all the include paths should point into bin/include/ and not to +# the sources, or otherwise we should stop make installing into bin +ifdef LIBSEMIGROUPS_HPCOMBI_ENABLED +KEXT_CPPFLAGS += -Ilibsemigroups/extern/HPCombi/include +KEXT_CPPFLAGS += -Ilibsemigroups/extern/HPCombi/include/fallback +endif +KEXT_CPPFLAGS += -Ilibsemigroups/extern/fmt-8.0.1/include +KEXT_CPPFLAGS += -Ilibsemigroups/include +endif +KEXT_CPPFLAGS += -DFMT_HEADER_ONLY + +ifdef KERNEL_DEBUG +KEXT_CPPFLAGS += -DDEBUG +else +KEXT_CPPFLAGS += -DNDEBUG +endif + +KEXT_CXXFLAGS += $(KEXT_CPPFLAGS) # HACK: there is no KEXT_CPPFLAGS + +KEXT_LDFLAGS += @LIBSEMIGROUPS_LIBS@ + +# HACK: On cygwin, add this flag to work around issues where fork() sometimes +# fails on Cygwin when semigroups.so is loaded into GAP. This will hopefully +# become unnecessary with GAP 4.13, which will automatically add this to the +# flags. +ifdef SYS_IS_CYGWIN +KEXT_LDFLAGS += -Wl,--enable-auto-image-base +endif + +# include shared GAP package build system +KEXT_USE_AUTOCONF = 1 +include Makefile.gappkg + +# ensure pkgconfig.h is built +$(KEXT_OBJS): gen/pkgconfig.h + +ifdef WITH_INCLUDED_LIBSEMIGROUPS +# ensure libsemigroups is installed into bin before compiling +$(KEXT_OBJS): bin/include/libsemigroups/libsemigroups.hpp + +# the following is only run if BUILT_SOURCES is wound up +bin/include/libsemigroups/libsemigroups.hpp: + $(MAKE) -C libsemigroups install + # Cygwin only looks for DLLs in the same directory as the executable + # resides in. The following achieves that assuming that the GAP + # being used was self-compiled by the user. If the GAP build system + # changes to stop using GNU libtool, this will have to be adjusted. + if test -f bin/bin/cygsemigroups*.dll ; then cp bin/bin/cygsemigroups*.dll $(GAPPATH)/.libs ; fi + +endif + +clean: + find . -name '*.gcda' -delete + +lint: + etc/gaplint.sh + etc/cpplint.sh + +format: + clang-format -i src/*.[hc] + +.PHONY: lint format + +superclean: distclean + git clean -xdf --exclude *.swp --exclude *.swo +.PHONY: superclean diff --git a/configure.ac b/configure.ac index 11c396ef2..a7c84aac0 100644 --- a/configure.ac +++ b/configure.ac @@ -9,26 +9,12 @@ dnl ## dnl ## Setup autoconf dnl ## AC_PREREQ([2.68]) -AC_INIT([semigroups], m4_esyscmd([tr -d '\n' < .VERSION])) +AC_INIT([semigroups], [GAP package]) AC_CONFIG_SRCDIR([src/pkg.cpp]) -AC_CONFIG_HEADERS([src/_pkgconfig.h:cnf/pkgconfig.h.in]) +AC_CONFIG_HEADERS([gen/pkgconfig.h:src/pkgconfig.h.in]) AC_CONFIG_MACRO_DIR([m4]) -AC_CONFIG_AUX_DIR([cnf]) -dnl ## -dnl ## Get canonical host info -dnl ## -AC_CANONICAL_HOST -AC_CANONICAL_TARGET - -dnl ## -dnl ## Setup automake -dnl ## -AM_INIT_AUTOMAKE([1.11 -Wall foreign subdir-objects nostdinc]) -AM_SILENT_RULES([yes]) -AM_PROG_AR - -AX_PREFIX_CONFIG_H([src/semigroups-config.hpp],[],[src/_pkgconfig.h]) +AX_PREFIX_CONFIG_H([src/semigroups-config.hpp],[semigroups],[gen/pkgconfig.h]) dnl ## abs_top_builddir seems to hold the top build dir for the subpackage dnl ## libsemigroups which is why this contains ../ @@ -42,12 +28,6 @@ AC_LANG([C++]) AX_CXX_COMPILE_STDCXX_14(,[mandatory]) -dnl ## -dnl ## Setup libtool (for building the GAP kernel extension) -dnl ## -LT_PREREQ([2.4.2]) -LT_INIT([disable-static dlopen win32-dll]) - dnl ## dnl ## Locate the GAP root dir dnl ## @@ -63,10 +43,9 @@ dnl ## dnl ## Detect Windows resp. Cygwin dnl ## case $host_os in - *cygwin* ) CYGWIN=yes;; - * ) CYGWIN=no;; + *cygwin* ) AC_SUBST(SYS_IS_CYGWIN, yes);; esac -AM_CONDITIONAL([SYS_IS_CYGWIN], [test "$CYGWIN" = "yes"]) + dnl ## Check for libsemigroups AX_CHECK_LIBSEMIGROUPS @@ -79,11 +58,11 @@ AC_ARG_ENABLE([debug], ) AC_MSG_CHECKING([whether to enable debug mode]) AC_MSG_RESULT([$enable_debug]) - -AM_CONDITIONAL([KERNEL_DEBUG], [test "x$enable_debug" = xyes]) +ERNEL_DEBUG=$enable_debug +AC_SUBST(KERNEL_DEBUG) # Check if HPCombi is enable, and available -AX_CHECK_HPCOMBI() +AX_CHECK_HPCOMBI dnl ## dnl ## Output everything diff --git a/gapbind14/.gitignore b/gapbind14/.gitignore deleted file mode 100644 index b0da25eab..000000000 --- a/gapbind14/.gitignore +++ /dev/null @@ -1,60 +0,0 @@ -/doc/chap*.html -/doc/chap*.txt -/doc/*.css -/doc/*.js -/doc/chooser.html -/doc/*.aux -/doc/*.bbl -/doc/*.blg -/doc/*.brf -/doc/*.idx -/doc/*.ilg -/doc/*.ind -/doc/*.lab -/doc/*.log -/doc/*.out -/doc/*.pnr -/doc/*.six -/doc/*.tex -/doc/*.toc -/doc/manual.pdf - -.deps/ -.dirstamp -.libs/ - -/aclocal.m4 -/autom4te.cache/ -/bin/ -/config.log -/config.status -/configure -/lib/ -/libtool -/cnf/dd -/cnf/ar-lib -/cnf/compile -/cnf/config.guess -/cnf/config.sub -/cnf/depcomp -/cnf/install-sh -/cnf/ltmain.sh -/cnf/missing -/cnf/pkgconfig.h.in -/cnf/m4/libtool.m4 -/cnf/m4/ltoptions.m4 -/cnf/m4/ltsugar.m4 -/cnf/m4/ltversion.m4 -/cnf/m4/lt~obsolete.m4 -/Makefile -/Makefile.in -/src/pkgconfig.h -/src/stamp-h1 - -*.la -src/*.lo - -/tmp/ -/gh-pages/ -*.so -demo/gen diff --git a/gapbind14/CPPLINT.cfg b/gapbind14/CPPLINT.cfg index b62bcbb4b..1f8f5cc6f 100644 --- a/gapbind14/CPPLINT.cfg +++ b/gapbind14/CPPLINT.cfg @@ -2,4 +2,4 @@ set noparent filter=-build/c++11,-build/include_subdir,-runtime/indentation_namespace,-runtime/references linelength=80 root=pkg -exclude_files=(semigroups-config.hpp|_pkgconfig.h) +exclude_files=(semigroups-config.hpp|pkgconfig.h) diff --git a/gapbind14/demo/.gitignore b/gapbind14/demo/.gitignore index eca8fdb10..bda691f01 100644 --- a/gapbind14/demo/.gitignore +++ b/gapbind14/demo/.gitignore @@ -1 +1,4 @@ -src/gapbind14.cc \ No newline at end of file +/Makefile +/bin/ +/src/gapbind14.cc +/doc/ diff --git a/m4/ax_check_hpcombi.m4 b/m4/ax_check_hpcombi.m4 index 156b2eb83..1594192e8 100644 --- a/m4/ax_check_hpcombi.m4 +++ b/m4/ax_check_hpcombi.m4 @@ -28,7 +28,7 @@ AC_DEFUN([AX_CHECK_HPCOMBI], [ AC_MSG_RESULT([$enable_hpcombi]) AS_IF([test "x$enable_hpcombi" = xyes], - [AC_CHECK_FILE([$srcdir/extern/HPCombi/VERSION], + [AS_IF([test -f $srcdir/extern/HPCombi/VERSION], [], [AC_MSG_WARN([HPCombi is not available]) [enable_hpcombi=no]])]) @@ -96,7 +96,8 @@ AC_DEFUN([AX_CHECK_HPCOMBI], [ [AC_DEFINE([HPCOMBI_ENABLED], [1], [define if building with HPCombi])]) dnl # the following is used in Makefile.am - AM_CONDITIONAL([LIBSEMIGROUPS_HPCOMBI_ENABLED], [test "x$enable_hpcombi" = xyes]) + AS_IF([test "x$enable_hpcombi" = xyes], + AC_SUBST(LIBSEMIGROUPS_HPCOMBI_ENABLED, yes)) dnl # check for HPCombi's preprocessor macro AS_IF([test "x$enable_hpcombi" = xyes], @@ -112,9 +113,9 @@ AC_DEFUN([AX_CHECK_HPCOMBI], [ ) AC_MSG_RESULT([$hpcombi_constexpr_fun_args])]) - AM_CONDITIONAL([HPCOMBI_CONSTEXPR_FUN_ARGS], - [test "x$hpcombi_constexpr_fun_args" = xyes]) - + AS_IF([test "x$hpcombi_constexpr_fun_args" = xyes], + AC_SUBST(HPCOMBI_CONSTEXPR_FUN_ARGS, yes)) + AS_IF([test "x$enable_hpcombi" = xyes], AC_SUBST(ax_hpcombi_cxxflags_variable)) ]) diff --git a/m4/ax_check_libsemigroup.m4 b/m4/ax_check_libsemigroup.m4 index 0133737d2..de5173451 100644 --- a/m4/ax_check_libsemigroup.m4 +++ b/m4/ax_check_libsemigroup.m4 @@ -19,25 +19,25 @@ AC_DEFUN([AX_CHECK_LIBSEMIGROUPS], [ fi if test "$need_included_libsemigroups" = yes; then AC_MSG_NOTICE([using included libsemigroups...]) - AC_CHECK_FILE( - [libsemigroups/include/libsemigroups/libsemigroups.hpp], + AS_IF( + [test -f libsemigroups/include/libsemigroups/libsemigroups.hpp], [], dnl Temporary workaround for backward compatibility with dnl libsemigroups pre PR 172: Includes in libsemigroups/ - [AC_CHECK_FILE( - [libsemigroups/include/libsemigroups.hpp], + [AS_IF( + [test -f libsemigroups/include/libsemigroups.hpp], [], [AC_MSG_ERROR([libsemigroups is required, clone or download the repo from https://github.com/libsemigroups/libsemigroups into this directory])])]) dnl Temporary workaround for compatibility with dev version of dnl libsemigroups which doesn't contain .VERSION file by default - AC_CHECK_FILE( - [libsemigroups/.VERSION], + AS_IF( + [test -f libsemigroups/.VERSION], [], - [AC_CHECK_FILE([libsemigroups/etc/version-number.sh], - [cd libsemigroups && etc/version-number.sh > .TMP_VERSION && mv .TMP_VERSION .VERSION && cd ..], - [AC_MSG_ERROR([cannot determine the version of libsemigroups])])]) - + [AS_IF([test -f libsemigroups/etc/version-number.sh], + [cd libsemigroups && etc/version-number.sh > .TMP_VERSION && mv .TMP_VERSION .VERSION && cd ..], + [AC_MSG_ERROR([cannot determine the version of libsemigroups])])]) + AC_MSG_CHECKING([libsemigroups version]) FOUND_LIBSEMIGROUPS_VERSION="$(cat libsemigroups/.VERSION)" AC_MSG_RESULT([$FOUND_LIBSEMIGROUPS_VERSION]) @@ -47,13 +47,14 @@ AC_DEFUN([AX_CHECK_LIBSEMIGROUPS], [ [], [AC_MSG_ERROR([libsemigroups version $REQUI_LIBSEMIGROUPS_VERSION or higher is required])] ) - AC_SUBST(LIBSEMIGROUPS_CFLAGS, ['-I./bin/include -I./bin/include/libsemigroups']) - AC_SUBST(LIBSEMIGROUPS_LIBS, ['bin/lib/libsemigroups.la']) + AC_SUBST(LIBSEMIGROUPS_CFLAGS, ['-I./bin/include -I./bin/include/libsemigroups']) + AC_SUBST(LIBSEMIGROUPS_LIBS, ['-L./bin/lib -lsemigroups']) AC_CONFIG_SUBDIRS([libsemigroups]) else LIBSEMIGROUPS_VERSION="$(pkg-config --modversion libsemigroups)" AC_MSG_NOTICE([using external libsemigroups $LIBSEMIGROUPS_VERSION]) fi - AM_CONDITIONAL([WITH_INCLUDED_LIBSEMIGROUPS], [test "$need_included_libsemigroups" = yes]) + AS_IF([test "x$need_included_libsemigroups" = xyes], + AC_SUBST(WITH_INCLUDED_LIBSEMIGROUPS, yes)) ]) diff --git a/src/CPPLINT.cfg b/src/CPPLINT.cfg index 4ced5cad6..4d14976a7 100644 --- a/src/CPPLINT.cfg +++ b/src/CPPLINT.cfg @@ -2,4 +2,4 @@ set noparent filter=-build/c++11,-build/c++14,-build/include_subdir,-runtime/indentation_namespace,-runtime/references,-readability/todo linelength=80 root=../.. -exclude_files=(semigroups-config.hpp|_pkgconfig.h) +exclude_files=(semigroups-config.hpp|pkgconfig.h)