Commit Graph

308 Commits

Author SHA1 Message Date
Reid Spencer 72bf78d9f5 Always remove bytecode archives so that path mismatches don't cause the
contents to not be updated.

llvm-svn: 18872
2004-12-13 03:56:42 +00:00
Reid Spencer 993b95e796 Fix output for Flexing to not print full path of source.
llvm-svn: 18769
2004-12-10 19:44:16 +00:00
Reid Spencer 4e197480e1 Implement the LLVM_DO_NOT_BUILD feature. If a file of that name is
present in a directory that LLVM normally builds, it will skip building
the directory entirely. This is useful for allowing a bunch of projects to
live in the source tree but not be compiled from time to time.

llvm-svn: 18671
2004-12-08 22:58:34 +00:00
Reid Spencer cd7d6cf6a6 Remove -Woverloaded-virtual usage that was committed by accident.
llvm-svn: 18615
2004-12-08 04:34:51 +00:00
Reid Spencer cc52c2ce8a Remove variables that are not used by any of the LLVM makefiles
llvm-svn: 18614
2004-12-08 04:26:23 +00:00
Reid Spencer 8b5ebe561e Add the check target so all projects can have this
functionality.

llvm-svn: 18566
2004-12-06 05:35:13 +00:00
Reid Spencer 6d6503a9b3 Provide a variable to compute where the libstdc++.a is
llvm-svn: 18544
2004-12-05 19:14:19 +00:00
Reid Spencer d78077dd13 Add ability to make a single bytecode module from others
llvm-svn: 18523
2004-12-05 05:17:22 +00:00
Reid Spencer 81546587d5 Getting dist-check to work:\
* Implement the FAKE_SOURCES feature for GCCLibraries/crtend \
* Search for distribution files >first< in srcdir and >second< in objdir \
* Make dist-hook only run in top level directory. \
* Make dist-check run correctly in parallel builds \
* Wrap lines to 80 cols \
* Standardize variable names

llvm-svn: 18504
2004-12-04 22:34:09 +00:00
Chris Lattner 1701409c9a Remove all recursive check support from Makefile.rules
llvm-svn: 18470
2004-12-03 23:56:41 +00:00
Chris Lattner 661a714d2c 'make check' at the top level shouldn't recurse through the sourcedirs
llvm-svn: 18463
2004-12-03 21:05:57 +00:00
Reid Spencer d4bd375d37 Resurrect the install-bytecode target for installing just the bytecode
libraries to the CFE.

llvm-svn: 18462
2004-12-03 20:08:48 +00:00
Reid Spencer 2b1b83a520 Pass -strip-debug to gccas when bytecode libraries are being built.
llvm-svn: 18452
2004-12-03 06:04:35 +00:00
Chris Lattner e3d98f1fd8 Quiet!
llvm-svn: 18437
2004-12-02 21:23:43 +00:00
Reid Spencer 32f7e42744 For PR466:
Change construction of bytecode libraries from producing a single bytecode
file to producing a library containing bytecode files. This gets around the
problem of multiple symbol definitions in the linker if something like
-lc -lc is attempted on the command line. Previously this happened because
the linker would find libc.bc as a "library". It will now find libc.a which
it can simply search for missing symbols instead of linking in wholesale.

llvm-svn: 18425
2004-12-02 09:28:21 +00:00
Chris Lattner 0ea40c935f Make built bytecode libraries depend on gccas/gccld as appropriate. This
should fix the stale runtime libraries problem.

llvm-svn: 18361
2004-11-29 19:47:58 +00:00
Reid Spencer 50f3487fad Allow reconfig from any directory, not just the top build directory, by
changing directory first. Also make sure that we don't attempt to run
config.status if the recheck didn't work.

llvm-svn: 18351
2004-11-29 12:37:44 +00:00
Reid Spencer af4495a8c4 Incorporate tools/Makefile.JIT
llvm-svn: 18332
2004-11-29 07:17:07 +00:00
Reid Spencer fc66af4476 * Allow date command to be printed in verbose mode
* Get rid of appending -lbz2 and -lz to ExtraLibs now that we don't need
  them any more.
* Fix the dist-check target so that EXTRA_DIST can be defined AFTER the
  include of Makefile.common. This is needed because Makefile.common
  provides variable definitions that may need to be used in computing the
  value of EXTRA_DIST.
* Clean up some "distdir" target output.

llvm-svn: 18329
2004-11-29 05:00:33 +00:00
Reid Spencer 39d6a6116a Allow configuration files to be themselves configured and found in the
OBJ dir instead of only in the SRC dir.

llvm-svn: 18143
2004-11-23 05:59:53 +00:00
Reid Spencer 0dbf101c90 Duh, put tools in *bin* directory, not *tools* directory as per
PR456.

llvm-svn: 17964
2004-11-18 20:04:39 +00:00
Reid Spencer 7e9e0b0c82 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.

llvm-svn: 17953
2004-11-18 10:03:46 +00:00
Reid Spencer 91234ff57a 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.

llvm-svn: 17920
2004-11-17 19:08:44 +00:00
Reid Spencer ec7a80bad2 Add a command for using llvm-ar correctly.
llvm-svn: 17753
2004-11-14 21:46:55 +00:00
Reid Spencer aee67e6547 * 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.

llvm-svn: 17688
2004-11-12 02:27:36 +00:00
Reid Spencer f8b4a8e988 Implement and document the TOOL_VERBOSE option that asks each tool invoked
to be verbose about its actions too.

llvm-svn: 17624
2004-11-08 17:32:12 +00:00
Reid Spencer 651dd3ad5a * 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.

llvm-svn: 17433
2004-11-02 16:56:15 +00:00
Reid Spencer 9d0c1e0de6 * New Recursive Target: clean-all
llvm-svn: 17432
2004-11-02 16:36:03 +00:00
Reid Spencer b5b92fbaf6 Eliminate redundant variable definition. Rename Configuration -> BuildMode
Make lex/yacc output cleaned only if in a directory that has those sources.

llvm-svn: 17391
2004-11-01 07:50:27 +00:00
Chris Lattner 615e7fbcf3 When compiling a file, indicate what build it is for
llvm-svn: 17388
2004-11-01 06:14:59 +00:00
Reid Spencer 737424ced3 Get the shared library extension right on all platforms, regardless of what
Chris wants on his platform.

llvm-svn: 17379
2004-10-31 22:53:06 +00:00
Reid Spencer 68172d44c2 Fix output for building shared libraries per Chris' requirements
llvm-svn: 17376
2004-10-31 21:07:34 +00:00
Reid Spencer 991f66abc1 Actually use the correct variable name for building bytecode files.
llvm-svn: 17374
2004-10-31 18:52:15 +00:00
Reid Spencer f88808ae43 Internalize variable names to prevent recursive assignment. Cleanup docs.
llvm-svn: 17359
2004-10-30 09:19:36 +00:00
Reid Spencer bd44bbdc0e 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.

llvm-svn: 17348
2004-10-29 22:14:56 +00:00
Reid Spencer da86a3778a Make the list of automatic Makefile* files updated explicit instead of
generally wildcarded.

llvm-svn: 17334
2004-10-29 04:47:33 +00:00
Chris Lattner 124ea873ca This line breaks FreeBSD and apparently isn't useful anymore.
llvm-svn: 17332
2004-10-29 03:46:38 +00:00
Reid Spencer 9c7bfc96e0 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)

llvm-svn: 17318
2004-10-28 09:15:28 +00:00
Reid Spencer be6a4e9b7f Make parallel "install" and "uninstall" targets not step on itself.
llvm-svn: 17315
2004-10-28 07:57:28 +00:00
Reid Spencer b7f710ae7b 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.

llvm-svn: 17288
2004-10-28 00:41:43 +00:00
Reid Spencer c8c272ffb1 Fix auto-reconfigure bug: make sure we actually reconfigure not just
regenerate the config.status script.

llvm-svn: 17283
2004-10-27 22:48:58 +00:00
Reid Spencer 94105c7b19 Get the *.inc files to depend on tblgen so if tblgen gets fixed, all the
*.inc files get regenerated.

llvm-svn: 17273
2004-10-27 04:34:35 +00:00
Reid Spencer d94bb33911 Make sure that Makefile.rules and Makefile.config.in are not candidates for
automatic makefile update.

llvm-svn: 17269
2004-10-26 23:10:00 +00:00
Reid Spencer 77a46d25a5 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

llvm-svn: 17268
2004-10-26 22:26:33 +00:00
Chris Lattner e43c9c2db2 Unless someone seriously objects, I don't think we really need this. Sorry
resistor :(

llvm-svn: 17265
2004-10-26 20:02:50 +00:00
Reid Spencer 8da1b5df59 * 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.

llvm-svn: 17250
2004-10-26 07:09:33 +00:00
Chris Lattner a47b641a85 Give a useful hint
llvm-svn: 17232
2004-10-26 02:58:10 +00:00
Reid Spencer 100080cc38 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.

llvm-svn: 17210
2004-10-25 08:27:37 +00:00
Reid Spencer dcba778871 Fix uninstall from rebuilding everything (wrong dependency)
llvm-svn: 17204
2004-10-24 08:21:04 +00:00
Reid Spencer 12a3a0553d 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

llvm-svn: 17202
2004-10-24 07:53:21 +00:00
Reid Spencer e057811423 Make the $(OBJDIR) go away on clean-local.
llvm-svn: 17197
2004-10-24 02:26:09 +00:00
Reid Spencer 81cd049e8c 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

llvm-svn: 17192
2004-10-23 20:04:14 +00:00
Reid Spencer 282e13c942 * 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.

llvm-svn: 17186
2004-10-23 08:19:37 +00:00
Reid Spencer 23a703706c Make sure that we don't set up a circular dependency if OBJDIR == SRCDIR
llvm-svn: 17172
2004-10-22 23:06:30 +00:00
Misha Brukman 0de42869bf 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.

llvm-svn: 17170
2004-10-22 22:18:27 +00:00
Reid Spencer f206bd761f Shorten the rules, speed it up, correct library contruction, add *.td rules
llvm-svn: 17166
2004-10-22 21:01:56 +00:00
Misha Brukman 8c8cbb8b71 Fix grammar
llvm-svn: 16910
2004-10-11 02:06:40 +00:00
Chris Lattner fc303099c9 Don't add libz or libbz2 to the USEDLIBS lists, those are for LLVM libraries.
llvm-svn: 16798
2004-10-07 00:03:11 +00:00
Reid Spencer 4e181e731a Provide support for auto-detection and use of compression libraries.
llvm-svn: 16643
2004-10-04 07:05:07 +00:00
John Criswell 68146eb40a Corrected spelling of Makefile variable, thereby re-enabling profile
builds for projects.

llvm-svn: 16540
2004-09-28 14:52:58 +00:00
Reid Spencer 898eca3260 Missed one $*.a -> $@ conversion for the Release build.
llvm-svn: 16494
2004-09-23 06:07:24 +00:00
Reid Spencer ef18cc48db Correct the rules for making shared libraries per libtool 1.5.10
llvm-svn: 16489
2004-09-23 00:58:06 +00:00
Reid Spencer 3f2f555690 libtool's name is now back to mklib.
llvm-svn: 16423
2004-09-20 01:43:00 +00:00
John Criswell 30a0c10269 Add dependencies so that project tools are recompiled if LLVM libraries
are updated.

llvm-svn: 16378
2004-09-16 14:11:25 +00:00
Brian Gaeke 52a4e667e8 Use libtool, not mklib (which somehow doesn't get generated anymore)
llvm-svn: 16243
2004-09-07 19:03:35 +00:00
Reid Spencer 7650c06a45 Add LLVMC as a supported tool.
llvm-svn: 16183
2004-09-05 16:39:01 +00:00
Reid Spencer b9c90a2b02 Get rid of an un-needed and un-used GCCism. ATTR_DEPRECATED is used nowhere
in the LLVM source base.

llvm-svn: 16162
2004-09-03 23:38:25 +00:00
Reid Spencer 6f7407880f Remove even the slightest chance of a race condition occurring :)
llvm-svn: 15951
2004-08-20 09:32:32 +00:00
Reid Spencer cc51e7b358 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.

llvm-svn: 15948
2004-08-20 09:20:05 +00:00
Misha Brukman 53bba06e37 * Uncomment rule for location of LLI (formerly commented out: typo?)
* Add space between VAR and `='

llvm-svn: 15074
2004-07-21 12:47:40 +00:00
Brian Gaeke e2e0637a77 Move LLVM tool definitions to Makefile.rules
llvm-svn: 15049
2004-07-21 01:31:47 +00:00
Chris Lattner 9ab4d88ab6 Really, it is not necessary to recompile all files in a profile build every
time!

llvm-svn: 14680
2004-07-08 03:42:20 +00:00
Brian Gaeke 223b345279 Explicitly specify libtool tag "CXX" so that if you setenv CXX to something
libtool can't parse, e.g., "/path/to/g++ -some-funny-options",
then it will still be able to compile and link.

llvm-svn: 14072
2004-06-08 18:52:45 +00:00
Chris Lattner 4f120545a7 Make tool names end with .exe on windows. This isn't needed to run the
tools, but is required for rules that depend on the executables, e.g.:

a: b $(LLVMAS)
llvm-svn: 13926
2004-06-01 19:06:43 +00:00
Misha Brukman 144c77b515 Pass the Makefile flags to recursive makes in {PARALLEL,OPTIONAL}_DIRS targets.
llvm-svn: 13623
2004-05-21 23:21:11 +00:00
Misha Brukman 3e810058a7 Pass given flags on to recursive sub-makes.
llvm-svn: 13616
2004-05-21 00:09:21 +00:00
Alkis Evlogimenos e716bafbc8 Change DEPRECATED macro to ATTR_DEPRECATED as this conflicts with some
java constants.

llvm-svn: 13611
2004-05-20 21:31:43 +00:00
Misha Brukman 7426c893f0 Standardize header comments of top-level Makefiles.
llvm-svn: 13143
2004-04-24 00:10:56 +00:00
Brian Gaeke 0f31060c5a Add support for 'install-bytecode' target, used for ONLY installing
bytecode-libs.

llvm-svn: 12268
2004-03-10 17:38:01 +00:00
Alkis Evlogimenos 1aa50dfae5 Define DEPRECATED so that it can be used in function and variable
declarations.

llvm-svn: 11391
2004-02-13 20:05:44 +00:00
Brian Gaeke 12705d56ef Fix bug in installation process: MKDIR must respect DESTDIR.
llvm-svn: 11236
2004-02-09 17:38:52 +00:00
Brian Gaeke fe66239860 Always replace instead of appending when creating archive files. It may be
slightly slower, but I think we can handle it, especially if it means
BytecodeLibs are correctly regenerated.

llvm-svn: 11122
2004-02-04 21:41:23 +00:00
Brian Gaeke ecc92bfe6e Move bytecode_libdir def'n to Makefile.config.in from Makefile.rules, so it
lives near the other installation dirs (like libdir, bindir, etc.).

Move the rule for making bytecode_libdir out of the ifdef LIBRARYNAME...endif.

llvm-svn: 10964
2004-01-22 22:53:48 +00:00
Brian Gaeke 83d485cfed Move support for building tags database from Makefile.rules to Makefile, because
it's only used in the top-level directory.

llvm-svn: 10960
2004-01-22 21:54:51 +00:00
Brian Gaeke 96deb7dd86 Give the ".../llvm-gcc/bytecode-libs" directory a variable of its own,
called bytecode_libdir.  Make install-bytecode-library depend on
the existence of that directory, and add a rule for creating it if
it does not exist by calling mkinstalldirs.

llvm-svn: 10946
2004-01-21 23:57:21 +00:00
Brian Gaeke ec2a01f5fd Add DESTDIR support for installation, to support RPM etc.
llvm-svn: 10940
2004-01-21 21:20:44 +00:00
Brian Gaeke 6cbf285b37 Maybe Misha isn't so buggy after all. He caught the rest of my huge thinko
w.r.t. SHLIBEXT starting with a dot.

:-)

llvm-svn: 10939
2004-01-21 21:17:37 +00:00
Brian Gaeke e00d637c15 Remember, SHLIBEXT begins with a period.
llvm-svn: 10936
2004-01-21 19:59:19 +00:00
Brian Gaeke 8625f68ca5 Modified version of patch from mkahl@apple.com to stop hardcoding ".so".
llvm-svn: 10935
2004-01-21 19:53:11 +00:00
Brian Gaeke eac97bf984 Take settings of LCC and LCC1XX from configure.
llvm-svn: 10899
2004-01-16 21:31:20 +00:00
Brian Gaeke 6fb3da0c1b I'm fairly certain this was just a typo.
llvm-svn: 10897
2004-01-16 21:12:34 +00:00
John Criswell 1b921c486e Allow C++ programs to end in .cc. This allows C++ test programs in the
test suite to compile.

llvm-svn: 10644
2003-12-29 22:02:12 +00:00
Brian Gaeke bbe0f1d795 Add install target for libraries.
llvm-svn: 10519
2003-12-18 20:57:48 +00:00
Brian Gaeke 0f148bcbc0 Add support for installing tool executables.
llvm-svn: 10351
2003-12-10 00:26:28 +00:00
Chris Lattner dca8b84bde Stop using the -fshort-enum compile option
llvm-svn: 10296
2003-12-06 20:59:45 +00:00
Chris Lattner e0da6ec8b6 Make stripped-bytecode a recursive target
llvm-svn: 10283
2003-12-01 07:28:25 +00:00
Chris Lattner fe8f8b4947 Simplify some rules
Move LGCCLDPROG from test/Makefile.tests

llvm-svn: 10256
2003-11-29 09:50:15 +00:00
John Criswell 6df35dd70d All directory targets now install the Makefile only if it is missing.
Directory targets no longer check for existance of the directory in the
object tree; if the Makefile doesn't exist, we will re-create the directory.
This seems to be a pretty good assumption and saves us from checking
directory existance each time.

llvm-svn: 10211
2003-11-25 19:32:22 +00:00
John Criswell e8eab29899 Added a pseudo-hack: The Makefile now copies Makefiles from source tree to
object tree if it is missing.  This means that new Makefiles should get
picked up automagically, requiring less bothersome re-configuring after
updates.

llvm-svn: 10209
2003-11-25 17:49:22 +00:00
John Criswell b1367f4af7 Modified directory building rules so that using the cd program/alias is
not necessary.

llvm-svn: 10199
2003-11-24 18:31:01 +00:00