0

Since yesterday i'm trying to install CUnit on my computer. I know how to do it because it worked on my college computer. I used this topic Building CUnit on Windows, i'm sure that the answer works.

But on my personnal PC i'm having a problem after libtoolize, using automake --add-missing. I tried to do autoreconf --install but i'm still getting this error :

CUnit/Sources/Framework/Makefile.am:20: '%' style pattern rules are a GNU make extension

The 20th line in the file is the following one :

 %_test.o: %.c
      $(COMPILE) $(TEST_INCLUDES) $(TEST_DEFINES) -o $@-c$<

I searched on the internet and I saw that some people recommend to use .c instead of %c but it doesn't work for me, it only does three libtoolize lines and stopped then. If I try to do automake --add-missing after this modification, nothing is going on.

I really don't know what to do now, it would be really helpful if someone had a solution.

Thanks

Community
  • 1
  • 1

1 Answers1

1

You don't mention which OS your personal computer is running, but it appears that the "make" you have installed is not GNU Make. It is probably a BSD make. So, it doesn't honor %-style pattern rules.

One option is to install GNU make; it's an easy program to download and build, so you could install it easily.

Or, this page gives automake options to force it to write more portable makefiles:

https://lists.gnu.org/archive/html/automake/2007-01/msg00002.html

  • I use Windows. I built the GNU make as you told me and now i can remove the % and it works, thanks. However, i'm still having issues. First of all, when I libtoolize, it tells me `Consider adding 'AC_CONFIG_MACRO_DIR([m4])' to configure in` and `consider adding '-I m4' to ACLOCAL_AMFLAGS`. I added the first one but I wasn't able to add the second one but I saw on other forums that it's a recommandation and it can be done without adding it. But after, even if I do what's answered here https://lc.cx/ZtSE because I'm having the same issue (doing make), CUnit builds but isn't usable programming – Quentin Lassalle Oct 28 '15 at 22:34