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