[llvm-commits] [llvm-top] r37885 - in /llvm-top/trunk: Makefile README.txt
Chris Lattner
sabre at nondot.org
Wed Jul 4 22:46:02 PDT 2007
Author: lattner
Date: Thu Jul 5 00:46:02 2007
New Revision: 37885
URL: http://llvm.org/viewvc/llvm-project?rev=37885&view=rev
Log:
Make checkout automatically check out dependent projects. For example,
'make checkout MODULE=stacker' now checks out stacker and llvm.
Modified:
llvm-top/trunk/Makefile
llvm-top/trunk/README.txt
Modified: llvm-top/trunk/Makefile
URL: http://llvm.org/viewvc/llvm-project/llvm-top/trunk/Makefile?rev=37885&r1=37884&r2=37885&view=diff
==============================================================================
--- llvm-top/trunk/Makefile (original)
+++ llvm-top/trunk/Makefile Thu Jul 5 00:46:02 2007
@@ -14,14 +14,36 @@
# etc.
#
SVN = svn
-SVNROOT := $(shell $(SVN) info . | grep 'Repository Root:' | \
+SVNROOT = $(shell $(SVN) info . | grep 'Repository Root:' | \
sed -e 's/^Repository Root: //')
+
+# Rule to get the modules that $(MODULE) depends on.
+MODULEINFO = $(MODULE)/ModuleInfo.txt
+DEPMODULES = grep -i DepModule: $(MODULEINFO) | \
+ sed 's/DepModule: //g'
+
+
.PHONY: checkout
+ifndef MODULE
+checkout:
+ @echo ERROR: you must specify a MODULE value to 'make checkout'.
+ @echo ERROR: for example, use: 'make checkout MODULE=llvm'.
+
+else
+
+# Check out a module and all its dependencies.
checkout:
$(SVN) co $(SVNROOT)/$(MODULE)/trunk $(MODULE)
+ @if test -f $(MODULEINFO); then \
+ for mod in `$(DEPMODULES)`; do \
+ echo "NOTE: $(MODULE) module depends on $$mod, checking it out."; \
+ $(MAKE) checkout MODULE=$$mod; \
+ done; \
+ fi
+endif
Modified: llvm-top/trunk/README.txt
URL: http://llvm.org/viewvc/llvm-project/llvm-top/trunk/README.txt?rev=37885&r1=37884&r2=37885&view=diff
==============================================================================
--- llvm-top/trunk/README.txt (original)
+++ llvm-top/trunk/README.txt Thu Jul 5 00:46:02 2007
@@ -10,14 +10,27 @@
svn co http://llvm.org/svn/llvm-project/llvm-top/trunk llvm-top
-Once you've done that, you can then use the following "make" targets to check
-out the various modules of the project:
+Once you've done that, you can then check out a module (and all its
+dependencies) with the 'make checkout MODULE=modulename' command. For example:
+
+ make checkout MODULE=llvm-gcc-4.0
+
+Checks out llvm-gcc (the llvm C/C++/ObjC compiler built with the GCC 4.0
+front-end) and all the things it depends on. Other modules available
+are:
+
+ test-suite - The llvm test suite
+ stacker - The stacker front end (a 'Forth-like' language)
+ hlvm - High Level Virtual Machine
+
+You can check out any number of modules.
+
+
+Once you check out the modules, use the "make" command to automatically
+configure and build the projects you checked out.
+
+...
-make checkout MODULE=llvm - Checks out the llvm (core) module
-make checkout MODULE=llvm-gcc - Checks out the GCC based C/C++/Obj-C compiler
-make checkout MODULE=test-suite - Checks out the llvm test suite
-make checkout MODULE=stacker - Checks out the stacker front end
-make checkout MODULE=hlvm - Checks out the High Level Virtual Machine
Some Other Useful URLS
======================
More information about the llvm-commits
mailing list