* Consolidate all "install" usage to the install program/script found by
autoconf which includes the autoconf/install-sh script if necessary
* Change Makefile.rules to not use the -D flag to install but use the
MKDIR command as necessary.
* Change Makefile.rules to differentiate between installation of executable
files and regular data files to get the permission modes correct.
llvm-svn: 20294
* Make it possible to have the Install program run in verbose mode when
the TOOL_VERBOSE=1 option is set
* Ensure non-executable installed files do not install with execute perms.
llvm-svn: 20214
When llvm-gcc is not available, bypass rules for Modules and Bytecode
Libraries that require llvm-gcc and emit instead a warning that llvm-gcc
is not available. This permits "make LLVMGCC=" to build LLVM completely
without error and provides warnings about the modules and bc libs that
could not be constructed.
llvm-svn: 20185
passes the -module option on the libtool command line to ensure that the
shared library being built can be dlopened and dlsym can work on that
module. LOADABLE_MODULE should be sent only in conjunction with the
SHARED_LIBRARY directive. It should generally be used for any module that
is intended to be the target of an LLVM -load option. Note that loadable
modules will not have the lib prefix but otherwise look like shared
libraries. This is per the libtool recommendations and prevents these
special shared libraries from being linked in via -l option to the linker.
llvm-svn: 19454
Reverting the quote patch. For some reason, this breaks the building of
llvm/runtime (the shell doesn't like it for some reason). I might play
with it to see if I can get the quotes done in such a way that the shell
like it, but no promises.
llvm-svn: 19275
exceptions to abort() in cases where it should not.
Many thanks to Duraid Madina for doing the heavy lifting on the analysis
of this problem.
llvm-svn: 19256
* When reconfiguring, make sure the config.cache file is blown away so that
its (old) values don't short-circuit doing the tests. When a reconfigure
is done, it should be done from scratch, without the cache.
* For dist-check, don't pass --with-llvmgccdir any more because configure
doesn't have this option any more.
llvm-svn: 19126
* Cleanup LLVMGCXX and LLVMGCC by providing LLVMGXXWITHPATH and LLVMGCCWITHPATH
variables that add the $(LLVMToolDir) to the path so the CFE tools can find
the right LLVM tools they depend on.
* Standardize the name of a variable: cferuntime_libdir -> CFERuntimeLibDir
llvm-svn: 19095
* Convert "cmp" usage to $(CMP)
* Convert "cp" usage to $(CP)
* Fix some build messages to reflect what's actually going on
* Add a "reconfigure" target for forcing a reconfigure. Helps with testing
things like Chris's recent changes.
llvm-svn: 18991
files that USE the .inc file unless the contents of the .inc file changes.
This should fix the problem where reconfiguring causes all targets to be
completely rebuilt (because config.h is usually modified, causing libsystem
to be rebuilt, causing tblgen to be rebuilt, causing .inc files to be
rebuilt, causing .o files to be rebuilt).
This patch also checks in a gross hack where .o files now explicitly depend
on $(BUILT_SOURCES), to avoid problems where the .inc files are not completely
generated before the .o files start to compile.
llvm-svn: 18986
to BUILD_OBJ_SRC. This will save the config.status and mklib files, then
wipe out the BUILD_OBJ_ROOT, copy back config.status and mklib, and then
run config.status to regenerate the makefiles. This target gives you a
completely clean/fresh BUILD_OBJ_ROOT.
llvm-svn: 18981
specify where the bytecode library is to be installed. This allows the
default location ($prefix/lib) to be overridden, for special case runtime
libraries like the cfe runtime libs.
llvm-svn: 18879
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
* 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
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
* 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
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
* 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
$(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
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
* 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
* 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
* 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
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
* "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
* 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
* 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
* 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
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
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
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
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
This helps to disambiguate when linking begins and when the library/program
is linked and ready to be used.
This is sort of as preference thing, so feel free to modify/revert the change.
llvm-svn: 9687
directory.
Added Makefile.spec to the list of files to copy to the object directory.
Moved the configuration of $SourceDir to Makefile.config and corrected the
conditional that surrounds it. This allows SPEC to reset it and get the correct
VPATH.
llvm-svn: 8475
much cleaner and easier.
Labeled .td as a suffix for tblgen files in Makefile.rules.
Modified build rules so that source files generated during the build are placed
in the build directory and not the source directory (and not in a Debug
directory). This makes the system cleaner and allows us to have a read-only
source tree.
llvm-svn: 8424
Moved Makefile.common to Makefile.rules. This makes project Makefiles easier
to support, and allows for easier overriding of default configuration values
that used to be in Makefile.common.
Modified Makefile.config.in to determine paths for directories (like
LLVM_SRC_ROOT) and to use the pwd binary as opposed to the shell builtin (this
works better for symbolic links).
llvm-svn: 8377
and explicitly declare all the ones we're using for LLVM.
This quickly cancels many of GNU Make's implicit rules and reduces build time.
The only caveat is that any new suffixes may need to be explictly added to
the .SUFFIXES pseudo target.
Removed the -only-static option as it is no longer used.
llvm-svn: 7979
broken by libtoolification anyways, and noone can use it because purify doesn't
support the 64-bit sparc compilers even if it weren't broken!
llvm-svn: 7850
the pre-release 1.1 branch and pre-release 1.1.1).
Made the USE_SPEC option work.
Silenced unnecessary error output from the cmp command when checking for
updates to lex/yacc generated files. This fixes a problem where we get error
messages the first time the file is generated.
Fixed the distclean option. It is now in the Makefile (i.e. only runs in the
top level source directory), removes more files, and plays nicely with
external project Makefiles.
llvm-svn: 7780
The shell AND/OR operators short-circuit on command success/failure, which is
the inverse of exit status (i.e. 0 means success, non-zero means failure).
llvm-svn: 7616
o Not all versions of diff have the -q option
o The cmp program is probably faster than diff
Fixed the logic that only copies the file over if no differences are found.
llvm-svn: 7615
hide the bison command line.
* If running flex or bison gives us the files we already have, don't overwrite
the ones we have, which cause unnecessary compilation. I demand the ability
to make meaningless changes without penalty!
llvm-svn: 7571
do the following:
1) Determine their default values without $HOME
2) Configure the default values as full absolute pathnames.
This should help fix the nightly test builds.
llvm-svn: 6719
of the llvm source directory.
The main modification was to add new environment variables: one set for llvm
entities and another set for source entities current being compiled.
This should make the Makefile more flexible and easier to understand as each
environment variable only does one thing.
llvm-svn: 6679
core.### where ### is the process ID. We use core.[0-9][0-9]* to avoid killing
core.c, core.cpp, and core.h files which may be part of benchmarks.
llvm-svn: 4913
into a Profile/ directory to keep them separate from the Debug/ and
Release/ versions. Also, it turns on ENABLE_OPTIMIZED automatically.
llvm-svn: 3854
fragments. This is gross, but having tons of confusing conditionals all
throughout the build system seems worst.
Credits got to Casey Carter for the idea.
llvm-svn: 3705
flags are always the same anyway, who wants to see so much text on the
screen? Compiling with "gmake VERBOSE=1" should produce all the output
you're used to.
Basically it checks for VERBOSE being defined, and if it is, sets VERB
appropriately. VERB is then prepended in a bunch of key places such that
when VERB is "@", the command is not echoed, when VERB is not set to
anything, it's as before.
One thing I could not get rid of is "gmake[1]: Entering directory <blah>",
but running "gmake -s" suppresses it all, and shows just the interesting
stuff.
Now output (when running "gmake -s" will look something like):
<snip>
======= Linking target debug library =======
Compiling Writer.cpp
Compiling getLLVMinfo.cpp
Compiling as.cpp
Compiling dis.cpp
Compiling opt.cpp
Compiling gccas.cpp
<snip>
llvm-svn: 3686
- Now build executables into /shared
- New BUILD_ROOT_TOP variable which is basically = $(BUILD_ROOT)/$(LEVEL) but
cleaner and works for llvm/test/*
- Use := more in Makefile.common
llvm-svn: 3291
* Only build tags for include, lib, and tools, not tests
* Turn on verbose output from bison to get information about shift/reduce
conficts (why isn't this the default??)
llvm-svn: 2603
just have to run: make ENABLE_PURIFY=1
* Add command to the link line that makes the broken GCC 3.0 compiler work
without affecting 2.95.3
llvm-svn: 2116
using a variable to get the list of libraries on the link path.
BUG: If the library in the same directory as the executable is missing,
BUG: gnumake will build the library but then fail when linking the executable
BUG: saying the library was not found. Need a better hack.
llvm-svn: 225