10) Unpack the new update.
2
31) Examine each patchfile to determine if all or some patches may no longer be
4needed, or needs to be applied differently (see 2 below for special-case
5patch-configure.ac).  Once patched are applied, update the patch files in
6the applied-patched directory.
7
82) The patch-configure.ac file only deals with libtool-style versioning.
9We had altered the version numbers so that the version number in the name
10of the dylib matched the libedit version number, but this was the wrong
11thing to do, and now we are stuck.  For instance, original libtool-style
12version number for a past version was 0:27:0.  It was changed to 1:11:0 so
13that libedit.2.11.dylib was created (1 is added to the major number, because
14the libtool major number can be zero, but not the Mac OS X major number).
15
16libedit 3.0 has a libtool version number of 0:35:0, meaning it is binary-
17compatible with the 2.11 version.  Since we now build with Xcode, we don't
18care about the libtool versioning, *except* that it tells use the 3.0
19version is binary compatible with libedit.2.dylib.  So we can create a
20libedit.3.dylib, plus the usual symlinks libedit.dylib, and libedit.3.0.dylib,
21and also create a libedit.2.dylib symlink, *if* we remember to set the
22compatibility version of libedit.3.dylib to 2.0.
23
243) We need to create config.h, which means we need to run configure.  New
25in libedit 3.0 is utf-8 support, which is enabled with the --enable-widec
26option.  To determine what what this option changes, we create two copies
27of the patched directories, and run configure in both, one with the new
28option, and one without.
29
303a) We compare the config.h from the two directories.  In this case, a new
31new #define is set (WIDECHAR).
32
333b) We compare the corresponding Makefiles, ignoring path differences due
34to having two different directory names.  Again, in this case, we see that
35previously commented-out files are now enabled (this also tells us that if
36we didn't enable the utf-8 support, those files would be unused, and probably
37would have waste space if we blindly added those files to Xcode).  There are
383 new .c files in this case:
39
40    eln.c historyn.c tokenizern.c
41
424) Compare the files in the src directory, between the old libedit and the
43new.  There are 3 new .c files and 1 new .h file:
44
45    chartype.c chartype.h eln.c wcsdup.c
46
47So 1 of these new .c files (eln.c) is accounted for in 3b).
48
495) src/Makefile creates some of these new source files.  These files (along
50with others) are stored in the "local" directory in the libedit project, so we
51will need to recreate them again:
52
53    cd src
54    echo 'my_local: $(BUILT_SOURCES)' >> Makefile
55    # the "am__configure_deps=" prevents trying to autoreconf
56    make my_local am__configure_deps=
57
58In this case, the files:
59
60    vi.h emacs.h common.h fcns.h help.h fcns.c help.c tokenizern.c historyn.c
61
62are created.
63
64Two of these .c files were found in 3b) (tokenizern.c historyn.c).
65
666) From 4) and 5), the files from 3b) are accounted for.  That leaves 2 .c
67files found in 4) (chartype.c wcsdup.c) that are new and build by default
68(which the Makefile confirms).
69
707) Copy the (unmodified) src directory to the src directory of the SVN copy.
71Add the new files found in 4):
72
73    svn add chartype.c chartype.h eln.c wcsdup.c
74
758) Copy the files created in 5) to the local directory of the SVN copy, and
76add the new files:
77
78    svn add tokenizern.c historyn.c
79
809) For completeness, copy libedit.pc (after running configure), to the local
81directory.
82
8310) Go into Xcode and add the files from 4) to the libedit and libedit-static
84targets.  When these files appear under the libedit group, move them into the
85Source folder (sorting alphabetically to be nice).
86
8711) Add the new files from 5) to the libedit and libedit-static targets.  When
88these files appear under the libedit group, move them into the local folder
89(sorting alphabetically to be nice).
90
9112) Modify the "make lists" script to add the two new file creations (for
92historyn.c tokenizern.c).  We also remove the "make list" build phase from each
93of the libedit and libedit-static targets, since we should not be modifying
94files (at build time) in SRCROOT.  Besides, this would hide the fact that
95the files in the local directory are out of date from what actually gets
96built.
97
9813) For the libedit target, change the "Current Library Version" from 2.11
99to 3.0.  Leave the "Compatibility Version" at 2.  Change the "Product Name"
100from "edit.2" to "edit.3".
101
10214) Under the all target, modify the "install misc" script.  Replace:
103
104foreach l (libedit.2.11.dylib libedit.dylib libreadline.dylib) do
105    ln -s libedit.2.dylib $DSTROOT/usr/lib/$l
106done
107
108with:
109
110foreach l (libedit.2.dylib libedit.3.0.dylib libedit.dylib libreadline.dylib) do
111    ln -s libedit.3.dylib $DSTROOT/usr/lib/$l
112done
113
11414) In the doc directory of the unpacked-and-configured copy, run:
115
116    touch ../config.status
117    echo 'my_man: $(EL_MANS)' >> Makefile
118    make my_man am__configure_deps=
119
120Copy the two man pages (editline.3 editrc.5) to the doc subdirectory of the SVN
121copy.
122
12315) Update the libedit.plist file (in the local directory), with the current
124information.
125
12616) Add the tarball to SVN, so we have a copy of the original sources.
127
12817) Because tokenizern.c and historyn.c are located in the local directory,
129and because they expect to include the tokenizer.c and history.c files,
130respectively, a new include directory needed to be added to Xcode (the "src"
131directory).  The -fpascal-strings option was removed as extraneous.
132
13318) Build libedit and if testing finds bugs, fix the code, and update/create
134the corresponding patch file.
135