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