More bug fixes
[automake.git] / TODO
blobf8370b8176d4bb041a6a8715bbad47c1d0e0482d
1 Priorities for release:
2   [ none ]
4 ** when can aclocal.m4 be auto-generated?
6 ** many requests for a way to omit a file from the distribution.
7    Should be done like `!foo' or `~foo' in _SOURCES, etc.
8    Such files should be removed explicitly after the copy step!
9    Doing this requires rewriting macros before generating Makefile.in.
11 add support for Makefile.tmpl that is auto-included in every
12 Makefile.am.  That makes it easier to do some non-std thing in every
13 subdirectory.
15 consider printing full file name of Makefile.am or configure.in when
16 giving error.  This would help for very large trees with many
17 configure.in scripts
19 consider supporting "var+= stuff" syntax.  rewrite to just var=... on
20 output.  This is sometimes convenient when you want to write a
21 Makefile.am in more-or-less modular parts
23 should be able to determine what is built by looking at rules (and
24 configure.in).  Then built man pages (eg) could automatically be
25 omitted from the distribution.
27 Consider using libfoo_SOURCES, etc, for libraries.  From Gord
28 Matzigkeit.  There is a patch.
30 Idea from Joerg-Martin Schwarz: allow passing different -D flags to
31 different compiles.  This can be done, but with the restriction that a
32 .c cannot appear in 2 different "objects" (programs/libraries)
33 compiled with different -D options (because -c and -o do not always
34 work together and parallel makes must work).  This could be
35 implemented by noticing whenever a ".o" target with no rules is being
36 emitted, and adding the appropriate compilation rule as appropriate.
37 This should work with targets from Makefile.am as well as from .P
38 files, which means rewriting so that the Makefile.am contents aren't
39 copied into the output immediately.  This feature is probably required
40 to fully support libtool ("grody compilation issue")
42 If @LIBOBJS@ or @ALLOCA@ appears in _LDADD or _LIBADD, put it into
43 dependencies automatically
45 Think about: maybe "make check" should just bomb if error occurs?
46 Then user must use "make -k check".  This is probably more natural.
48 Consider: "cvs" option adds some cvs-specific rules?
50 "Cygnus"-specific features:
51 * An option that statically rewrites @MAINT@ to "#M#".
52 * Should look for certain tools in the build tree:
53   expect, dejagnu, makeinfo
54 * `no-installinfo' is the default
55 * always generate `info' and `install-info' targets
56 * Allow `texinfo.tex' to be missing
58 Automake: should EXTRA_DIST files be statically findable?
60 Automake: devo/inet/Makefile.am has "all-local".  "install" depends on
61 "all", but the local installs get run before the stuff in "all".  Gross.
63 Right now, targets generated internally (eg "install") are not
64 overridable by user code.  This should probably be possible, even
65 though it isn't very important.  This could be done by generating all
66 internal rules via a function call instead of just appending to
67 $output_rules.
69 * Should be a way to have "nobuild_PROGRAMS" which aren't even built,
70   but which could be by running the magic make command.
72 * Should have tool like "autoreconf" that only remakes Makefiles that
73   need it.  Probably autoreconf should be modified to handle automake
75 Other priorities:
76 * Must rewrite am_install_var.  Should break into multiple functions.
77   This will allow the callers to be a little smarter.
78 * Rewrite clean targets.
79 * Must rewrite error handling code.  Right now it is a real mess
80   Should fix up require_file junk at the same time
82 Things to finish libtool support:
83 * Handle grody compilation issue
84 * Handle install changes
85 * Handle clean changes
86 * New definition for LINK
88 Scan source directories and warn about missing files, eg .c/.h files
89 that aren't mentioned?
91 Need way to say there are no suffixes in a Makefile (Franc,ois'
92 "override" idea suffices here)
94 Check to make sure various scripts are executable (IE when looking for
95 them in a directory)
97 Use recode in dist target when MAINT_CHARSET specified.  Read caveats
98 in automake.in before doing this.  Note the same problem used to apply
99 to the no-dependencies option; maybe it still should?  Note also that
100 each Makefile.am must be rewritten at "make dist" time if
101 MAINT_CHARSET and DIST_CHARSET are not identical.  NOTE: gettext must
102 arrange for all .po files not to be recoded.  In the long term this
103 might be a problem (consider when some systems use Unicode but the
104 rest do not)
105   MAINT_CHARSET *must* be local to each Makefile.am, to enable
106         merged distributions.
107   DIST_CHARSET must be passed down to subdir makes during a "make dist"
109 Handle dist-zoo.  Generally add more DOS support.  Maybe run "doschk"
110 (why isn't this merged with "pathchk"?) when doing a dist.  Do
111 whatever else François says here...
113 Add support for html via an option.  Use texi2html.  Use
114 "html_TEXINFOS", and htmldir = .../html.  Include html files in
115 distribution.  Also allow "html_DATA", for raw .html files.
116   [ when will texinfo support html? ]
117   [ is there a texinfo.tex that supports texi2html extensions? ]
119 uninstall and pkg-dirs should rm -rf the dir.
121 a potential bug: configure puts "blah.o" into LIBOBJS, thus implying
122 these files can't be de-ansified.  Not a problem?
124 In general most .am files should be merged into automake.  For
125 instance all the "clean" targets could be merged by keeping lists of
126 things to be removed.  This would be a lot nicer looking.  Note that
127 the install targets probably should not be merged; it is sometimes
128 useful to only install a small part.
130 Clean up the output:
131 * Order rules sensibly
132 * Ensure every line has a purpose.  Omit unused stuff
133 * Eliminate extraneous rules when possible (eg 'install-am' stuff)
134 * Make sure vertical spacing is correct
135 * pretty-print targets
136 * regularize how backslash-newline is done.  Just one space between text
137   and backslash should be the rule.  Update makefile-mode to allow this.
138   (set column to 0, probably)
139 Omit program transform vars from header if no program installed.  This
140 is currently pretty hard to do.  (But with beautification code it
141 would probably be easy)
143 Lex, yacc support:
144 * It would be nice to automatically support using bison's better features
145   to rename the output files.  This requires autoconf support
146 * Consider supporting syntax from autoconf "derived:source", eg:
147         y.tab.c:perly.y
148   for yacc and lex source
149 * if AC_PROG_LEX used, ensure (no, *PUT*) LEXLIB in foo_LDADD
151 Multi-language support:
152 * should have mapping of file extensions to languages
153 * should automatically handle the linking issue (special-case C++)
154 * must get compile rules for various languages; FORTRAN probably
155   most important unimplemented language
157 'maintainer-clean' should "rm -rf .deps".  Ditto distclean
158 Should look for clean-local targets in Makefile.am.
160 It might be cool to generate .texi dependencies by grepping for
161 @include.  (If done, it should be done the same way C dependencies are
162 done)
164 It would be good to check some parts of GNU standards.  Already check
165 for install-sh and mkinstalldirs.  What else is required to be in
166 package by GNU standards or by automake?
167 Some things for --strictness=gnits:
168 * "cd $(foo); something" is an error in a rule.  Should be:
169   "cd $(foo) && something"
170 * Look for 'ln -s' and warn about using $(LN) and AC_PROG_LN_S
171 * Look for $(LN) and require AC_PROG_LN_S
173 automake.in: should ".cc" really -> "$o"?  This doesn't really seem
174 right, but maybe it is so names can be rewritten uniformly?  Must
175 check
177 Auto-distribute "ChangeLog.[0-9]+"?  "ChangeLog.[a-z]+"?
179 Internationalize. [ gettext doesn't have the necessary machinery yet ]
180 am_error should use printf-style arguments (for eventual gettext scheme)
182 François says the ordering of files in a distribution should be as follows:
183 * README
184 * source files
185 * derived files
186 I agree, but I don't see how to implement this yet.
187 It might be easier if "derived files" is limited to those that
188 Automake itself knows about, eg output of yacc.
190 Check all source files to make sure that FSF address is up-to-date.
191 --gnits or --gnu only.
193 Merge each -vars.am file with corresponding ".am" file.  Can do this
194 because of changes to &file_contents.
196 Looked at a program called 'ezmake', which seems to do something
197 similar.  The only idea there that is possibly worth stealing is using
198 globs in definitions.  Also has negations.  Eg in a directory with
199 files a.c, b.c and c.c, the line:
200         foo_SOURCES = *.c ~c.c
201 would be equivalent to:
202         foo_SOURCES = a.c b.c
203 Is this worth implementing?
205 Should libexec programs have the name transform done on them?
207 Order the output rules sensibly, so FOO_SOURCES and FOO_OBJECTS are
208 together and rules are in the usual order.
210 Make the output minimal: only output definitions for variables that
211 are used.
213 Look at dist's jmake for ideas.  dist is the name of the distribution
214 including Metaconfig.  Perl uses it.
216 Should handle directory hierarchies deeper than 2.  Right now there is
217 some support for this.  Here are some of the issues:
218 * Should handle AC_CONFIG_SUBDIRS, ie must handle configure.in in subdirs
219     * can do this by looking at subdirs, seeing configure.in
220       and auto-running Automake there
221 * Must handle SUBDIRS in subdir Makefile.am's
223 dejagnu support:
224 * use RUNTEST_FOR_TARGET in some cases?
226 These can both be handled via dist-hook:
227 . Consider supporting guile-style PLUGIN directories automatically?
228 . Consider allowing eg "foo/bar" to appear in EXTRA_DIST, and generating
229   code to make directory foo at dist time
231 consider having no-gzip option that turns off gzip/GNU tar.
233 djm says:
234 David> To avoid comments like the one about subdirs getting buried in
235 David> the middle of a Makefile.in, how about pushing comments that
236 David> start with ### to the top of the Makefile.in (in order)?  Sort
237 David> of like how Autoconf uses diversions to force initialization
238 David> code to the top of configure.
240 Janos Farkas says:
241  suidbins = su
242  suidubins = chage cfhn etc etc
243  noinst_PROGRAMS = grpconv pwconv id groups $(suidbins) $(suidubins)
244 ... should work.
246 Karl Berry says:
247 Karl> 2) Your Makefile variable names are generally uppercase, but GNU
248 Karl> generally uses lowercase. Not that it matters :-).
250 ================================================================
252 Stuff for aclocal:
254 probably should put each group of m4 files into a subdir owned by the
255 containing application.
257 must fill in definitions for some of the AC_FEATURE macros
259 dependency checking needs some work.  in particular scanning a .m4
260 file should note all AC_DEFUNs contained therein, and avoid trying to
261 add_file any such
263 consider including autosystem; that is the only way the AC_FEATURE
264 macros even make sense.
266 ================================================================
268 Document:
271 Defined variables, their meanings, and their effects:
273 DEFS           cpp definitions
274 INCLUDES       -I options to cpp
275 CPPFLAGS       more cpp flags
276 CFLAGS         flags to cc
277 COMPILE        how to compile a C program
278 LINK           how to link a C program
280 DIST_SUBDIRS   directories which are copied verbatim into the
281                distribution.  Used eg for directories holding
282                only example code (which don't have their own
283                makefile).  This variable might be a bad idea.
284   [ should just require a new Makefile.am.  They are supposed to be
285     easy to write ]
287 Document customary ordering of Makefile.am.  From François.
289 must document that @ALLOCA@ works in _LDADD
291 Must document BUILT_SOURCES variable.  See depend.am.
293 Should include extended version of diagram from Autoconf (suggested by
294 Greg Woods)
296 Must document macros which can be used when writing one's own rules.
297 Must document INCLUDES
299 Document gettext support
301 Make a definition of the term "source"
303 need xref to libtool in docs
305 document how to use Automake with CVS.  Idea from Mark Galassi.  Also
306 include Greg Woods' more sophisticated "cvs-dist" target.
308 document that there is no uninstall-{exec,data}
310 document rebuilding configure.  CONFIGURE_DEPENDENCIES
312 document TAGS_DEPENDENCIES
314 document new variables introduced when AC_CANONICAL_* used
316 document _LISP handling
318 document canonicalization for texinfos
320 automake must be run in each directory with a configure.in
321 This is insufficiently clear
323 must document the targets required for integration with
324 non-automake-using subdirs
326 document actual uses of PACKAGE and VERSION
328 > Oh, ok.  This should be documented: make the last argument of your
329 > AC_OUTPUT line look like this:
331 >     test -z "$CONFIG_HEADERS" || echo timestamp > stamp-h
333 Must document aclocal program
335 djm says:
336 David> A list of autoconf macros that can be required for use with
337 David> automake, all in one place, would be helpful.
340 ================================================================
342 Libraries:
344 * Should support standalone library along with subdir library in same
345   Makefile.am.  Maybe: turn off "standalone" mode if library's Makefile.am
346   is not only one specd? [ add an option for this ]
348 ================================================================
350 Longer term:
352 Have a program that generates a Makefile on stdout, passes it through
353 a "config.status"-style filter, and thence into make.  Why bother,
354 other than the gee-whiz factor?
356 It might be interesting to figure out how a GNU system could use
357 Makefile.am's without resorting to Automake.  This might be impossible
358 in a practical sense.
360 Would it be useful to integrate in some way with the Debian package
361 building utility?  Must check.  maybe it would be possible to deal
362 with all the different package utilities somehow.  Lately I've been
363 hearing good things about the RedHat packaging utilities.  Why are
364 there so many of these?  Are they fun to write or something?
365 The RedHat package utility is called RPM; see
366         ftp://ftp.redhat.com/pub/code/rpm
367 It actually has problems, like no configure script and no documentation.
369 ================================================================
371 A tool to guess what the local Makefile.am should look like:
373 * Probably integrate with autoscan
374 * Use various simple rules to determine what to do:
375   * get name of top directory, sans version info
376   * search for .c files with 'main' in them
377     * if in main.c, use directory name for program
378     * if in more than one, generate multiple programs
379     * if not found, generate a library named after directory
380   * order subdir searches correctly: lib first, src last
381   * assume 'testsuite' dir means we are using dejagnu
382 * maybe be smart about reading existing Makefile.am, so tool
383   can be run for incremental changes?  You could imagine:
385         Makefile.am:
386                 autoproject --incremental
388 ================================================================
390 Stuff NOT to do, and why:
392 consider auto-including any file that matches "*.in".
393   [ no: po/Makefile.in shouldn't be included ]
395 must look at mkid to see how it works (for subdir usage)
396   [ right now, it doesn't.  i don't see a simple fix right now ]
398 if configure.in not found, move up a directory and try again?  This
399 could eliminate a common source of problems.
400   [ this is just a bad idea ]
402 * scripts are installed in $exec_prefix/bin, not $prefix/bin
403   Bug or feature?
404   [ the consensus on Gnits is that this isn't required.
405     doubters can work around it anyway ]
407 * make the auto-dep code crash if GNU make not in use?
408   (doesn't it already?)