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