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