Bug fixes
[automake.git] / TODO
blobb750497984099a51f1fbc2877d13666bce36d147
1 Priorities for release:
2 * Check all require_file errors to see if any should reference a line in
3   Makefile.am or configure.in.  [handle_configure does]
4 * Add prog_CFLAGS
6 François> * Do you speak somewhere of the capability Automake has to let
7 François> the user overrides definitions and goals?  I think this is useful,
8 François> at times.  I think the "When Automake Isn't Enough" node needs to
9 François> be revisited, as it says false things.
10 -- this should be its own node
11 -- should include general comment on automake processing -- copy-through
12 -- include recommended order of macros
14 need to add chapter with examples of each kind of package
16 François> * You might say a word about comment processing, double
17 François> hash removing, and copying of a possible copyright block at
18 François> beginning of Makefile.am.
20 François> * The manual should tell about the fact the automake program, when
21 François> used for a single subdirectory, should be run from the top level,
22 François> with something like an explicit DIR/Makefile argument.
24 * look at ``'' issues in docs.  and look for 'definition' pragma
26 Other priorities:
27 * Must rewrite am_install_var.  Should break into multiple functions.
28   This will allow the callers to be a little smarter.
29 * Rewrite clean targets.
30 * Expand test suite.
32 Consider allowing mkinstalldirs, mdate-sh, and others to be put in
33 AC_CONFIG_AUX_DIR.  Maybe even ansi2knr?
35 Testing: allow support for Cygnus-style dejagnu-based test suites via
36 an option
38 Think about ways to make automake fit better with Cygnus-style trees.
40 Use recode in dist target when MAINT_CHARSET specified.  Read caveats
41 in automake.in before doing this.  Note the same problem used to apply
42 to the no-dependencies option; maybe it still should?  Note also that
43 each Makefile.am must be rewritten at "make dist" time if
44 MAINT_CHARSET and DIST_CHARSET are not identical.  NOTE: gettext must
45 arrange for all .po files not to be recoded.  In the long term this
46 might be a problem (consider when some systems use Unicode but the
47 rest do not)
49 Handle dist-zoo and dist-zip.  Generally add more DOS support.  Maybe
50 run "doschk" (why isn't this merged with "pathchk"?) when doing a
51 dist.  Do whatever else François says here...
53 Add support for html via an option.  Use texi2html.  Use
54 "html_TEXINFOS", and htmldir = .../html.  Include html files in
55 distribution.  Also allow "html_DATA", for raw .html files.
56   [ when will texinfo support html? ]
58 if configure.in not found, move up a directory and try again?  This
59 could eliminate a common source of problems.
61 uninstall and pkg-dirs should rm -rf the dir.
63 a potential bug: configure puts "blah.o" into LIBOBJS, thus implying
64 these files can't be de-ansified.  Not a problem?
66 In general most .am files should be merged into automake.  For
67 instance all the "clean" targets could be merged by keeping lists of
68 things to be removed.  This would be a lot nicer looking.  Note that
69 the install targets probably should not be merged; it is sometimes
70 useful to only install a small part.
72 Clean up the output:
73 * Order rules sensibly
74 * Ensure every line has a purpose.  Omit unused stuff
75 * Eliminate extraneous rules when possible (eg 'install-am' stuff)
76 * Make sure vertical spacing is correct
77 * pretty-print targets
78 * regularize how backslash-newline is done.  Just one space between text
79   and backslash should be the rule.  Update makefile-mode to allow this.
80   (set column to 0, probably)
82 It should be possible to have ansi2knr in just one place in a package.
83 Jim Meyering says just rely on configure to make links as appropriate.
84 Maybe introduce syntax like this:
85         AUTOMAKE_OPTIONS = ../ansi2knr
88 Lex, yacc support:
89 * It would be nice to automatically support using bison's better features
90   to rename the output files.  This requires autoconf support
91 * Consider supporting syntax from autoconf "derived:source", eg:
92         y.tab.c:perly.y
93   for yacc and lex source
94 * if AC_PROG_LEX used, ensure LEXLIB is in foo_LDADD
95 * require AC_DECL_YYTEXT for lex
97 require AC_PROG_CXX if any C++ source files found?
98 Better support for C++ all around
100 Write autoconf macro to do all work necessary for automake.  Eg define
101 PACKAGE, VERSION, etc.
103 'maintainer-clean' should "rm -rf .deps".  Ditto distclean
104 Should look for clean-local targets in Makefile.am.
106 It might be cool to generate .texi dependencies by grepping for
107 @include.  (If done, it should be done the same way C dependencies are
108 done)
110 It would be good to check some parts of GNU standards.  Already check
111 for install-sh and mkinstalldirs.  What else is required to be in
112 package by GNU standards or by automake?
113 Some things for --strictness=gnits:
114 * "cd $(foo); something" is an error in a rule.  Should be:
115   "cd $(foo) && something"
116 * Look for 'ln -s' and warn about using $(LN) and AC_PROG_LN_S
117 * Look for $(LN) and require AC_PROG_LN_S
119 automake.in: should ".cc" really -> "$o"?  This doesn't really seem
120 right, but maybe it is so names can be rewritten uniformly?  Must
121 check
123 Auto-distribute "ChangeLog.[0-9]+"?  "ChangeLog.[a-z]+"?
125 Internationalize. [ gettext doesn't have the necessary machinery yet ]
126 am_error should use printf-style arguments (for eventual gettext scheme)
128 François says the ordering of files in a distribution should be as follows:
129 * README
130 * source files
131 * derived files
132 I agree, but I don't see how to implement this yet.
133 It might be easier if "derived files" is limited to those that
134 Automake itself knows about, eg output of yacc.
136 Check all source files to make sure that FSF address is up-to-date.
137 --gnits or --gnu only.
139 Merge each -vars.am file with corresponding ".am" file.  Can do this
140 because of changes to &file_contents.
142 Looked at a program called 'ezmake', which seems to do something
143 similar.  The only idea there that is possibly worth stealing is using
144 globs in definitions.  Also has negations.  Eg in a directory with
145 files a.c, b.c and c.c, the line:
146         foo_SOURCES = *.c ~c.c
147 would be equivalent to:
148         foo_SOURCES = a.c b.c
149 Is this worth implementing?
151 Should libexec programs have the name transform done on them?
153 Order the output rules sensibly, so FOO_SOURCES and FOO_OBJECTS are
154 together and rules are in the usual order.
156 Make the output minimal: only output definitions for variables that
157 are used.
159 Look at dist's jmake for ideas.  dist is the name of the distribution
160 including Metaconfig.  Perl uses it.
162 Should handle directory hierarchies deeper than 2.  Right now there is
163 some support for this.  Here are some of the issues:
164 * Should handle AC_CONFIG_SUBDIRS, ie must handle configure.in in subdirs
165 * Must handle SUBDIRS in subdir Makefile.am's
167 ================================================================
169 Document:
172 Defined variables, their meanings, and their effects:
174 DEFS           cpp definitions
175 INCLUDES       -I options to cpp
176 CPPFLAGS       more cpp flags
177 CFLAGS         flags to cc
178 COMPILE        how to compile a C program
179 LINK           how to link a C program
181 DIST_SUBDIRS   directories which are copied verbatim into the
182                distribution.  Used eg for directories holding
183                only example code (which don't have their own
184                makefile).  This variable might be a bad idea.
186 Document customary ordering of Makefile.am.  From François.
188 Must document BUILT_SOURCES variable.  See depend.am.
190 Should include extended version of diagram from Autoconf (suggested by
191 Greg Woods)
193 must document check, install-info targets
195 ================================================================
197 Libraries:
199 * Should support standalone library along with subdir library in same
200   Makefile.am.  Maybe: turn off "standalone" mode if library's Makefile.am
201   is not only one specd? [ add an option for this ]
202 * Need a way to handle shared libraries.
203   It would be really interesting to be able to easily (as the end-user)
204   make many different versions of the library: shared, static, profiling,
205   debug, optimized...
206   How does Perl handle this?  How does glibc handle this?
207   This needs autoconf support
209 Some examples to keep in mind while doing this:
210 * readline
211 * kpathsea
213 ================================================================
215 Have a program that generates a Makefile on stdout, passes it through
216 a "config.status"-style filter, and thence into make.  Why bother,
217 other than the gee-whiz factor?
219 Would it be useful to integrate in some way with the Debian package
220 building utility?  Must check.  maybe it would be possible to deal
221 with all the different package utilities somehow.
223 ================================================================
225 A tool to guess what the local Makefile.am should look like:
227 * Probably integrate with autoscan
228 * Use various simple rules to determine what to do:
229   * get name of top directory, sans version info
230   * search for .c files with 'main' in them
231     * if in main.c, use directory name for program
232     * if in more than one, generate multiple programs
233     * if not found, generate a library named after directory
234   * order subdir searches correctly: lib first, src last
235   * assume 'testsuite' dir means we are using dejagnu
236 * maybe be smart about reading existing Makefile.am, so tool
237   can be run for incremental changes?  You could imagine:
239         Makefile.am:
240                 autoproject --incremental
242 ================================================================
244 Stuff NOT to do, and why:
246 consider auto-including any file that matches "*.in".
247   [ no: po/Makefile.in shouldn't be included ]
249 must look at mkid to see how it works (for subdir usage)
250   [ right now, it doesn't.  i don't see a simple fix right now ]