Fossil

Check-in [75f02948]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Merge the recent autosetup changes into trunk. The Makefile has been renamed to Makefile.classic. The standard procedure to build is now ./configure; make.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:75f02948fa23f6c7d42c3ceec12f0d5d01c94922
User & Date: drh 2011-07-22 03:12:33
Context
2011-07-22
19:38
Since the mlink table contains entries with pid=0 for non-empty manifests without parents, drop the original non-incremental commit logic by folding the few special cases into the mlink/plink based output. check-in: fca30736 user: joerg tags: trunk
03:12
Merge the recent autosetup changes into trunk. The Makefile has been renamed to Makefile.classic. The standard procedure to build is now ./configure; make. check-in: 75f02948 user: drh tags: trunk
03:10
Very minor edits to the BUILD.txt document. Closed-Leaf check-in: 38d58597 user: drh tags: autosetup
2011-07-21
19:20
Add support for incremental exports check-in: c2ccd825 user: joerg tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to BUILD.txt.

1
2
3
4
5
6
7
8
9
10
11
12
13





14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41



42
43
44
45
46
47
48
49




50
51
52
53
54
55
56
..
62
63
64
65
66
67
68



To do a complete build on most unix systems, just type:

   make

If you have an unusual unix system for which the standard Makefile
will not work, or if you want to do some non-standard options, you can
also run:

   ./configure; make

The ./configure script builds GNUmakefile which will be used in place
of Makefile.  Run "./configure --help" for a listing of the available
options.






On a windows box, use one of the Makefiles in the win/ subdirectory,
according to your compiler and environment.  If you have GCC and MSYS
installed on your system, the consider:

   make -f win/Makefile.mingw

If you have VC++ installed on your system, then consider:

   cd win; nmake /f Makefile.msc

If you have trouble, or you want to do something fancy, just look at
top level makefile. There are 6 configuration options that are all well
commented. Instead of editing the Makefile, consider copying the Makefile
to an alternative name such as "GNUMakefile", "BSDMakefile", or "makefile"
and editing the copy.


BUILDING OUTSIDE THE SOURCE TREE

An out of source build is pretty easy:

  1. Make a new directory to do the builds in.
  2. Copy "Makefile" from the source into the build directory and
  modify the SRCDIR macro along the lines of:

    SRCDIR=../src




  3. type: "make"

This will now keep all generates files seperate from the maintained
source code.

--------------------------------------------------------------------------

Here are some notes on what is happening behind the scenes:





* The Makefile just sets up a few macros and then invokes the
  real makefile in src/main.mk.  The src/main.mk makefile is
  automatically generated by a TCL script found at src/makemake.tcl.
  Do not edit src/main.mk directly.  Update src/makemake.tcl and
  then rerun it.

................................................................................
* Most *.c source files are preprocessed using a program called
  "translate".  The sources to translate are found in src/translate.c.
  A header comment in src/translate.c explains in detail what it does.

* The src/mkindex.c program generates some C code that implements
  static lookup tables.  See the header comment in the source code
  for details on what it does.



|
<
<
<
<
<
<



|
|
|
>
>
>
>
>



|








|
|
|
|






|
|
|

|

>
>
>
|







>
>
>
>







 







>
>
>
1






2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
..
68
69
70
71
72
73
74
75
76
77
To do a complete build, just type:







   ./configure; make

The ./configure script builds Makefile from Makefile.in based on
your system and any options you select (run "./configure --help"
for a listing of the available options.)

If you wish to use the original Makefile with no configuration, you can
instead use:

   make -f Makefile.classic

On a windows box, use one of the Makefiles in the win/ subdirectory,
according to your compiler and environment.  If you have GCC and MSYS
installed on your system, then consider:

   make -f win/Makefile.mingw

If you have VC++ installed on your system, then consider:

   cd win; nmake /f Makefile.msc

If you have trouble, or you want to do something fancy, just look at
Makefile.classic. There are 6 configuration options that are all well
commented. Instead of editing the Makefile.classic, consider copying 
Makefile.classic to an alternative name such as "GNUMakefile",
"BSDMakefile", or "makefile" and editing the copy.


BUILDING OUTSIDE THE SOURCE TREE

An out of source build is pretty easy:

  1. Make and change to a new directory to do the builds in.
  2. Run the "configure" script from this directory.
  3. Type: "make"

For example:

  mkdir build
  cd build
  ../configure
  make

This will now keep all generates files seperate from the maintained
source code.

--------------------------------------------------------------------------

Here are some notes on what is happening behind the scenes:

* The configure script (if used) examines the options given
  and runs various tests with the C compiler to create Makefile
  from the Makefile.in template as well as autoconfig.h

* The Makefile just sets up a few macros and then invokes the
  real makefile in src/main.mk.  The src/main.mk makefile is
  automatically generated by a TCL script found at src/makemake.tcl.
  Do not edit src/main.mk directly.  Update src/makemake.tcl and
  then rerun it.

................................................................................
* Most *.c source files are preprocessed using a program called
  "translate".  The sources to translate are found in src/translate.c.
  A header comment in src/translate.c explains in detail what it does.

* The src/mkindex.c program generates some C code that implements
  static lookup tables.  See the header comment in the source code
  for details on what it does.

Additional information on the build process is available from
http://www.fossil-scm.org/fossil/doc/trunk/www/makefile.wiki

Name change from Makefile to Makefile.classic.

Name change from GNUmakefile.in to Makefile.in.

38
39
40
41
42
43
44
45
TCC +=	@EXTRA_CFLAGS@ @CPPFLAGS@ @CFLAGS@ -DHAVE_AUTOCONFIG_H
INSTALLDIR = $(DESTDIR)@prefix@/bin
USE_SYSTEM_SQLITE = @USE_SYSTEM_SQLITE@

include $(SRCDIR)/main.mk

distclean: clean
	rm -f autoconfig.h config.log GNUmakefile







|
38
39
40
41
42
43
44
45
TCC +=	@EXTRA_CFLAGS@ @CPPFLAGS@ @CFLAGS@ -DHAVE_AUTOCONFIG_H
INSTALLDIR = $(DESTDIR)@prefix@/bin
USE_SYSTEM_SQLITE = @USE_SYSTEM_SQLITE@

include $(SRCDIR)/main.mk

distclean: clean
	rm -f autoconfig.h config.log Makefile

Changes to auto.def.

164
165
166
167
168
169
170
171
172

# Check for getpassphrase() for Solaris 10 where getpass() truncates to 10 chars
if {![cc-check-functions getpassphrase]} {
    # Haiku needs this
    cc-check-function-in-lib getpass bsd
}

make-template GNUmakefile.in
make-config-header autoconfig.h -auto {USE_* FOSSIL_*}







|

164
165
166
167
168
169
170
171
172

# Check for getpassphrase() for Solaris 10 where getpass() truncates to 10 chars
if {![cc-check-functions getpassphrase]} {
    # Haiku needs this
    cc-check-function-in-lib getpass bsd
}

make-template Makefile.in
make-config-header autoconfig.h -auto {USE_* FOSSIL_*}