Re: [AD] Weird constructs in makefile.in

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


> See "Static pattern rules" in make.info. I think I needed it because
> I couldn't work out an implicit rule which didn't spit warnings
> and behave correctly at the same time when running make.

Thanks. I learned something new today :-)

> > $(filter %.rtf,$(DOCS)): docs/rtf/%.rtf: docs/src/%._tx $(MAKEDOC)
> >         $(MAKEDOC) -rtf $@ $<
>
> Hmmm... yes. That is a copy&paste. You don't need it for rtf files,
> but I believe the problem I had was with %.txt, when there were
> files with the same name in different directories (evil VPATH).

Never mind, this looks more consistent.

> I thought we were requiring GNU make. Does Solaris use a version
> of GNU make which doesn't support this?  At the moment I wrote
> that the only solution I could think of was writting a sed script
> to match exact filenames with full path, but desisted when I saw
> that entry in the manual.

We do require GNU make and Solaris' GNU make is like that of Linux. The 
problem is that the configure script invokes 'make' directly, not 'gmake', 
for:

	${MAKE-make} info

I've attached a patch, tested on Linux and Solaris 8.

Applied on mainline and (partially) on branch.

-- 
Eric Botcazou
Index: configure.in
===================================================================
RCS file: /cvsroot/alleg/allegro/configure.in,v
retrieving revision 1.62
diff -u -r1.62 configure.in
--- configure.in	26 Jun 2003 17:34:16 -0000	1.62
+++ configure.in	28 Jun 2003 22:10:36 -0000
@@ -709,17 +709,29 @@
 AC_OUTPUT(makefile:makefile.in allegro-config:misc/allegro-config.in,
   [test -z "$CONFIG_HEADERS" || echo timestamp > stamp-h])
 
+dnl The makefile doesn't work with non-GNU make so test for its presence.
+if ${MAKE-make} -v -f /dev/null 2>/dev/null | grep -i "gnu" >/dev/null; then
+  gnu_make="yes"
+fi
+
 dnl Run "make depend" if necessary.
 if test "X$allegro_make_depend" = "Xyes"; then
-  dnl The makefile doesn't work with non-gmake at the moment, so force gmake.
-  if ${MAKE-make} -v -f /dev/null 2>/dev/null | grep -i "gnu" >/dev/null; then
+  if test "X$gnu_make" = "Xyes"; then
     ${MAKE-make} depend
   else
     AC_MSG_WARN([Non-GNU make detected, trying gmake to build dependencies.])
     gmake depend
-    AC_MSG_WARN([You need to use GNU make to build Allegro.])
-    AC_MSG_WARN([This might be called gmake on your system.])
   fi
 fi
 
-${MAKE-make} info
+dnl Display configuration informations
+if test "X$gnu_make" = "Xyes"; then
+  ${MAKE-make} info
+else
+  gmake info
+fi
+
+if test "X$gnu_make" != "Xyes"; then
+  AC_MSG_WARN([You need to use GNU make to build Allegro.])
+  AC_MSG_WARN([This might be called gmake on your system.])
+fi


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/