Fossil

Check-in [eff52c1c]
Login

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

Overview
Comment:Switch to using configure (autosetup) by default. The original Makefile is now available as Makefile.classic
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | autosetup
Files: files | file ages | folders
SHA1:eff52c1ccbded490c96b5e0febdaa07b49dfca33
User & Date: steveb 2011-07-22 01:43:49
Original Comment: Switch to using configure (autosetup) by default. The original Makefile is now available as Makefile.classic
Context
2011-07-22
03:10
Very minor edits to the BUILD.txt document. Closed-Leaf check-in: 38d58597 user: drh tags: autosetup
01:43
Switch to using configure (autosetup) by default. The original Makefile is now available as Makefile.classic check-in: eff52c1c user: steveb 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
..
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
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

................................................................................
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.

|
<
<
<
<
<
<



|
|
|
>
>
>
>
>



|







 







|
|
|

|

>
>
>
|







>
>
>
>







1






2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
..
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
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

................................................................................
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.

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_*}