Some aclocal bug fixes
[automake.git] / TODO
blob824d1cff130c6c4ffdd01d9fba8f148529013312
1 Priorities for release:
2 !! documentation (eg new macros)
3 * `acinstall'
4 * echo in installs?
5 * `missing' program
6 * copyrights on m4 files, aclocal output
8 Further:
9 - texinfo/info changes
10 - Per's suggestion
11 - man page fixes
12 - consider adding "echo"s to installs again.
13   users can use make SHELL='sh -x' to get the full dirt
15 Avoid loops when installing; instead unroll them in automake
17 allow `EXTRA_DIST = foo/bar'; too many requests to ignore
19 Franc,ois> * ansi2knr was uselessly compiled, and it might be an
20 Franc,ois> Automake problem:
22 MUST look @ Franc,ois' run-time-replacement code
24 From David A Swierczek: automake should notice (eg) AC_CHECK_PROG and
25 auto-generate Makefile substitution:
26         AC_CHECK_PROG(AR, ...)
27     =>  AR = @AR@ in Makefile.in
28 Ditto AC_SUBST and other things that make sense.  Furthermore, other
29 macros (eg AC_PROG_CC) should be handled via a similar mechanism; many
30 special cases could be eliminated.
32 consider putting all check-* targets onto @check?
33 To support --help/--version checking?
35 must move CONFIG_HEADER from tags.am... allow it to work in subdir.
37 take diff-n-query code from libit
39 must at least partially rewrite dist system (to handle distributing
40 info files, which is currently somewhat broken).
42 Per Bothner says:
43 Per> 1) Being able to build a set of non-source programs
44 Per> from source programs, without necessarily linking them together.
45 Per> I.e. one should be able to say something like:
46 Per>    dummy_SOURCES=foo.c bar.c
47 Per> and automake should realize that it needs to build foo.o and bar.o.
48 Per> 2) Being intelligent about new kinds of suffixes.
49 Per> If it sees:
50 Per>    SUFFIXES = .class .java
51 Per> and a suffix rule of the form:
52 Per>    .java.class:
53 Per> then it should be able to realize it can build .class files from
54 Per> .java files, and thus be able to generate a list of
55 Per> .class files from a list of .java source files.
57 * actually use acinstall program
59 !! Must fix require_file stuff.  It is really gross, and I don't
60    understand it any more.
62 * error messages should print ``[info blah blah]'' command when a
63   certain part of the standards apply.  saw idea in message from
64   Craig Burley.
66 * patch from Joel Weber about fixing yacc; in particular generating .h file
68 !! should write autoconf-style doc entries for each m4 macro
70 Jim's idea: should look for @setfilename and warn if filenames too long
71 * guess split size
72 * allow ".info" to be missing
74 should put inverse of @MAINT@ before `.PHONY: configure'.  This means
75 fixing configure target name (no $srcdir)
77 * must update GNU Hello
79 ** many requests for a way to omit a file from the distribution.
80    Should be done like `!foo' or `~foo' in _SOURCES, etc.
81    Such files should be removed explicitly after the copy step!
82    Doing this requires rewriting macros before generating Makefile.in.
84 from joerg-martin schwarz:
85  -- If Makefile.am contains $(CC), $(COMPILE), $(YLWRAP), .... 
86     in an explicitly written rule,  you should emit the corresponding
87     Makefile variables automatically.
89 add support for Makefile.tmpl that is auto-included in every
90 Makefile.am.  That makes it easier to do some non-std thing in every
91 subdirectory.
93 consider printing full file name of Makefile.am or configure.in when
94 giving error.  This would help for very large trees with many
95 configure.in scripts
97 From the GNU Standards.  These things could be checked, and probably
98 should be if --gnu.
99 *    Make sure that the directory into which the distribution unpacks (as
100 well as any subdirectories) are all world-writable (octal mode 777).
101 *   Make sure that no file name in the distribution is more than 14
102 characters long.
103 *    Don't include any symbolic links in the distribution itself.
104      (ditto hard links)
105 *    Make sure that all the files in the distribution are world-readable.
106 ** also, check --help output and --version output.  Idea from François
108 consider supporting "var+= stuff" syntax.  rewrite to just var=... on
109 output.  This is sometimes convenient when you want to write a
110 Makefile.am in more-or-less modular parts
112 should be able to determine what is built by looking at rules (and
113 configure.in).  Then built man pages (eg) could automatically be
114 omitted from the distribution.
116 Consider using libfoo_SOURCES, etc, for libraries.  From Gord
117 Matzigkeit.  There is a patch.
119 Idea from Joerg-Martin Schwarz: allow passing different -D flags to
120 different compiles.  This can be done, but with the restriction that a
121 .c cannot appear in 2 different "objects" (programs/libraries)
122 compiled with different -D options (because -c and -o do not always
123 work together and parallel makes must work).  This could be
124 implemented by noticing whenever a ".o" target with no rules is being
125 emitted, and adding the appropriate compilation rule as appropriate.
126 This should work with targets from Makefile.am as well as from .P
127 files, which means rewriting so that the Makefile.am contents aren't
128 copied into the output immediately.  This feature is probably required
129 to fully support libtool ("grody compilation issue")
131 Henrik Frystyk Nielsen says:
132 Henrik> 4) Flags like --include-deps are lost when you make changes to
133 Henrik> Makefile.am files and automake is run automatically. It would
134 Henrik> be nice to keep these flags as I now have to redo everything
135 Henrik> manually.
136 ... what about other options here too?
138 Think about: maybe "make check" should just bomb if error occurs?
139 Then user must use "make -k check".  This is probably more natural.
141 Consider: "cvs" option adds some cvs-specific rules?
143 "Cygnus"-specific features:
144 * An option that statically rewrites @MAINT@ to "#M#".
145 * Should look for certain tools in the build tree:
146   expect, dejagnu, makeinfo
147 * `no-installinfo' is the default
148 * always generate `info' and `install-info' targets
149 * Allow `texinfo.tex' to be missing
151 Automake: devo/inet/Makefile.am has "all-local".  "install" depends on
152 "all", but the local installs get run before the stuff in "all".  Gross.
154 Right now, targets generated internally (eg "install") are not
155 overridable by user code.  This should probably be possible, even
156 though it isn't very important.  This could be done by generating all
157 internal rules via a function call instead of just appending to
158 $output_rules.
160 * Should be a way to have "nobuild_PROGRAMS" which aren't even built,
161   but which could be by running the magic make command.
163 * Should have tool like "autoreconf" that only remakes Makefiles that
164   need it.  Probably autoreconf should be modified to handle automake
166 Other priorities:
167 * Must rewrite am_install_var.  Should break into multiple functions.
168   This will allow the callers to be a little smarter.
169 * Rewrite clean targets.
170 * Must rewrite error handling code.  Right now it is a real mess
171   Should fix up require_file junk at the same time
173 Things to finish libtool support:
174 * Handle grody compilation issue
175 * Handle install changes
176 * Handle clean changes
177 * New definition for LINK
179 Scan source directories and warn about missing files, eg .c/.h files
180 that aren't mentioned?
182 Need way to say there are no suffixes in a Makefile (Franc,ois'
183 "override" idea suffices here)
185 Check to make sure various scripts are executable (IE when looking for
186 them in a directory)
188 Use recode in dist target when MAINT_CHARSET specified.  Read caveats
189 in automake.in before doing this.  Note the same problem used to apply
190 to the no-dependencies option; maybe it still should?  Note also that
191 each Makefile.am must be rewritten at "make dist" time if
192 MAINT_CHARSET and DIST_CHARSET are not identical.  NOTE: gettext must
193 arrange for all .po files not to be recoded.  In the long term this
194 might be a problem (consider when some systems use Unicode but the
195 rest do not)
196   MAINT_CHARSET *must* be local to each Makefile.am, to enable
197         merged distributions.
198   DIST_CHARSET must be passed down to subdir makes during a "make dist"
200 Handle dist-zoo.  Generally add more DOS support.  Maybe run "doschk"
201 (why isn't this merged with "pathchk"?) when doing a dist.  Do
202 whatever else François says here...
204 Add support for html via an option.  Use texi2html.  Use
205 "html_TEXINFOS", and htmldir = .../html.  Include html files in
206 distribution.  Also allow "html_DATA", for raw .html files.
207   [ when will texinfo support html? ]
208   [ is there a texinfo.tex that supports texi2html extensions? ]
210 uninstall and pkg-dirs should rm -rf the dir.
212 a potential bug: configure puts "blah.o" into LIBOBJS, thus implying
213 these files can't be de-ansified.  Not a problem?
215 In general most .am files should be merged into automake.  For
216 instance all the "clean" targets could be merged by keeping lists of
217 things to be removed.  This would be a lot nicer looking.  Note that
218 the install targets probably should not be merged; it is sometimes
219 useful to only install a small part.
221 Clean up the output:
222 * Order rules sensibly
223 * Ensure every line has a purpose.  Omit unused stuff
224 * Eliminate extraneous rules when possible (eg 'install-am' stuff)
225 * Make sure vertical spacing is correct
226 * pretty-print targets
227 * regularize how backslash-newline is done.  Just one space between text
228   and backslash should be the rule.  Update makefile-mode to allow this.
229   (set column to 0, probably)
230 Omit program transform vars from header if no program installed.  This
231 is currently pretty hard to do.  (But with beautification code it
232 would probably be easy)
234 Lex, yacc support:
235 * It would be nice to automatically support using bison's better features
236   to rename the output files.  This requires autoconf support
237 * Consider supporting syntax from autoconf "derived:source", eg:
238         y.tab.c:perly.y
239   for yacc and lex source
240 * if AC_PROG_LEX used, ensure (no, *PUT*) LEXLIB in foo_LDADD
242 Multi-language support:
243 * should have mapping of file extensions to languages
244 * should automatically handle the linking issue (special-case C++)
245 * must get compile rules for various languages; FORTRAN probably
246   most important unimplemented language
247 This should be integrated in some way with Per's idea.
248 Eg .f.o rules should be recognized & auto-handled in _SOURCES
249 That way any random language can be treated with C/C++ on a first-class
250 basis (maybe)
252 Should 'distclean' "rm -rf .deps"?
254 It might be cool to generate .texi dependencies by grepping for
255 @include.  (If done, it should be done the same way C dependencies are
256 done)
258 It would be good to check some parts of GNU standards.  Already check
259 for install-sh and mkinstalldirs.  What else is required to be in
260 package by GNU standards or by automake?
261 Some things for --strictness=gnits:
262 * "cd $(foo); something" is an error in a rule.  Should be:
263   "cd $(foo) && something"
264 * Look for 'ln -s' and warn about using $(LN) and AC_PROG_LN_S
265 * Look for $(LN) and require AC_PROG_LN_S
267 automake.in: should ".cc" really -> "$o"?  This doesn't really seem
268 right, but maybe it is so names can be rewritten uniformly?  Must
269 check
271 Auto-distribute "ChangeLog.[0-9]+"?  "ChangeLog.[a-z]+"?
273 Internationalize. [ gettext doesn't have the necessary machinery yet ]
274 am_error should use printf-style arguments (for eventual gettext scheme)
276 François says the ordering of files in a distribution should be as follows:
277 * README
278 * source files
279 * derived files
280 I agree, but I don't see how to implement this yet.
281 It might be easier if "derived files" is limited to those that
282 Automake itself knows about, eg output of yacc.
284 Check all source files to make sure that FSF address is up-to-date.
285 --gnits or --gnu only.
287 Merge each -vars.am file with corresponding ".am" file.  Can do this
288 because of changes to &file_contents.
290 Looked at a program called 'ezmake', which seems to do something
291 similar.  The only idea there that is possibly worth stealing is using
292 globs in definitions.  Also has negations.  Eg in a directory with
293 files a.c, b.c and c.c, the line:
294         foo_SOURCES = *.c ~c.c
295 would be equivalent to:
296         foo_SOURCES = a.c b.c
297 Is this worth implementing?
299 Should libexec programs have the name transform done on them?
301 Order the output rules sensibly, so FOO_SOURCES and FOO_OBJECTS are
302 together and rules are in the usual order.
304 Make the output minimal: only output definitions for variables that
305 are used.
307 Look at dist's jmake for ideas.  dist is the name of the distribution
308 including Metaconfig.  Perl uses it.
310 Should handle directory hierarchies deeper than 2.  Right now there is
311 some support for this.  Here are some of the issues:
312 * Should handle AC_CONFIG_SUBDIRS, ie must handle configure.in in subdirs
313     * can do this by looking at subdirs, seeing configure.in
314       and auto-running Automake there
316 These can both be handled via dist-hook:
317 . Consider supporting guile-style PLUGIN directories automatically?
318 . Consider allowing eg "foo/bar" to appear in EXTRA_DIST, and generating
319   code to make directory foo at dist time
321 djm says:
322 David> To avoid comments like the one about subdirs getting buried in
323 David> the middle of a Makefile.in, how about pushing comments that
324 David> start with ### to the top of the Makefile.in (in order)?  Sort
325 David> of like how Autoconf uses diversions to force initialization
326 David> code to the top of configure.
328 Karl Berry says:
329 Karl> 2) Your Makefile variable names are generally uppercase, but GNU
330 Karl> generally uses lowercase. Not that it matters :-).
332 ================================================================
334 Stuff for aclocal:
336 Should ignore ## comments.
338 probably should put each group of m4 files into a subdir owned by the
339 containing application.
341 must fill in definitions for some of the AC_FEATURE macros
343 consider including autosystem; that is the only way the AC_FEATURE
344 macros even make sense.  Or move the AC_FEATURE macros back into
345 autosystem...
347 ================================================================
349 Document:
351 document which variables are actually scanned and which are not.
353 finish yacc, lex
355 Document customary ordering of Makefile.am.  From François.
357 Should include extended version of diagram from Autoconf (suggested by
358 Greg Woods)
360 Make a definition of the term "source"
362 need xref to libtool in docs
364 document how to use Automake with CVS.  Idea from Mark Galassi.  Also
365 include Greg Woods' more sophisticated "cvs-dist" target.
367 document rebuilding configure.  CONFIGURE_DEPENDENCIES
369 -- must document all variables that are supposed
370    to be public knowledge
372 automake must be run in each directory with a configure.in
373 This is insufficiently clear
375 must document the targets required for integration with
376 non-automake-using subdirs
378 use of (eg) EXTRA_PROGRAMS is not very clear right now
380 ================================================================
382 Things to do for autoconf:
384 * allow random code to be inserted a la the 2nd arg to AC_OUTPUT:
385 Joel> I know that the following is needed at the end of configure.in:
386 Joel>         [test -z "$CONFIG_HEADERS" || echo timestamp >stamp-h])
387 Joel> However, if automake checked that this line is present, it would
388 Joel> help...this bit me for a while.
390 * patch autoreconf to run automake and aclocal (this is done but
391   not really available)
393 ================================================================
395 Libraries:
397 * Should support standalone library along with subdir library in same
398   Makefile.am.  Maybe: turn off "standalone" mode if library's Makefile.am
399   is not only one specd? [ add an option for this ]
401 ================================================================
403 Longer term:
405 Would it be useful to integrate in some way with the Debian package
406 building utility?  Must check.  maybe it would be possible to deal
407 with all the different package utilities somehow.  Lately I've been
408 hearing good things about the RedHat packaging utilities.  Why are
409 there so many of these?  Are they fun to write or something?
410 The RedHat package utility is called RPM; see
411         ftp://ftp.redhat.com/pub/code/rpm
412 It actually has problems, like no configure script and no documentation.
414 For Cygnus it would probably be good to be able to handle the native
415 package utility on each platform.  There are probably 3 or 4 of these
416 (sysv, solaris?, aix?)
418 ================================================================
420 A tool to guess what the local Makefile.am should look like:
421 (see Gord's Maint program!)
423 * Probably integrate with autoscan
424 * Use various simple rules to determine what to do:
425   * get name of top directory, sans version info
426   * search for .c files with 'main' in them
427     * if in main.c, use directory name for program
428     * if in more than one, generate multiple programs
429     * if not found, generate a library named after directory
430   * order subdir searches correctly: lib first, src last
431   * assume 'testsuite' dir means we are using dejagnu
432 * maybe be smart about reading existing Makefile.am, so tool
433   can be run for incremental changes?  You could imagine:
435         Makefile.am:
436                 autoproject --incremental
438 ================================================================
440 Stuff NOT to do, and why:
442 consider auto-including any file that matches "*.in".
443   [ no: po/Makefile.in shouldn't be included ]
445 must look at mkid to see how it works (for subdir usage)
446   [ right now, it doesn't.  i don't see a simple fix right now ]
448 if configure.in not found, move up a directory and try again?  This
449 could eliminate a common source of problems.
450   [ this is just a bad idea ]
452 * scripts are installed in $exec_prefix/bin, not $prefix/bin
453   Bug or feature?
454   [ the consensus on Gnits is that this isn't required.
455     doubters can work around it anyway ]
457 * make the auto-dep code crash if GNU make not in use?
458   (doesn't it already?)