info-inventor-dev
[Top] [All Lists]

Re: Makefile system

To: Jonathan Lim <jlim@xxxxxxxxxxxxxxxxxxxx>
Subject: Re: Makefile system
From: Ralf Corsepius <corsepiu@xxxxxxxxxxxxxx>
Date: Mon, 16 Oct 2000 11:45:51 +0200
Cc: Jan Prikryl <prikryl@xxxxxxxx>, info-inventor-dev@xxxxxxxxxxx
Organization: Ralf Corsepius
References: <200010160719.AAA38491@kinabalu.csd.sgi.com>
Reply-to: corsepiu@xxxxxxxxxxxxxx
Sender: owner-info-inventor-dev@xxxxxxxxxxx
Jonathan Lim wrote:
> 
> On Mon Oct 16 00:05:40 2000, prikryl@xxxxxxxx wrote:
> >
> > Hi,
> >

> > (2) Even if making ivman fails, the build continues further
> 
> There are no specific instructions to halt the build if that of ivman fails. I
> believe gmake determines when it's had enough errors.
> 
I don't think so. IMO, this is the result of a series of issues with
exit status evaluation in the rules to be used for building the
man-pages and subdirectories.

The patch below is a brute-force hack to outline and partially fix
this issue.

[apply the patch, then cd doc/man, make clean, unset DISPLAY and
finally run make. You'll hopefully experience the difference :)]

> > Another question: some time ago, Morten Eriksson from SIM thought
> > about providing an automake/autoconf support for the Inventor code
> > ... I suppose it is not a trivial thing to set up, and probably better
> > done by a single developer, but if I could help somehow (the current
> > makefile system drives me nuts sometimes).
> 
> Much of the system-dependent stuff has been moved to make/ivcommondefs and
> make/system. I believe any use of automake/autoconf should not have to touch
> the stuff in the other subdirectories. The most recent check-ins clean up a
> lot of compiler warnings, etc.
AFAIU, this matches to some extend with my proposal in my previous
mail.

However, I have noticed a couple of spots for which your assumption
does not hold. Avoiding these would require further "code surgery".

Ralf

-- 
Ralf Corsepius 
Forschungsinstitut fuer Anwendungsorientierte Wissensverarbeitung
(FAW)
Helmholtzstr. 16, 89081 Ulm, Germany     Tel: +49/731/501-8690
mailto:corsepiu@xxxxxxxxxxxxxx           FAX: +49/731/501-999  
http://www.faw.uni-ulm.de
Index: make/commondefs
===================================================================
RCS file: /cvs/inventor/make/commondefs,v
retrieving revision 1.2
diff -u -r1.2 commondefs
--- make/commondefs     2000/09/18 07:27:37     1.2
+++ make/commondefs     2000/10/16 09:25:28
@@ -668,8 +668,8 @@
                        echo "SKIPPING $$d: No such directory."; \
                fi \
        else \
-               echo "\t(cd $$d; $(MAKE) $${RULE:=$@})"; \
-               (cd $$d; ${MAKE} $${RULE:=$@}); \
+               echo "\t(cd $$d && $(MAKE) $${RULE:=$@})"; \
+               (cd $$d && ${MAKE} $${RULE:=$@}) || exit 1; \
        fi
 
 SUBDIRS_MAKERULE= \
Index: make/ivcommonrules
===================================================================
RCS file: /cvs/inventor/make/ivcommonrules,v
retrieving revision 1.1
diff -u -r1.1 ivcommonrules
--- make/ivcommonrules  2000/09/18 07:27:37     1.1
+++ make/ivcommonrules  2000/10/16 09:25:28
@@ -25,7 +25,7 @@
        $(LD) $(LDDSOOPTS) $^ $(LDLIBS) -o $@
 
 $(LARCHIVE):
-       for i in $(SUBDIRS); do (cd $$i; $(MAKE) all); done
+       for i in $(SUBDIRS); do (cd $$i && $(MAKE) all); done
        $(RM) $(LARCHIVE)
        $(AR) $(ARFLAGS) $(LARCHIVE) $(OBJECTS)
 
@@ -53,7 +53,7 @@
 .SUFFIXES: .ivm .3iv
 
 .ivm.3iv:
-       (cd ..; $(IVMAN) `$(MAKEMANDIRS) $(*F)`) > $@
+       (cd .. && $(IVMAN) `$(MAKEMANDIRS) $(*F)`) > $@
 
 MAN3PAGES = $(IVMFILES:.ivm=.3iv)
 
<Prev in Thread] Current Thread [Next in Thread>