git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH] Support SPARSE in Makefile, better SPARSE_FLAGS

From
PRPavel Roskin <proski@gnu.org>
Date
Sep 29, 2005, 20:46 UTC
Message-ID
<1128026765.24397.46.camel@dv>
Support SPARSE in Makefile, better SPARSE_FLAGS

This patch makes it possible to use some other program instead of sparse (e.g. a wrapper around sparse). It also provides a better default for SPARSE_FLAGS. __BIG_ENDIAN__ should not be needed.

Signed-off-by: Pavel Roskin <proski@gnu.org>
diff --git a/Makefile b/Makefile
--- a/Makefile
+++ b/Makefile
@@ -66,8 +66,9 @@ INSTALL = install
 RPMBUILD = rpmbuild
 
 # sparse is architecture-neutral, which means that we need to tell it
-# explicitly what architecture to check for. Fix this up for yours..
-SPARSE_FLAGS = -D__BIG_ENDIAN__ -D__powerpc__
+# explicitly what architecture to check for.
+SPARSE = sparse
+SPARSE_FLAGS = -D__$(shell uname -i)__
 
 
 
@@ -335,7 +336,7 @@ test-delta: test-delta.c diff-delta.o pa
 	$(CC) $(ALL_CFLAGS) -o $@ $^
 
 check:
-	for i in *.c; do sparse $(ALL_CFLAGS) $(SPARSE_FLAGS) $$i; done
+	for i in *.c; do $(SPARSE) $(ALL_CFLAGS) $(SPARSE_FLAGS) $$i; done
 
 
 
-- 
Regards,
Pavel Roskin
Next: Junio C Hamano
Message 1 of 7 in “Support SPARSE in Makefile, better SPARSE_FLAGS”
  1. Support SPARSE in Makefile, better SPARSE_FLAGSPavel Roskin, Sep 29, 2005
  2. Junio C HamanoSep 30, 2005
  3. Pavel RoskinSep 30, 2005
  4. H. Peter AnvinSep 30, 2005
  5. Pavel RoskinSep 30, 2005
  6. H. Peter AnvinSep 30, 2005
  7. Pavel RoskinOct 1, 2005

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.