swarm-support
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: need some house keeping advice


From: Marcus G. Daniels
Subject: Re: need some house keeping advice
Date: 13 Sep 2000 17:14:29 -0700
User-agent: Gnus/5.070084 (Pterodactyl Gnus v0.84) Emacs/20.4

>>>>> "PJ" == Paul E Johnson <address@hidden> writes:

PJ> Yes, this is my goal, to distribute source where people just type "make"
PJ> and it builds.  I don't want them to have to install a separate library.

Here's one way that preserves a distinct identity for the library sources.
It should work with Windows or Unix.  It just checks to see if the library
is installed, using the protocol header file as an indicator, and if it
isn't there, it grabs it off the internet, untars it, and installs it.

The patch is to DynamicGraph, an example of an app that depends on a library,
namely graph-2.1.tar.gz.

That's what I mean by makefile logic.  If you want to aggregate library
sources in one tarball, then perhaps what you want is a "dist" target
that creates a distribution directory, populates it, and tars it up.

Your working area could then still have a symlink to some CVS reference
area.

PJ> The only problem with that is that the symlinked files won't get updated
PJ> in CVS unless I go into their directory and run cvs commit, correct?

If you symlink the whole directory and cd into that then you are in
that directory, and a commit there will do the right thing.

If you symlink the files, then you will have to go into the reference
directory and run cvs commit there.

Index: Makefile
===================================================================
RCS file: /cvs/hive/Swarm/DynamicGraph/Makefile,v
retrieving revision 1.7
diff -c -r1.7 Makefile
*** Makefile    2000/02/27 18:12:59     1.7
--- Makefile    2000/09/14 00:08:06
***************
*** 6,15 ****
  APPVERSION=2.1
  OBJECTS=main.o ModelSwarm.o ObserverSwarm.o
  APPLIBS=-lgraph
! OTHERCLEAN=
  
  include $(SWARMHOME)/etc/swarm/Makefile.appl
  
  main.o: main.m ObserverSwarm.h 
  ModelSwarm.o: ModelSwarm.m ModelSwarm.h 
  ObserverSwarm.o: ObserverSwarm.m ObserverSwarm.h ModelSwarm.h
--- 6,32 ----
  APPVERSION=2.1
  OBJECTS=main.o ModelSwarm.o ObserverSwarm.o
  APPLIBS=-lgraph
! GRAPH=graph-2.1
  
+ OTHERCLEAN=$(wildcard $(GRAPH)/*.o $(GRAPH)/*.a)
+ 
  include $(SWARMHOME)/etc/swarm/Makefile.appl
  
+ all: graph
+ 
+ $(APPEXE): graph
+ 
+ graph:
+       if ! test -f $(SWARMHOME)/include/swarm/graph.h; then \
+         wget 
ftp://ftp.swarm.org/pub/swarm/src/users-contrib/eval/$(GRAPH).tar.gz ;\
+         tar zxf $(GRAPH).tar.gz ; \
+         $(MAKE) -C $(GRAPH) install; \
+       fi
+ 
+ graph-clean:
+       $(MAKE) -C $(GRAPH) clean
+ 
  main.o: main.m ObserverSwarm.h 
  ModelSwarm.o: ModelSwarm.m ModelSwarm.h 
  ObserverSwarm.o: ObserverSwarm.m ObserverSwarm.h ModelSwarm.h
+ 


                  ==================================
   Swarm-Support is for discussion of the technical details of the day
   to day usage of Swarm.  For list administration needs (esp.
   [un]subscribing), please send a message to <address@hidden>
   with "help" in the body of the message.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]