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