Commit Graph

239 Commits

Author SHA1 Message Date
Reid Spencer
1b426abbbd Allow configuration files to be themselves configured and found in the
OBJ dir instead of only in the SRC dir.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18143 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-23 05:59:53 +00:00
Reid Spencer
9a5acafd04 Duh, put tools in *bin* directory, not *tools* directory as per
PR456.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17964 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-18 20:04:39 +00:00
Reid Spencer
815cbcf0f1 Fix PR456:\
Tools and libraries will be built into $(BUILD_OBJ_ROOT)/$(BuildMode)/bin and \
$(BUILD_OBJ_ROOT)/$(BuildMode)/lib, respectively. Furthermore, the example \
programs will go in $(BUILD_OBJ_ROOT)/$(BuildMode)/examples to keep them \
separate from the tools and hopefully out of the PATH. Install targets \
have not changed.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17953 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-18 10:03:46 +00:00
Reid Spencer
023c4469c3 Fix PR458:
* Don't include Makefile.rules in set of preconditions, it never has to be
  copied to objdir.
* Enable the "update makefile first before executing targets" feature in
  gnu make by *not* using a full path to the Makefile in the rule.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17920 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-17 19:08:44 +00:00
Reid Spencer
5991dcb5d8 Add a command for using llvm-ar correctly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17753 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-14 21:46:55 +00:00
Reid Spencer
12d7951d04 * Clean up all the shared library output on uninstall
* Provide the correct set of input directories to the TAGS target
* Provide a CTAGS target for building Vi style ctags files.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17688 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-12 02:27:36 +00:00
Reid Spencer
cceed9fc77 Implement and document the TOOL_VERBOSE option that asks each tool invoked
to be verbose about its actions too.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17624 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-08 17:32:12 +00:00
Reid Spencer
ca5fe8fb0c * New Recursive Target: clean-all. This target will recursively descend the
$(ObjDir) and clean out all build modes (Debug, Release, Profile) in
  addition to the normal "clean" rules.
* Fix "clean" problems with Lex/Yacc so all files are remove properly.
* Ensure errors from "rm" don't thwart the uninstall and clean targets.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17433 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-02 16:56:15 +00:00
Reid Spencer
3d65949fa1 * New Recursive Target: clean-all
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17432 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-02 16:36:03 +00:00
Reid Spencer
9af3b29405 Eliminate redundant variable definition. Rename Configuration -> BuildMode
Make lex/yacc output cleaned only if in a directory that has those sources.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17391 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-01 07:50:27 +00:00
Chris Lattner
e4cb90f41c When compiling a file, indicate what build it is for
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17388 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-01 06:14:59 +00:00
Reid Spencer
8dce0ad40e Get the shared library extension right on all platforms, regardless of what
Chris wants on his platform.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17379 91177308-0d34-0410-b5e6-96231b3b80d8
2004-10-31 22:53:06 +00:00
Reid Spencer
2e6e8e5862 Fix output for building shared libraries per Chris' requirements
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17376 91177308-0d34-0410-b5e6-96231b3b80d8
2004-10-31 21:07:34 +00:00
Reid Spencer
8676b7eed0 Actually use the correct variable name for building bytecode files.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17374 91177308-0d34-0410-b5e6-96231b3b80d8
2004-10-31 18:52:15 +00:00
Reid Spencer
cc2d1e25f3 Internalize variable names to prevent recursive assignment. Cleanup docs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17359 91177308-0d34-0410-b5e6-96231b3b80d8
2004-10-30 09:19:36 +00:00
Reid Spencer
7614e5130b Don't modify user vars because they will get passed down (modified) to
sub-makes and recursively append causing huge command lines and incorrect
compilation results.

Also, fix the printvars target to align its output and ensure that the
contents of variables can't get interpreted by the shell.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17348 91177308-0d34-0410-b5e6-96231b3b80d8
2004-10-29 22:14:56 +00:00
Reid Spencer
85ec003b1d Make the list of automatic Makefile* files updated explicit instead of
generally wildcarded.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17334 91177308-0d34-0410-b5e6-96231b3b80d8
2004-10-29 04:47:33 +00:00
Chris Lattner
da033ce57a This line breaks FreeBSD and apparently isn't useful anymore.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17332 91177308-0d34-0410-b5e6-96231b3b80d8
2004-10-29 03:46:38 +00:00
Reid Spencer
a69b1ea1f3 Bug Fixes:
* Move rules that build directories earlier in the file so that they are
  always built before the things that depend on them. This enables a
  parallel "dist-check" target.
* Fix use of TOOLLINKOPTS and TOOLLINKOPTSB (thanks to Henrik Bach)
* Standardize the output - some scripts using plain echo instead of $(ECHO)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17318 91177308-0d34-0410-b5e6-96231b3b80d8
2004-10-28 09:15:28 +00:00
Reid Spencer
c6dcc6a0fc Make parallel "install" and "uninstall" targets not step on itself.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17315 91177308-0d34-0410-b5e6-96231b3b80d8
2004-10-28 07:57:28 +00:00
Reid Spencer
80f0ef7291 Bug Fixes:
* Ensure that BUILT_SOURCES depends on OBJ_DIR/Makefile so that they do not
  get built before the Makefile is updated.
* Fix build script for yacc & lex files by stopping it from thwarting the
  dependencies on the file. If the .y file changes, it needs to be rebuilt.
  This also cleans up the problem with llvmAsmParser ALWAYS rebuilding its
  Yacc files just to throw them away because there's no change.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17288 91177308-0d34-0410-b5e6-96231b3b80d8
2004-10-28 00:41:43 +00:00
Reid Spencer
0b8d2f9706 Fix auto-reconfigure bug: make sure we actually reconfigure not just
regenerate the config.status script.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17283 91177308-0d34-0410-b5e6-96231b3b80d8
2004-10-27 22:48:58 +00:00
Reid Spencer
1654448063 Get the *.inc files to depend on tblgen so if tblgen gets fixed, all the
*.inc files get regenerated.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17273 91177308-0d34-0410-b5e6-96231b3b80d8
2004-10-27 04:34:35 +00:00
Reid Spencer
8660678631 Make sure that Makefile.rules and Makefile.config.in are not candidates for
automatic makefile update.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17269 91177308-0d34-0410-b5e6-96231b3b80d8
2004-10-26 23:10:00 +00:00
Reid Spencer
9411c64c51 Cleanup/Fixes:
* Force preconditions to be met FIRST
* Fix dist-check dependency
* Add some variables to the printvars target
* Automatically update Makefile.* as well as just Makefile


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17268 91177308-0d34-0410-b5e6-96231b3b80d8
2004-10-26 22:26:33 +00:00
Chris Lattner
58aef7f43f Unless someone seriously objects, I don't think we really need this. Sorry
resistor :(


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17265 91177308-0d34-0410-b5e6-96231b3b80d8
2004-10-26 20:02:50 +00:00
Reid Spencer
e45ebfa8c3 * Implement the "dist-check" target that verifies the contents of a zipped
tarball.
* Fix bugs in the "dist" target (a precursor to dist-check).
* Correct the implementation of the "install" targets so that they ensure
  the installation directories are created before attmpting to install
  directories in them.
* Reduce the verbosity of the output of the makefile system
* Ensure output includes the configuration whenever libraries or tools are
  built, installed, or uninstalled.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17250 91177308-0d34-0410-b5e6-96231b3b80d8
2004-10-26 07:09:33 +00:00
Chris Lattner
7f2cd27ff1 Give a useful hint
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17232 91177308-0d34-0410-b5e6-96231b3b80d8
2004-10-26 02:58:10 +00:00
Reid Spencer
151f8ba364 New Makefile Features:
* "dist" target now builds tar.gz, tar.bz2, and zip files suitable for
  distribution. "dist" can only be run from $(BUILD_OBJ_ROOT) and implies
  a "check".

* made the preconditions not do a recursive make and ensured that they are
  executed sequentially.

* made the messages output by the makefile be prefixed with "llvm" and the
  make level (e.g. llvm[1]: ) in the same way that make does so that the
  messages are uniform and more readable.

* Fixed the tags target so that tags depends on TAGS which contains the
  rules to build a file named TAGS

* Implemented the EXTRA_DIST feature in a few directories to make sure it
  works.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17210 91177308-0d34-0410-b5e6-96231b3b80d8
2004-10-25 08:27:37 +00:00
Reid Spencer
b1dd3dde03 Fix uninstall from rebuilding everything (wrong dependency)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17204 91177308-0d34-0410-b5e6-96231b3b80d8
2004-10-24 08:21:04 +00:00
Reid Spencer
e5487baa47 Implemented New Features:
* Fixed the install target to install files correctly
* Implemented the uninstall target to remove files from install dirs
* Isolated the top level targets (dist, dist-check, dist-clean, tags) so
  they only run/exist from the top level directory
* Put if/endif gaurds around potentially dangerous $(RM) commands.
* Implemented place-holder rules for distribution targets to just say that
  they aren't implemented yet.
* Implemented tags target in Makefile.rules so all projects can use it
* Made a pony for resistor


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17202 91177308-0d34-0410-b5e6-96231b3b80d8
2004-10-24 07:53:21 +00:00
Reid Spencer
83cbcb9250 Make the $(OBJDIR) go away on clean-local.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17197 91177308-0d34-0410-b5e6-96231b3b80d8
2004-10-24 02:26:09 +00:00
Reid Spencer
3a561f5478 Several Changes:
* Fix parallel build problem on generated dependency files
* Fix rule confusion between .a and .la libraries so that parallel builds
  don't get confused on who is building which .o and which library it is
  going into.
* Fix dependency inclusion to only include C/C++ dependency files because
  other types of sources won't have dependencies auto generated.
* Change "Source" to "SOURCES" for naming consistency
* Update parallel build rules for new recursive targets
* Implement EXPERIMENTAL_DIRS (failure allowed) feature
* Implement -local version of targets (all-local, clean-local, etc)
* Implement recursive targets in terms of their local counterparts
* Clarify names of some internal variables
* Move documentation to docs/MakefileGuide.html
* Clean up commentary


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17192 91177308-0d34-0410-b5e6-96231b3b80d8
2004-10-23 20:04:14 +00:00
Reid Spencer
c64b2b350d * Actually ignore build errors in optional directories
* Use LLVM_SRC_ROOT as the anchor for the Target.td file
* Use MFLAGS instead of MAKEFLAGS for recursive makes so we don't try
  to build a target "w" or "s" mysteriously.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17186 91177308-0d34-0410-b5e6-96231b3b80d8
2004-10-23 08:19:37 +00:00
Reid Spencer
e53e397a96 Make sure that we don't set up a circular dependency if OBJDIR == SRCDIR
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17172 91177308-0d34-0410-b5e6-96231b3b80d8
2004-10-22 23:06:30 +00:00
Misha Brukman
8567ccf6d0 Pull in Target.td using absolute path from source root instead of relative path;
this allows us to have sub-targets whose depth in the tree is not the same as it
is for the standard X86/PowerPC/Sparc.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17170 91177308-0d34-0410-b5e6-96231b3b80d8
2004-10-22 22:18:27 +00:00
Reid Spencer
4d71b6611e Shorten the rules, speed it up, correct library contruction, add *.td rules
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17166 91177308-0d34-0410-b5e6-96231b3b80d8
2004-10-22 21:01:56 +00:00
Misha Brukman
5e94a21907 Fix grammar
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16910 91177308-0d34-0410-b5e6-96231b3b80d8
2004-10-11 02:06:40 +00:00
Chris Lattner
6856912f5b Don't add libz or libbz2 to the USEDLIBS lists, those are for LLVM libraries.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16798 91177308-0d34-0410-b5e6-96231b3b80d8
2004-10-07 00:03:11 +00:00
Reid Spencer
37130d2b5e Provide support for auto-detection and use of compression libraries.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16643 91177308-0d34-0410-b5e6-96231b3b80d8
2004-10-04 07:05:07 +00:00
John Criswell
ef672a691c Corrected spelling of Makefile variable, thereby re-enabling profile
builds for projects.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16540 91177308-0d34-0410-b5e6-96231b3b80d8
2004-09-28 14:52:58 +00:00
Reid Spencer
ad9590e12c Missed one $*.a -> $@ conversion for the Release build.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16494 91177308-0d34-0410-b5e6-96231b3b80d8
2004-09-23 06:07:24 +00:00
Reid Spencer
53a4b60a76 Correct the rules for making shared libraries per libtool 1.5.10
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16489 91177308-0d34-0410-b5e6-96231b3b80d8
2004-09-23 00:58:06 +00:00
Reid Spencer
9c96c72b84 libtool's name is now back to mklib.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16423 91177308-0d34-0410-b5e6-96231b3b80d8
2004-09-20 01:43:00 +00:00
John Criswell
fe785bd49d Add dependencies so that project tools are recompiled if LLVM libraries
are updated.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16378 91177308-0d34-0410-b5e6-96231b3b80d8
2004-09-16 14:11:25 +00:00
Brian Gaeke
67f9349175 Use libtool, not mklib (which somehow doesn't get generated anymore)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16243 91177308-0d34-0410-b5e6-96231b3b80d8
2004-09-07 19:03:35 +00:00
Reid Spencer
5f8c6b2546 Add LLVMC as a supported tool.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16183 91177308-0d34-0410-b5e6-96231b3b80d8
2004-09-05 16:39:01 +00:00
Reid Spencer
ec9d780153 Get rid of an un-needed and un-used GCCism. ATTR_DEPRECATED is used nowhere
in the LLVM source base.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16162 91177308-0d34-0410-b5e6-96231b3b80d8
2004-09-03 23:38:25 +00:00
Reid Spencer
05e90a0f64 Remove even the slightest chance of a race condition occurring :)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15951 91177308-0d34-0410-b5e6-96231b3b80d8
2004-08-20 09:32:32 +00:00
Reid Spencer
fc9450855d Added a set of rules for installing configuration files. You can now say
CONFIG_FILES=a b c
in a Makefile and when you "make install" the files a b and c will get
installed into the $prefix/etc directory.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15948 91177308-0d34-0410-b5e6-96231b3b80d8
2004-08-20 09:20:05 +00:00