summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* include an extern C function in libfsm so we can use AC_CHECK_LIBHEADmasterAdrian Thurston2023-03-121-0/+2
|
* ran autoupdateAdrian Thurston2022-08-231-13/+14
| | | | | | | Some things this did: * added missing [] around parameters * removed obsolte macros, replaced with currently recommended macros * fixed some whitespace issues in macro arguments
* generate a check for EOF if there are from-state actionsAdrian Thurston2021-12-286-7/+7
| | | | | | | | | From-state actions now execute on EOF, but we don't check for their presence when deciding if we should test against EOF. This led to from-state actions executing only if other conditions necessitating EOF-testing are present. Added the check. refs adrian-thurston/ragel#80
* Use /proc/self/exe to detect colm build directoryVictor Westerhuis2021-12-112-7/+16
| | | | | | | | | | | The canonical identity of a file on Unix is the combination of device and inode numbers. This code checks both possible paths for the colm executable: directly in the build directory (when colm is linked against libcolm statically) or in libtool's `objdir` subdirectory (when colm is linked against libcolm dynamically). This fails in two situations I can see: when /proc is not mounted or doesn't exist, or when colm is installed using a hard link.
* if buildDir is not set with -B, try to find a defaultAdrian Thurston2021-12-113-2/+22
| | | | | | | | | | | | | | | When running from the build directory, if one forgets to give -B, and colm was previously installed at the current prefix, colm programs will build against the installed version, not the local source tree. This won't be immediately obvious and could lead to confusion during development. To prevent this, try to find the buildDir if one is not given. The tests can continue to specify the buildDir with -B, which is the most safe way. The buildDir is defaulted by testing the buildDir known at compile time against LD_LIBRARY_PATH. Libtool on ubuntu 20.04 will place the buildDir at the head of LD_LIBRARY_PATH. It seems likely that it would do this on all systems, making it a seemingly good test.
* Install runtests as a scriptVictor Westerhuis2021-12-061-1/+1
| | | | This installs it executable, as it should be.
* Fix some spelling errorsVictor Westerhuis2021-12-063-3/+3
|
* Delete test cases in out-of-tree buildVictor Westerhuis2021-12-055-0/+18
| | | | | | | | While 7e3709188833f72ca7a0808942d3a9da6464675f deleted too much, the fix in f9708db3960b95457c1efaf092efc65d3b486c9f actually deleted too little. The cleaning is now guarded by the same condition as the initial linking or copying.
* Fix misdeclared parameter in test fileVictor Westerhuis2021-12-051-5/+5
| | | | This causes complaints when building with LTO enabled.
* Providing a more helpful README.md for ColmJan Max Meyer2021-12-046-80/+192
|
* removed deletion of test cases from make cleanAdrian Thurston2021-12-045-8/+8
|
* added ignore for src/stamp-h3Adrian Thurston2021-12-041-0/+1
|
* added a description to AC_DEFINE_UNQUOTED for PUBDATEAdrian Thurston2021-12-041-1/+1
|
* Merge pull request #138 from viccie30/fix-out-of-tree-buildAdrian Thurston2021-12-0416-176/+142
|\ | | | | Some build system fixes
| * Honor includedir and libdir settingsVictor Westerhuis2021-12-042-4/+5
| | | | | | | | | | They are usually direct subdirectories of the prefix, but they can be different, for example in Debian's multiarch scheme.
| * Honor CC and CFLAGS environment variablesVictor Westerhuis2021-12-042-4/+17
| | | | | | | | This makes it easier to use a cross-compiler, for example.
| * Clean up moreVictor Westerhuis2021-12-047-3/+9
| | | | | | | | | | Everything built by make should be cleaned up by make clean, according to the automake manual.
| * Only build tests when running checkVictor Westerhuis2021-12-046-26/+15
| | | | | | | | | | Change noinst_ targets to check_. Also move from BUILT_SOURCES to explicit dependencies to prevent running colm when not running tests.
| * Make tests buildable in out-of-tree buildVictor Westerhuis2021-12-048-17/+64
| | | | | | | | | | | | Let libtool take care of the linking. Prefer linking to libcolm statically, like before. Add explicit include paths for files included from the corresponding source directory.
| * Make colm executable buildable in out-of-tree buildVictor Westerhuis2021-12-041-4/+4
| |
| * Move src/include/colm generation to config.statusVictor Westerhuis2021-12-042-4/+23
| | | | | | | | | | | | | | The list of linked headers comes from RUNTIME_HDR in src/Makefile.am. Also don't delete it in clean, but do delete it in distclean, like any file configured by config.status.
| * Remove empty header src/rtvector.hVictor Westerhuis2021-12-044-38/+2
| | | | | | | | | | This header has been empty since 2010. It is not installed, so it does not change the installation.
| * Move version.h generation to config.statusVictor Westerhuis2021-12-043-5/+4
| | | | | | | | | | | | | | | | This means that automake makes sure it's remade when configure{,.ac} or version.h.in change. Also don't delete it in clean, but do delete it in distclean, like any file configured by config.status.
| * Delete automatic detection of running in-sourceVictor Westerhuis2021-12-042-90/+18
| | | | | | | | | | | | | | | | This cannot work reliably when using a separate build dir. Instead, add a new switch to specify the build directory explicitly. Use libtool to build the output, defaulting to statically linking libcolm.
* | cgil: permit ''' in rust output languageAdrian Thurston2021-12-031-1/+1
|/ | | | Helps with adrian-thurston/ragel#3.
* Merge pull request #137 from viccie30/memcpy-out-of-boundsAdrian Thurston2021-12-031-1/+2
|\ | | | | Fix out-of-bounds memcpy
| * Fix out-of-bounds memcpyVictor Westerhuis2021-12-031-1/+2
| | | | | | | | | | memcpy in string_alloc_full was copying 32 bytes, while the string is only 25 bytes including the terminating null byte.
* | Merge pull request #136 from viccie30/host-call-prototypeAdrian Thurston2021-12-022-16/+16
|\ \ | |/ |/| Correct prototype for host call functions in tests
| * Correct prototype for host call functions in testsVictor Westerhuis2021-11-292-16/+16
|/ | | | | | | | | | | All parameters for host calls declared in Colm source files are converted to value_t by Compiler::writeHostCall: https://github.com/adrian-thurston/colm/blob/fc61ecb3a22b89864916ec538eaf04840e7dd6b5/src/compiler.cc#L1109-L1117 This led to warnings when compiling with LTO. Correcting the prototypes and inserting the appropriate casts makes everything compile without warnings. The test suite still passes the same on my x86_64 machine.
* fix: check enable_static and enable_shared and link libcolm appropriatelyAdrian Thurston2021-11-272-0/+15
| | | | | | If --disable-static or --disable-shared is used, then pass this info to compilation of main.cc and link with libcolm appropriately. Default to a static as has been done for some time. refs adrian-thurston/ragel#70.
* install data files to PREFIX/share/colm (pkgdata_DATA)Adrian Thurston2021-11-232-2/+2
| | | | | Was using data_DATA, which lands in PREFIX/share. This is a nuisance for packaging. refs #134
* enforce manual build dependencies only if manual is requestedAdrian Thurston2021-11-181-5/+7
| | | | | If the manual is requested, then check for asciidoc and pygmentize. Fail configuration if either are not present. refs #132
* always default to not build the manualAdrian Thurston2021-11-131-9/+3
| | | | | | In most build scenarios I now find myself in, the depenencies required for building the manual are not available. There are many uncommon packages to grab. It seems better to build the manual only when asked for explicitly.
* can remove the now empty allocgen.ccAdrian Thurston2021-11-071-1/+1
|
* remaining parts of common.cc moved over to ragelAdrian Thurston2021-11-074-338/+16
| | | | This includes output filter, file name functions, and line directive generation
* moved HostLang type and makeCodeGen funcs to ragelAdrian Thurston2021-11-077-137/+22
|
* moved the findAlphType code over to ragelAdrian Thurston2021-11-074-54/+0
|
* moved the C and ASM host types over to ragelAdrian Thurston2021-11-072-81/+0
|
* moved writeStatement into InputData in ragelAdrian Thurston2021-11-072-92/+0
| | | | | | Write statement belongs in ragel, but can't yet move out CodeGenData. It's at the base of many codegen classes that will live in colm. The functionality here needs to be lifted up out of the base.
* C codegen: use the 'signed' prefix when specifying the size of the signed typesAdrian Thurston2021-11-061-4/+4
|
* C codegen: use SCHAR_MIN and SCHAR_MAX for signed char host typeAdrian Thurston2021-11-061-1/+1
|
* C codegen: decide char signedness based on value of CHAR_MINAdrian Thurston2021-11-061-12/+12
| | | | | | | | | Decide signedness of "char" on at runtime (probably compile time) using a check on CHAR_MIN. This should work with cross compiling setups. With this approach, if you plan to use "char" on ARM you cannot literally specify outside the range 0-127 using decimal/hex. If you need that you can use "signed char" or "unsigned char".
* remove github action workflow, nowhere to run at presentAdrian Thurston2021-10-241-38/+0
|
* allow the base expression in deref and offset to be an expressionAdrian Thurston2021-09-2114-50/+63
| | | | | | Previously allowed only identifier as the base. This is necessary to use the generated DATA() as the base in these expressions, which can be modified by access and therefore must be an expression.
* bump version to 0.14.70.14.7Adrian Thurston2021-02-091-2/+2
|
* fix: make string pointers from locals, not temp stringsAdrian Thurston2021-02-071-2/+5
| | | | fixes #127
* moved creation of version.h and src/include/colm to configureAdrian Thurston2021-02-072-70/+12
|
* build fixes: gen/if[123].cc must depend on gen/if[123].hAdrian Thurston2021-02-061-3/+3
|
* remove all dependence on BUILT_SOURCESAdrian Thurston2021-01-312-30/+97
| | | | | Still running into issues on gentoo with BUILT_SOURCES. Instead make all the necessary dependencies explicit, using the source code files.
* Merge pull request #124 from Grommish/prAdrian Thurston2021-01-181-0/+9
|\ | | | | Correct for cross-compiling