Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
Comment: | Build tweak: if it finds sqlite3.{c,h} in the top dir then it uses those, else it links to whatever -lsqlite3 finds. |
---|---|
Downloads: | Tarball | ZIP archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA1: |
1543d17d3b089988095a010f5ed5d11e |
User & Date: | stephan 2013-08-18 21:44:04.951 |
Context
2013-08-18
| ||
22:02 | Fixed a wrong int type (signed vs unsigned). check-in: 9bb338c980 user: stephan tags: trunk | |
21:44 | Build tweak: if it finds sqlite3.{c,h} in the top dir then it uses those, else it links to whatever -lsqlite3 finds. check-in: 1543d17d3b user: stephan tags: trunk | |
20:59 | deps fixes - they were broken when the obj files were moved from src/ to obj/, leading to only partial rebuilds and much grief as struct sizes changed. check-in: 2c46a68d59 user: stephan tags: trunk | |
Changes
Changes to Makefile.in.
1 2 3 4 5 | #!/usr/bin/make # help out emacs # # Top-level autosetup-filtered Makefile for libfossil. This particular # build is for Unix platforms with GNU Make 3.81+. all: | | | | > | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | #!/usr/bin/make # help out emacs # # Top-level autosetup-filtered Makefile for libfossil. This particular # build is for Unix platforms with GNU Make 3.81+. all: include config.make ShakeNMake.CISH_SOURCES := $(wildcard *.c) $(wildcard $(SRC.DIR)/*.c) # Subdir cleanup rules and deps list must come before shakenmake.make is included. clean: clean-th1ish distclean: distclean-th1ish include shakenmake.make include sqlite3.make AUTOCONFIG_H := @srcdir@/include/fossil-scm/autoconfig.h #SRCDIR := @top_srcdir@/src SRCDIR := @srcdir@/src FSL.SRC.BASENAMES := \ fsl.c \ fsl_appendf.c \ |
︙ | ︙ | |||
41 42 43 44 45 46 47 48 49 50 51 52 53 54 | # configure bits. $(OBJ.DIR): mkdir $@ DISTCLEAN_FILES += -r $(OBJ.DIR) # Reminder to self: the fact that rm(1) on my system accepts -r # in the middle of the file list somewhat surprises me, and it may # be non-portable. ######################################################################## # $(call)able macro # which sets up rules for building dir/foo.c to $(OBJ.DIR)/foo.o # $1 = input file. Must not be more than 1 subdir level # deep (that would break these rules). # Intended only for libs to be included in $(FSL.OBJ). | > > | 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 | # configure bits. $(OBJ.DIR): mkdir $@ DISTCLEAN_FILES += -r $(OBJ.DIR) # Reminder to self: the fact that rm(1) on my system accepts -r # in the middle of the file list somewhat surprises me, and it may # be non-portable. FSL.OBJ := $(SQLITE3.O) ######################################################################## # $(call)able macro # which sets up rules for building dir/foo.c to $(OBJ.DIR)/foo.o # $1 = input file. Must not be more than 1 subdir level # deep (that would break these rules). # Intended only for libs to be included in $(FSL.OBJ). |
︙ | ︙ | |||
70 71 72 73 74 75 76 | @test -d $(OBJ.DIR) || mkdir $(OBJ.DIR) @touch $@ $(FSL.OBJ): $(OBJ.DIR.MAKER) # End $(OBJ.DIR) bits. ######################################################################## | | > > > | 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 | @test -d $(OBJ.DIR) || mkdir $(OBJ.DIR) @touch $@ $(FSL.OBJ): $(OBJ.DIR.MAKER) # End $(OBJ.DIR) bits. ######################################################################## EXTRA_LIBS := -lz $(SQLITE3_LDFLAGS) libfossil.DLL.OBJECTS := $(FSL.OBJ) libfossil.DLL.LDFLAGS := @SH_LDFLAGS@ $(EXTRA_LIBS) libfossil.LIB.OBJECTS := $(libfossil.DLL.OBJECTS) ######################################################################## # Note that the limitation of building EITHER static OR shared libs # is artificial. It simplifies figuring out the linker args needed # for the test apps. ifeq (1,@shared@) # Shared lib $(eval $(call ShakeNMake.CALL.RULES.DLLS,libfossil)) all: $(libfossil.DLL) $(libfossil.DLL): $(libfossil.DLL.OBJECTS) TEST_BINS_LIBDEPS += $(libfossil.DLL) else # Static lib $(eval $(call ShakeNMake.CALL.RULES.LIBS,libfossil)) all: $(libfossil.LIB) $(libfossil.LIB): $(libfossil.LIB.OBJECTS) TEST_BINS_LIBDEPS += $(libfossil.LIB) endif ######################################################################## # Binaries... TEST_BINS_LDFLAGS := -L. -lfossil $(EXTRA_LIBS) @SH_LINKFLAGS@ FAppO := FossilApp.o |
︙ | ︙ |
Changes to auto.def.
︙ | ︙ | |||
29 30 31 32 33 34 35 | puts "Found fossil binary: $fossilBin" catch { set auxSchema [string trimright \ [exec echo \ {SELECT value FROM config WHERE name='aux-schema';} \ "|" $fossilBin sqlite3] ] } ex | | | 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 | puts "Found fossil binary: $fossilBin" catch { set auxSchema [string trimright \ [exec echo \ {SELECT value FROM config WHERE name='aux-schema';} \ "|" $fossilBin sqlite3] ] } ex # puts "ex=$ex" } #set uname [exec $fossilBin version -v "|" grep "Schema version"] #puts "uname=$uname" #return if {[string length $auxSchema] == 16} { |
︙ | ︙ |
Changes to config.make.in.
︙ | ︙ | |||
13 14 15 16 17 18 19 | #LDLIBS += -lsqlite3 -lz # Install destination prefix = @prefix@ exec_prefix = @exec_prefix@ DESTDIR = $(prefix) | | > | > | 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 | #LDLIBS += -lsqlite3 -lz # Install destination prefix = @prefix@ exec_prefix = @exec_prefix@ DESTDIR = $(prefix) #SRC.DIR := @top_srcdir@/src SRC.DIR := src #OBJ.DIR := @top_srcdir@/obj OBJ.DIR := obj # Project-specific CFLAGS TOP_INCDIR = @top_srcdir@/include #CPPFLAGS += -D_GNU_SOURCE -Wall -Werror -I. -I$(TOP_INCDIR) CPPFLAGS += -I. -I$(TOP_INCDIR) -I$(HOME)/include #ifeq (gcc,@CC@) CPPFLAGS += -Wall -Werror -pedantic |
︙ | ︙ |
Added sqlite3.make.
> > > > > > > > > > > > > > > > > > > > > > | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | ######################################################################## # Looks for sqlite3.[ch] in $PWD. If found, it sets up some bits # to build them and tell downstream make code about it so that it can # link to the lib or the .o, as appropriate. SQLITE3.H := $(wildcard sqlite3.h) SQLITE3.C := $(wildcard sqlite3.c) ifneq (,$(SQLITE3.C)) SQLITE3.O := $(OBJ.DIR)/sqlite3.o SQLITE3_LDFLAGS := # These are the flags used by fossil's embedded sqlite3: SQLITE3_CPPFLAGS := -DSQLITE_OMIT_LOAD_EXTENSION=1 \ -DSQLITE_THREADSAFE=0 \ -DSQLITE_DEFAULT_FILE_FORMAT=4 \ -DSQLITE_ENABLE_STAT3 \ -DSQLITE_ENABLE_LOCKING_STYLE=0 # TODO? -Dlocaltime=fossil_localtime. See definition in v1's timeline.c. $(SQLITE3.O): $(SQLITE3.C) $(SQLITE3.H) @$(call ShakeNMake.CALL.SETX,"CC [$@] ..."); \ $(COMPILE.c) $(COMPILE.c.OPTIONS) $(SQLITE3_CPPFLAGS) $(OUTPUT_OPTION) $< else SQLITE3_LDFLAGS := -lsqlite3 endif |