aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* build: add an all-installable target that builds the targets to install.Diego Elio Pettenò2011-04-081-1/+3
| | | | | This is useful for distributions that don't want to build content that won't be installed.
* build: don't override CFLAGS in environment.Diego Elio Pettenò2011-04-081-1/+1
| | | | | | This allows proper setting of flags by having them in the environment, rather than overriding them on the make command line (which would then also drop the required flags for building sparse.
* build: allow easy override of GCC_BASEDiego Elio Pettenò2011-04-081-1/+2
| | | | | | Sometimes gcc reports the wrong path for its own base (for instance when ICC is present in the same system); by allowing an override of GCC_BASE in Makefile, it's easier for packages to fix this up.
* sparse 0.4.3 finialv0.4.3Christopher Li2010-09-021-1/+1
| | | | Signed-off-by: Christopher Li <sparse@chrisli.org>
* inspect: Add test-inspect programChristopher Li2010-07-131-3/+14
| | | | | | | The test program will launch a gtk treeview windows to display the symbol node in the AST. Signed-Off-By: Christopher Li <sparse@chrisli.org>
* Makefile: fix permissions mixup on installDan McGee2010-03-281-7/+12
| | | | | | | | `install` by default uses 755 permissions; for everything but executables we want to use 644 permissions. Signed-off-by: Dan McGee <dan@archlinux.org> Signed-off-by: Christopher Li <sparse@chrisli.org>
* Simplify Makefile using static pattern rulesChristopher Li2010-03-281-8/+3
| | | | | | | I find a way to get rid of the macro and $$ in linking executable program. Signed-off-by: Christopher Li <sparse@chrisli.org>
* Sparse 0.4.2Christopher Li2009-10-111-2/+2
| | | | Signed-off-by: Christopher Li <sparse@chrisli.org>
* Makefile: suppress error message from pkg-configRamsay Jones2009-07-201-1/+1
| | | | | | | | | | | | In particular, on systems which do not have 'pkg-config' installed, every invocation of make issues the following message: /bin/sh: pkg-config: command not found Suppress the message by redirecting stderr to the bit-bucket. Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk> Signed-off-by: Christopher Li <sparse@chrisli.org>
* Have Makefile import local.mk if it exists.Samuel Bronson2009-07-181-2/+8
| | | | | | | | This will allow users to override build settings without dirtying their trees, making life with `git stash' a bit easier. Signed-off-by: Samuel Bronson <naesten@gmail.com> Signed-off-by: Christopher Li <sparse@chrisli.org>
* Clean up Makefile long linesChristopher Li2008-12-281-14/+17
| | | | Signed-Off-By: Christopher Li<sparse@chrisli.org>
* Makefile automatic header dependencyChristopher Li2008-12-281-77/+21
| | | | | | | | | | | It use the gcc generated dependency file to track header file changes. Use pattern rules to build programes. Makefile is much shorter now. Easier to add new objs or new programs. Signed-Off-By: Christopher Li<sparse@chrisli.org>
* Set gcc include path at runtime.Alexey Zaytsev2008-12-181-4/+3
| | | | | | | | | | | You can now tell sparse where to look for the compiler headers with -gcc-base-dir <dir>. Otherwise sparse will look for headers used to build it. Also adds $GCC_BASE/include-fixed used by newer gcc versions. Signed-off-by: Alexey zaytsev <alexey.zaytsev@gmail.com>
* Gdb macros to get a better look at some sparse data structures.Alexey Zaytsev2008-12-181-9/+11
| | | | | | | Note that we need to build sparse with -g3 -gdwarf-2 to get the cpp macros included into the debug ingo. Signed-off-by: Alexey Zaytsev <alexey.zaytsev@gmail.com>
* Makefile: VERSION=0.4.1Josh Triplett2007-11-131-1/+1
| | | | Signed-off-by: Josh Triplett <josh@freedesktop.org>
* fix install perms of manpagesMike Frysinger2007-09-191-1/+1
| | | | | | | the install step for manpages currently does not use the -m option which means perms default to 755 which makes no sense for man pages Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* Makefile: VERSION=0.4Josh Triplett2007-09-151-1/+1
| | | | Signed-off-by: Josh Triplett <josh@freedesktop.org>
* Add a manpage for cgccJosh Triplett2007-09-151-1/+1
| | | | Signed-off-by: Josh Triplett <josh@freedesktop.org>
* Makefile: Use ?= to allow overriding OS or AR on the Make command lineJosh Triplett2007-09-151-2/+2
| | | | Signed-off-by: Josh Triplett <josh@freedesktop.org>
* Use -fno-strict-aliasing, as the ptrlist code seems to violate C99 strict ↵Josh Triplett2007-09-061-1/+1
| | | | | | aliasing rules Signed-off-by: Josh Triplett <josh@freedesktop.org>
* Install the Sparse manpageJosh Triplett2007-08-311-0/+7
| | | | Signed-off-by: Josh Triplett <josh@freedesktop.org>
* libxml compile fix on CygwinKovarththanan Rajaratnam2007-08-091-1/+1
| | | | | | | | | Hello, I needed to re-arrange the libxml-2.0 library order to make sparse compile on Cygwin. Patch attached. Signed-off-by: Kovarththanan Rajaratnam <krj@rajaratnam.dk>
* Makefile: improve flag handlingMike Frysinger2007-08-041-4/+5
| | | | | | | Tweak the makefile so that it respects CFLAGS set in the environment and it makes sure to link the shared libsparse with $(LDFLAGS). Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* Drop -fpic; it hurts performance and we don't build libsparse.so by defaultJosh Triplett2007-07-301-1/+7
| | | | | | | | | | | | Sparse doesn't have a stable shared library interface, and doesn't build libsparse.so by default. However, it used -fpic, which incurred a noticeable performance hit. Remove -fpic from the default CFLAGS, and add a comment near the definition of LIBS about adding it back if building a shared library. You probably want to build Sparse twice if you want a shared library: once without -fpic to build the Sparse tools, and again with -fpic to build the shared library. Signed-off-by: Josh Triplett <josh@freedesktop.org>
* Add some missing dependencies in the MakefileJosh Triplett2007-07-301-0/+2
| | | | | | | | | | ptrlist.o didn't depend on $(LIB_H); in particular, it didn't depend on compat.h, which manifested in "bad allocation size" errors when changing the chunk size in compat.h and running "make" without "make clean". test-unssa.o also didn't depend on $(LIB_H). Signed-off-by: Josh Triplett <josh@freedesktop.org>
* Makefile: Use -O2 -finline-functions, not just -OJosh Triplett2007-07-291-1/+1
| | | | | | | | This makes debugging more difficult by default, but as usual, developers can change CFLAGS if they want to use a debugger; the default CFLAGS should cater to users. Signed-off-by: Josh Triplett <josh@freedesktop.org>
* Makefile: stop cleaning files we didn't make and have no business cleaningJosh Triplett2007-07-221-1/+1
| | | | Signed-off-by: Josh Triplett <josh@freedesktop.org>
* Fix test-suite to handle stdout and stderr separately, and fix up testsJosh Triplett2007-07-221-2/+7
| | | | | | | | | | | | | test-suite merged stdout and stderr, which relied on the ordering of data from the two streams in the merged stream. This made test-suite frequently fail on tests with both output and errors, when the ordering didn't happen to match what the test assumed. Handle each of the streams separately, and update the tests accordingly. Also clean up the output of "test-suite format" to avoid outputting values equal to the defaults. Signed-off-by: Josh Triplett <josh@freedesktop.org>
* Split c2xml build rule into compile and link stages, and add the quiet prefixesJosh Triplett2007-07-141-5/+5
| | | | Signed-off-by: Josh Triplett <josh@freedesktop.org>
* add c2xml programRob Taylor2007-07-131-0/+15
| | | | | | | | | Adds new c2xml program which dumps out the parse tree for a given file as well-formed xml. A DTD for the format is included as parse.dtd. Signed-off-by: Rob Taylor <rob.taylor@codethink.co.uk> [Josh: DTD fixes] Signed-off-by: Josh Triplett <josh@freedesktop.org>
* Make clean depend on clean-checkJosh Triplett2007-07-081-1/+1
| | | | Signed-off-by: Josh Triplett <josh@freedesktop.org>
* test-suite: a tiny test automation scriptDamien Lespiau2007-07-081-0/+7
| | | | | | | | | This patch introduces test-suite, a simple script that makes test cases verification easier. Test cases in the validation directory are annotated and this script parses them to check if the actual result is the one expected by the test writer. Signed-off-by: Damien Lespiau <damien.lespiau@gmail.com>
* Makefile prettyprinting: make INSTALL and other output line up correctlyJosh Triplett2007-06-011-4/+4
| | | | Signed-off-by: Josh Triplett <josh@freedesktop.org>
* Change "LD" to "LINK" in Makefile prettyprinting.Josh Triplett2007-06-011-14/+14
| | | | Signed-off-by: Josh Triplett <josh@freedesktop.org>
* Remove extra space.Josh Triplett2007-05-221-1/+1
| | | | Signed-off-by: Josh Triplett <josh@freedesktop.org>
* Beautify all & install Makefile targetsDamien Lespiau2007-05-221-27/+43
| | | | | | | | Beautify make's output like kbuild or git. The install target is especially much more readable. make V=1 (install) to get back to the old behaviour. Signed-off-by: Damien Lespiau <damien.lespiau@gmail.com>
* Add a "make dist" that requires $(VERSION) to match `git describe`Josh Triplett2007-05-011-0/+7
| | | | Signed-off-by: Josh Triplett <josh@freedesktop.org>
* Remove old version note.Josh Triplett2007-05-011-3/+0
| | | | Signed-off-by: Josh Triplett <josh@freedesktop.org>
* Fix the version numberJosh Triplett2007-05-011-1/+1
| | | | Signed-off-by: Josh Triplett <josh@freedesktop.org>
* Move pkg-config file to lib, rather than shareJosh Triplett2007-02-271-1/+1
| | | | | Thanks to Jeff Garzik for pointing this out. Signed-off-by: Josh Triplett <josh@freedesktop.org>
* Sparse-based Ctags implementationChristopher Li2007-01-161-1/+6
| | | | | | | | | | | | | Here is my attempt to write a Ctags base on sparse. It depends on the result from actually preprocessing the C source file. It can handle the tags from macro expansion. It works well enough for me to locate "int32_t" and "clear_token_alloc". This is the updated ctags that actually generates output to a tags file. Signed-Off-By: Christopher Li <sparse@chrisli.org> Signed-Off-By: Josh Triplett <josh@freedesktop.org>
* Remove old SCCS target from Makefile.Josh Triplett2006-12-051-2/+0
| | | | Signed-off-by: Josh Triplett <josh@freedesktop.org>
* Generate and install a pkg-config file. Add DESTDIR support to Makefile.Josh Triplett2006-12-051-10/+19
| | | | | | | | | | | | | | | | The Makefile now generates and installs a pkg-config file, sparse.pc, to provide information about the installed Sparse library and header files. Use `pkg-config --cflags sparse` to get the include path, and `pkg-config --libs sparse` to get the library path and library. To help packagers of Sparse, also add support for the DESTDIR variable to the Makefile. DESTDIR allows you to target a particular prefix (such as /usr), but install to another directory (such as debian/tmp), usually for the purposes of subsequently constructing a package from that directory. Previously, just setting PREFIX would work for that, but with the new pkg-config file, the Makefile needs to know the real prefix. Signed-off-by: Josh Triplett <josh@freedesktop.org>
* Install static library and header filesJosh Triplett2006-12-051-20/+17
| | | | | | | | | | | | | Modify Makefile to install the static library and all of the library header files. Add dissect.h to LIB_H. Remove redundant headers from dependency lines. Remove rpath suggestion. The header files get installed to a "sparse" subdirectory of the include directory; please reference the sparse headers as sparse/${HEADER}.h. The various sparse test programs can all now compile successfully outside the sparse tree, given that modification to their #include lines. Signed-off-by: Josh Triplett <josh@freedesktop.org>
* Rename "check.c" to "sparse.c" to match program name; update .gitignoreJosh Triplett2006-12-041-2/+2
| | | | Signed-off-by: Josh Triplett <josh@freedesktop.org>
* Stop building and installing libsparse.soJosh Triplett2006-11-061-3/+3
| | | | | | | | | Since none of the header files get installed, making it difficult or impossible for anything external to use libsparse.so, and libsparse.so doesn't provide a stable API/ABI or a SONAME, and the backends all build with the static libsparse.a, stop building and installing libsparse.so. Signed-off-by: Josh Triplett <josh@freedesktop.org>
* Install cgcc on "make install", refactor installation codePavel Roskin2006-11-061-2/+5
| | | | | Signed-off-by: Pavel Roskin <proski@gnu.org> Signed-off-by: Josh Triplett <josh@freedesktop.org>
* Compile sparse executable under it's own name, not as "check"Pavel Roskin2006-11-061-8/+3
| | | | | | | | No need to confuse everyone. Besides, it allows to use "make check" for some something meaningful in the future. Signed-off-by: Pavel Roskin <proski@gnu.org> Signed-off-by: Josh Triplett <josh@freedesktop.org>
* [PATCH] Add backend to graph basic blocksJosh Triplett2006-08-291-1/+5
| | | | | | | | | | Add a new backend program which parses the input files, processes them through the linearization pass, and outputs a graphviz graph of the resulting basic blocks. Each entrypoint gets labelled by name, but for now the basic blocks just get labelled with the address of the basic_block structure. Signed-off-by: Josh Triplett <josh@freedesktop.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* [PATCH] Use $(BINDIR) consistently in Makefile rather than $(PREFIX)/binJosh Triplett2006-08-291-3/+3
| | | | | | | | | | The Makefile has variables for both PREFIX (default $(HOME)) and BINDIR (default $(PREFIX)/bin); however, it then uses $(PREFIX)/bin in several other places, making it difficult to install to an alternate BINDIR. Fix this by using $(BINDIR) consistently throughout the Makefile. Signed-off-by: Josh Triplett <josh@freedesktop.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>