Commit Graph

33 Commits

Author SHA1 Message Date
steve-chavez
57ce9be868 add .dirstamp to examples 2023-08-03 20:48:45 -05:00
steve-chavez
1523a830d8 fix: make check always compiles dependencies
Make is supposed to only compile dependencies when they change but
`make check` always compiles them, making the test suite run slow.

```
$ make check
cc ... build/mpc.o

$ make check
cc ... build/mpc.o
```

The same occurs for other targets like `build/test-dynamic` and
`build/test-static`.

This happens because these targets have the `$(DIST)` directory as a
dependency, and directories always change whenever members are added,
removed or renamed.

Fix this by changing the `$(DIST)` directory dependency to a
`$(DIST)/.dirstamp` file.

Now `make check` compiles dependencies only once.
2023-08-03 18:09:19 -05:00
steve-chavez
318747b270 fix: pkg-config only finding mpc with sudo
After running `make install`, pkg-config only finds mpc with sudo:

```
$ sudo pkg-config --list-all | grep mpc
mpc - Library for creating parser combinators

$ pkg-config --list-all | grep mpc
```

This is because the Makefile runs `install -d -m644`, which doesn't
include permission to access the `/usr/local/lib/pkgconfig` directory.

Fix this by changing the created directories mode to 645.
2023-07-23 00:01:21 -05:00
Maxim Cournoyer
92983ee2ff Makefile: Install the templated pkg-config file.
Otherwise, the 'prefix' variable would be left undefined:

   $ pkg-config --cflags mpc
   Variable 'prefix' not defined in '/gnu/store/...-profile/lib/pkgconfig/mpc.pc'

   $ cat /gnu/store/...-profile/lib/pkgconfig/mpc.pc
   libdir=${prefix}/lib
   includedir=${prefix}/include
   [...]

* Makefile (install): Install the templated pkg-config from the build
directory.
(all): Add the libs and $(DIST)/$(PROJ).pc targets.
2023-03-31 15:39:09 -04:00
Brett Holman
7d69afe7c8 fix makefile install target problems 2021-11-29 11:48:54 -07:00
Brett Holman
e6d92d88f7 fix makefile libs target 2021-11-21 12:05:21 -07:00
Daniel Holden
d59264ae27 fixed makefile when build directory doesn't exist 2020-07-19 08:57:42 -04:00
Daniel Holden
4c7d9e3d40 Merge pull request #125 from HalosGhost/pc
(#124) preliminary pkg-config file setup and install
2020-04-11 17:51:11 -04:00
halosghost
7bc1bb0a9b (#124) preliminary pkg-config file setup and install 2020-02-09 22:04:09 -06:00
halosghost
e1f5bea982 (#122) Support building with tcc
- replace ``mpc.h`` with ``$(PROJ).h``
- ``filter-out`` ``$(PROJ).h`` when building examples
- expose ``$(STD)``
2020-02-03 23:32:25 -06:00
Joshua Crowgey
0edd06ec44 Removed trailing whitespace 2020-01-08 22:07:32 -08:00
vemakereporter
7812a33774 Fix dependency issues reported by Vemake 2019-08-07 10:15:39 +00:00
Vemake
217a551a0a Use tabs instead of spaces in Makefile. 2019-08-07 17:55:12 +08:00
Vemake
8cf2c1d2d7 Fix 12 dependency issues in Makefile 2019-07-23 12:14:11 +08:00
halosghost
147545a488 preliminarily detect windows platforms and call -fPIC accordingly 2019-06-09 18:20:27 -05:00
halosghost
41f3a6de7c leverage $(AR) and allow mkdir-invocation to be configurable 2019-05-23 21:23:35 -05:00
halosghost
a17815f36c Dramatically update Makefile
- Out-of-Tree builds (defaults to ./build, configurable via DIST)
- Install and uninstall rules (which respect DESTDIR and PREFIX)
- Production of static and dynamic libraries
- Testing of all three methods of inclusion
    - direct file inclusion
    - static library
    - dynamic library (using LD_LIBRARY_PATH)
- Better declaration of PHONY targets
- Expose ability to override CC and CFLAGS
2018-11-09 11:19:49 -06:00
Abhishek Kumar
e032b410b2 Remove foobar and tree_traversal too while doing 'make clean' 2016-05-04 10:32:02 +05:30
Daniel Holden
613fc26729 fixed bug. Reenabled O3. 2015-11-09 13:34:39 +00:00
Daniel Holden
4932c86ec7 Fixed bug in optimisation pass. 2015-11-09 12:06:13 +00:00
Daniel Holden
123a7919d1 Added string stripping functions 2015-03-10 10:44:29 +00:00
Daniel Holden
5094d2c015 Removed comments describing changes. Fixed warnings reported by gcc in the test suite 2014-10-16 15:38:27 +01:00
Dalton Woodard
6efe026b25 Reverted to default standard to -ansi. Fixed warnings under compilation against -ansi. Code now builds and tests successfully under -std=c11 and -ansi on both clang (600.0.51) and gcc (4.9.1). 2014-10-15 16:23:59 -07:00
Dalton Woodard
ff36156283 Small update to change notes in Makefile. 2014-10-14 23:21:03 -07:00
Dalton Woodard
c26ed9a09b Update to Makefile, added change notes. 2014-10-14 23:16:11 -07:00
Dalton Woodard
1a6ed8de32 Fixed make throwing error on repeated invokation of make clean, added example executables to clean list.
Filtered out -Werror on compilation of ptest.c (was thowing errors).
2014-10-14 22:33:29 -07:00
Daniel Holden
6af8360517 Fixed bug with mpca_lang statement delete 2014-05-05 11:04:00 +01:00
Daniel Holden
d5e2bdf977 Added flags to language specifiction. Added optional expect string to language specification. Added some exaple grammars for testing and demos 2014-01-26 11:25:50 +00:00
Daniel Holden
8931782986 Fixed memory leaks 2014-01-21 10:23:58 -05:00
Daniel Holden
26b6216d7a Fixed unused warnings 2014-01-10 10:03:25 +00:00
Daniel Holden
acd3c74373 Fixed errorous behaviour 2013-10-04 19:28:13 +01:00
Daniel Holden
a625db585d strictly ansi C now 2013-09-30 20:55:57 +01:00
Daniel Holden
c2f936bcb7 First commit 2013-09-19 20:57:40 +01:00