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