* canon5.test (bin_PROGRAMS): New file.
[automake.git] / TODO
blob4f1210b04e308d13428f3b74cc6d4a57c9cc9282
1 * Test subdir-objects option with yacc, lex, ansi2knr
2   Our locking scheme won't prevent a parallel make from losing
3   if there are two `bar.o' files and the timing is just right
4   This only happens with parallel make and no-`-c -o' compiler,
5   so it probably isn't very important
6   `-c -o' when doing libtool
7   try to find a losing compiler and see if it really works.
8   (actually: hack config.cache and do it)
10 * test `make clean' with subdir-objects
12 * Test nodist_SOURCES with lex, yacc, etc.
14 * Support subdir-objects with fortran
16 * Allow creation of Java .zip/.jar files in natural way
18 * Run automake before libtool.  It will report an error but
19   still won't put the file into the disty.  This is wrong.
20   From Mark H Wilkinson <mhw@kremvax.demon.co.uk>
22 * CFLAGS only defined if C source seen
23   but really it should be a configure variable, shouldn't it?
24   There are other examples of this
26 * in gnu/gnits mode, give error if Makefile.am overrides a user
27   variable like CFLAGS.
29 * If we see `foo.o' in LIBOBJS, and we've seen AC_OBJEXT, then complain.
31 * using "include" inside a conditional doesn't currently
32   work properly.
34 * examine possibility of using any character in a macro name
35   and rewriting names automatically.  this means we must rewrite
36   all references as well.
38 * AM_CONFIG_HEADER might generate the wrong stamp file names
39   when given multiple headers.  Write a test.
41 * Currently don't correctly handle multiple inputs to a config header.
43 * header stamp files still in wrong dirs.
44   stamp-h.in must be in dir with h.in file
45   stamp-h must be in dir with output file
47 * foo=bar
48   if cond
49   foo += joe
50   endif
51   ... this ought to work.  The fix is probably complicated
53 * `distcheck' and `dist' should depend on `all'
55 * Document why putting @FOO@ in _SOURCES doesn't work.
56   Make it an error when the user tries to do this
58 * Add code to generate foo-config script like gnome, gtk
60 * `DEFS += foo' won't work.
61   That's because DEFS is defined in header-vars.am, which is read
62   after the user's Makefile.am.
63   This will be a problem for any macro defined internally
64     [ fixing this will probabl fix the nasty `exeext redefines
65       foo_PROGRAMS' hack that is in there right now ]
66   In some cases this is unfixable.  In these cases we should give
67   an error.  This can be done by keeping track of whether a macro
68   was assigned with `=' or `+=', and having define_variable give
69   an error if the variable exists and was defined with +=.
71 * document user namespace for macro/target names
72   adopt some conventions and use uniformly
73     [ this is a good thing for the rewrite ]
75 * make distcheck uses directories like `=build'.
76   Some (very rare) POSIX systems don't support `=' in filenames.
77   If this ever becomes a problem, fix it
79 * distclean must remove config.status
80   can't this cause problems for maintainer-clean?
81   shouldn't maintainer-clean print the message before running
82   any part of the make?  (just to slow things down long enough
83   for the user to stop it)
84   (maybe doesn't matter since people who even know about
85   maintainer-clean already have a clue)
87 * There are probably more bugs in variable_conditions_sub along
88   the lines of the one that caused cond4.test to fail.
90 * give user more control over -I flags
91   in particular document a way to override the defaults
93 * reintroduce AM_FUNC_FNMATCH which sets LIBOBJS
94   Then have automake know about fnmatch.h.
95     [ probably should wait for autoconf to get right functionality ]
97 * Add a conditional for dependency tracking
98   (what to name it is the biggest problem here)
99   (because we want it to flag dist/no-dist -- not just deps)
100     [ this might not really be correctly doable.
101       instead we need a compile-time conditional for this
102       yuck ]
104 * Allow per-object cflags:
105         bin_PROGRAMS = foo
106         foo_CFLAGS = -DFOO
107 * At the same time, allow sources in subdirs:
108         foo_SOURCES = x/y.c
109   This requires `mkdir x' at build time
110  [ both of these require per-file rules, and not pattern rules ]
111  [ use user-written suffix rules to generate the per-file rules in
112    an automatic way -- this would be mucho cool ]
114 * Allow for multiple translations of a texinfo file:
115         LL_info_TEXINFOS = ...
116   will put info files for language LL into $(infodir)/LL.
118 * If you suppress an internal variable by specifying a variable
119   in a Makefile.am, but the variable is conditional, then automake
120   should generate the internal variable conditionally.
121   You have to scan the map of all conditions and fill in the holes here
123 * Every program foo has FOOFLAGS right now.
124   It should also have AM_FOOFLAGS, which can be set in Makefile.am.
125 DONE: but needs to be documented
127 * Should be able to update files that would be installed with -a
128   (--force?)
130 * "make diff" capability
131   look at gcc's Makefile.in to see what to do
132   or look at maint program
134 * Karl wants to be able to set LIBS and LDFLAGS at build time, like CFLAGS
135   maybe we need something more general?
137 * add $(srcdir)/ before some dependencies?
139 * define LINK if a program is mentioned, even if no C sources appear
141 * BUILT_SOURCES should not be distributed, even when they appear in
142   another _SOURCES line. [? or maybe just leave this up to the
143   to-be-defined generic distribution method ]
144   must completely revisit the entire BUILT_SOURCES idea
146 * in --cygnus, clean-info not generated at top level
148 * what if an element of a scanned variable looks like
149         $(FOO).$(BAR)  ?
150   or some other arbitrary thing?
151   right now we try to cope, but not very well
153 * if `interlock' exists, that should be an error (?)
154   should also warn about using new ylwrap and not old one
155   only do this when looking for ylwrap
157 ** make sure every variable that is used is also defined
159 * make sure `missing' defines are generated
160 * if no AM_INIT_AUTOMAKE, then don't handle `missing' stuff.
161   Yuck!
162 * missing should handle install -d and rmdir -p (for uninstall)
164 * a couple ways to be smarter:
165   - notice when a .c file is a target somewhere, and auto-add it to
166     BUILT_SOURCES
167   - notice a target of the form `.x.y:' and assume it is a suffix rule
170 * NORMAL_INSTALL / NORMAL_UNINSTALL -vs- recursive rules
171   [ requires changes to the standard ]
173 * cross-compilation support:
174   programs built and used by the build process need to be
175   built for CC_FOR_BUILD
176   introduce a new variable for this
178 * if foo.y is a source, foo.h isn't auto-distributed?
180 * copyrights on m4 files, aclocal output
182 * is there a way to add a directory and then have "make" do all the
183   updating?  think.
185 * put standards.texi into distribution
188 * should not put texiname_TEXINFOS into distribution
189   should rename this macro anyway, to foo_texi_DEPENDENCIES
191 * *all* installed scripts should support --version, --help
193 For now I guess I'll just have automake give an error if it encounters
194 non-C source in a libtool library specification.
196 * must split $obj into two parts: one for libtool and one for
197   deansification.  Otherwise .S files will be deansified!
199 * ansi2knr must currently appear in a directory that has some source
201 * if program has the same name as a target, do something sensible:
202   - if the target is internal, rename it
203   - if the target is mandated (eg, "info"), tell the user
204     consider auto-modifying the program name to work around this
206 * should separate actual options from strictness levels
207   strictness should only cover requirements
208   You should be able to pick and choose options
210 should clean up texinfos.am; one rule is repeated 3 times, but
211 shouldn't be
213 should always use perl -w
215 rewrite in guile (RMS request)
216 at the same time, consider adding a GUI
217 could use the same parsing code for the GUI and the standalone version
218 that means figuring out a better representation of internal state
219 [ that's easy -- anything is better than what we have now ]
221 having just one Makefile for a project would give a big speed increase
222 for a project with many directories, eg glibc.  ideally (?) you'd
223 still be able to have a Makefile.am in each directory somehow; this
224 might make editing conceptually easier.
226 * finish up TAGS work
227 * `acinstall'
228 * put parser.h into distribution if "yacc -d" is used
230 * only remove libtool at top level?
232 * clean up source directory by moving stuff into subdirs
234 * consider adding pkglibexecdir, maybe others?
235   requests for pkg-dirs with version included
237 Avoid loops when installing; instead unroll them in automake
239 * for new autoconf:
240   * completely handle multi-":" mode for AC_CONFIG_HEADER
241   * Scan multiple input files when Makefile is generated?
242     This would provide flexibility for large projects; subsumes
243     the "Makefile.tmpl" idea
245    [ can't do this.  must explain why in manual.
246      basically, solving all the problems is too hard
247      like: how to remove redundancies between generated .in files
248      instead should implement `include' directive for Makefile.am ]
249 * for multi-":" mode and AC_OUTPUT, it might be good to pick the
250   first input file that has a corresponding .am file.
252 Some long-term projects:
253 * if $(FOO) is used somewhere, ensure FOO is defined, either by
254   user or by automake if possible
256 [ include, += support ]
257 * even better would be allowing targets in different included
258   fragments to be merged.  e.g., `install-local'.
260 consider putting all check-* targets onto @check?
261 To support --help/--version checking?
263 take diff-n-query code from libit
265 Per Bothner says:
266 Per> 1) Being able to build a set of non-source programs
267 Per> from source programs, without necessarily linking them together.
268 Per> I.e. one should be able to say something like:
269 Per>    dummy_SOURCES=foo.c bar.c
270 Per> and automake should realize that it needs to build foo.o and bar.o.
271 Per> 2) Being intelligent about new kinds of suffixes.
272 Per> If it sees:
273 Per>    SUFFIXES = .class .java
274 Per> and a suffix rule of the form:
275 Per>    .java.class:
276 Per> then it should be able to realize it can build .class files from
277 Per> .java files, and thus be able to generate a list of
278 Per> .class files from a list of .java source files.
280 !! Must fix require_file stuff.  It is really gross, and I don't
281    understand it any more.
283 * error messages should print ``[info blah blah]'' command when a
284   certain part of the standards apply.  saw idea in message from
285   Craig Burley.  wouldn't it be really cool if compile-mode in Emacs
286   understood this convention, and you could click on such text to
287   go to the appropriate info page?  [ I think you can ]
289 Jim's idea: should look for @setfilename and warn if filenames too long
290 * guess split size
292 ** many requests for a way to omit a file from the distribution.
293    Should be done like `!foo' or `~foo' in _SOURCES, etc.
294    Such files should be removed explicitly after the copy step!
295    Doing this requires rewriting macros before generating Makefile.in.
297 from joerg-martin schwarz:
298  -- If Makefile.am contains $(CC), $(COMPILE), $(YLWRAP), .... 
299     in an explicitly written rule,  you should emit the corresponding
300     Makefile variables automatically.
302 Configuring in the large:
303 * allow hierarchy of dirs to share one aclocal.m4
304   How?
306 consider printing full file name of Makefile.am or configure.in when
307 giving error.  This would help for very large trees with many
308 configure.in scripts
310 From the GNU Standards.  These things could be checked, and probably
311 should be if --gnu.
312 *    Make sure that the directory into which the distribution unpacks (as
313 well as any subdirectories) are all world-writable (octal mode 777).
314 *   Make sure that no file name in the distribution is more than 14
315 characters long.
316 *    Don't include any symbolic links in the distribution itself.
317      (ditto hard links)
318 *    Make sure that all the files in the distribution are world-readable.
319 ** also, check --help output and --version output.  Idea from François
320 * standards no longer prohibit ANSI C.  What does this imply
321   for the de-ansi-fication feature? [ must keep it -- some users rely on it ]
323 should be able to determine what is built by looking at rules (and
324 configure.in).  Then built man pages (eg) could automatically be
325 omitted from the distribution.
327 Idea from Joerg-Martin Schwarz: allow passing different -D flags to
328 different compiles.  This can be done, but with the restriction that a
329 .c cannot appear in 2 different "objects" (programs/libraries)
330 compiled with different -D options (because -c and -o do not always
331 work together and parallel makes must work).  This could be
332 implemented by noticing whenever a ".o" target with no rules is being
333 emitted, and adding the appropriate compilation rule as appropriate.
334 This should work with targets from Makefile.am as well as from .P
335 files, which means rewriting so that the Makefile.am contents aren't
336 copied into the output immediately.
337  [ this could be probably done more directly by examining the sources
338    as we scan Makefile.am ]
340 Henrik Frystyk Nielsen says:
341 Henrik> 4) Flags like --include-deps are lost when you make changes to
342 Henrik> Makefile.am files and automake is run automatically. It would
343 Henrik> be nice to keep these flags as I now have to redo everything
344 Henrik> manually.
345 ... what about other options here too?
347 Think about: maybe "make check" should just bomb if error occurs?
348 Then user must use "make -k check".  This is probably more natural.
350 Consider: "cvs" option adds some cvs-specific rules?
352 Right now, targets generated internally (eg "install") are not
353 overridable by user code.  This should probably be possible, even
354 though it isn't very important.  This could be done by generating all
355 internal rules via a function call instead of just appending to
356 $output_rules.
357  [ this will be harder to implement when scanning a rule like all-recursive
358    from subdirs.am ]
360 * Should be a way to have "nobuild_PROGRAMS" which aren't even built,
361   but which could be by running the magic make command.
363 Other priorities:
364 * Must rewrite am_install_var.  Should break into multiple functions.
365   This will allow the callers to be a little smarter.
366 * Rewrite clean targets.
367 * Must rewrite error handling code.  Right now it is a real mess
368   Should fix up require_file junk at the same time
370 djm wants ``LINKS'' variable; list of things to link together after
371 install.  In BSD environment, use:
372         LINKS = from1 to1 from2 to2 ...
374 Need way to say there are no suffixes in a Makefile (Franc,ois'
375 "override" idea suffices here)
377 Check to make sure various scripts are executable (IE when looking for
378 them in a directory)
380 Use recode in dist target when MAINT_CHARSET specified.  Read caveats
381 in automake.in before doing this.  Note the same problem used to apply
382 to the no-dependencies option; maybe it still should?  Note also that
383 each Makefile.am must be rewritten at "make dist" time if
384 MAINT_CHARSET and DIST_CHARSET are not identical.  NOTE: gettext must
385 arrange for all .po files not to be recoded.  In the long term this
386 might be a problem (consider when some systems use Unicode but the
387 rest do not)
388   MAINT_CHARSET *must* be local to each Makefile.am, to enable
389         merged distributions.
390   DIST_CHARSET must be passed down to subdir makes during a "make dist"
392 Handle dist-zoo.  Generally add more DOS support.  Maybe run "doschk"
393 (why isn't this merged with "pathchk"?) when doing a dist.  Do
394 whatever else François says here...
396 Add support for html via an option.  Use texi2html.  Use
397 "html_TEXINFOS", and htmldir = .../html.  Include html files in
398 distribution.  Also allow "html_DATA", for raw .html files.
399   [ when will texinfo directly support html? ]
401 uninstall and pkg-dirs should rm -rf the dir.
403 a potential bug: configure puts "blah.o" into LIBOBJS, thus implying
404 these files can't be de-ansified.  Not a problem?
405   [ fix by using ansi2knr wrapper program ]
407 In general most .am files should be merged into automake.  For
408 instance all the "clean" targets could be merged by keeping lists of
409 things to be removed.  This would be a lot nicer looking.  Note that
410 the install targets probably should not be merged; it is sometimes
411 useful to only install a small part.
413 Clean up the output:
414 * Order rules sensibly
415 * Ensure every line has a purpose.  Omit unused stuff
416 * Eliminate extraneous rules when possible (eg 'install-am' stuff)
417 * Make sure vertical spacing is correct
418 Omit program transform vars from header if no program installed.  This
419 is currently pretty hard to do.  (But with beautification code it
420 would probably be easy)
422 Lex, yacc support:
423 * It would be nice to automatically support using bison's better features
424   to rename the output files.  This requires autoconf support
425 * Consider supporting syntax from autoconf "derived:source", eg:
426         y.tab.c:perly.y
427   for yacc and lex source
428 * what if you use flex and the option to avoid -lfl?
429   should support this?
431 Multi-language support:
432 * should have mapping of file extensions to languages
433 * should automatically handle the linking issue (special-case C++)
434 * must get compile rules for various languages; FORTRAN probably
435   most important unimplemented language
436 This should be integrated in some way with Per's idea.
437 Eg .f.o rules should be recognized & auto-handled in _SOURCES
438 That way any random language can be treated with C/C++ on a first-class
439 basis (maybe)
441 It might be cool to generate .texi dependencies by grepping for
442 @include.  (If done, it should be done the same way C dependencies are
443 done)
445 It would be good to check some parts of GNU standards.  Already check
446 for install-sh and mkinstalldirs.  What else is required to be in
447 package by GNU standards or by automake?
448 Some things for --strictness=gnits:
449 * "cd $(foo); something" is an error in a rule.  Should be:
450   "cd $(foo) && something"
451 * Look for 'ln -s' and warn about using $(LN) and AC_PROG_LN_S
452 * Look for $(LN) and require AC_PROG_LN_S
454 Auto-distribute "ChangeLog.[0-9]+"?  "ChangeLog.[a-z]+"?
456 Internationalize. [ gettext doesn't have the necessary machinery yet ]
457 am_error should use printf-style arguments (for eventual gettext scheme)
459 François says the ordering of files in a distribution should be as follows:
460 * README
461 * source files
462 * derived files
463 I agree, but I don't see how to implement this yet.
464 It might be easier if "derived files" is limited to those that
465 Automake itself knows about, eg output of yacc.
467 Check all source files to make sure that FSF address is up-to-date.
468 --gnits or --gnu only.
470 Merge each -vars.am file with corresponding ".am" file.  Can do this
471 because of changes to &file_contents.
473 Should libexec programs have the name transform done on them?
475 Order the output rules sensibly, so FOO_SOURCES and FOO_OBJECTS are
476 together and rules are in the usual order.
478 Make the output minimal: only output definitions for variables that
479 are used.
481 djm says:
482 David> To avoid comments like the one about subdirs getting buried in
483 David> the middle of a Makefile.in, how about pushing comments that
484 David> start with ### to the top of the Makefile.in (in order)?  Sort
485 David> of like how Autoconf uses diversions to force initialization
486 David> code to the top of configure.
488 Karl Berry says:
489 Karl> 2) Your Makefile variable names are generally uppercase, but GNU
490 Karl> generally uses lowercase. Not that it matters :-).
492 ================================================================
494 Stuff for aclocal:
496 probably should put each group of m4 files into a subdir owned by the
497 containing application.
499 ================================================================
501 Document:
503 AM_MISSING_PROG
505 how to use the generated makefiles
506  - standard targets
507  - required targets
508  - NORMAL_INSTALL junk
510 what goes in AC_CONFIG_AUX_DIR
512 multi-":" mode in AC_OUTPUT -- automake only looks at the first file
513     also a note on how a .am file is found in this case
515 rationale for avoiding
516         make CFLAGS="$CFLAGS" ...
517 in subdirs make rule
519 a package that installs its own aclocal macros
521 write example of using automake with dejagnu
522 follow calc example in dejagnu docs
524 document which variables are actually scanned and which are not.
526 Document customary ordering of Makefile.am.  From François.
528 Should include extended version of diagram from Autoconf (suggested by
529 Greg Woods)
531 Make a definition of the term "source"
533 document how to use Automake with CVS.  Idea from Mark Galassi.  Also
534 include Greg Woods' more sophisticated "cvs-dist" target.
536 document rebuilding configure.  CONFIGURE_DEPENDENCIES
537 CONFIG_STATUS_DEPENDENCIES
539 -- must document all variables that are supposed
540    to be public knowledge
542 must document the targets required for integration with
543 non-automake-using subdirs
545 document the "make SHELL='/bin/sh -x'" trick for debugging
547 section on relationship to GNU make.  include notes on parallel makes
549 add a concept index
551 move discussion of cygwin32, etags, mkid under other gnu tools
553 CCLD, CXXLD, FLD
555 ================================================================
557 Things to do for gcc:
559 Regularize dependency generation.  Add new flags:
561 -MH   Generate a dummy dependency for each header file mentioned.
562 -MT NAME
563       Set name of target
564 -MF NAME
565       Set name of output file
567 Then automake can use -MD -MH -MT 'foo.o foo.lo' -MF .deps/...
569 ================================================================
571 Things to do for autoconf:
573 * patch autoreconf to run automake and aclocal.  I've done this but it is
574   not really available.  It can't be made available until automake
575   is officially released
577 ================================================================
579 Libraries:
581 * Should support standalone library along with subdir library in same
582   Makefile.am.  Maybe: turn off "standalone" mode if library's Makefile.am
583   is not only one specd? [ add an option for this ]
585 ================================================================
587 Longer term:
589 Would it be useful to integrate in some way with the Debian package
590 building utility?  Must check.  maybe it would be possible to deal
591 with all the different package utilities somehow.  Lately I've been
592 hearing good things about the RedHat packaging utilities.  Why are
593 there so many of these?  Are they fun to write or something?
594 The RedHat package utility is called RPM; see
595         ftp://ftp.redhat.com/pub/code/rpm
596 It actually has problems, like no configure script and no documentation.
598 For Cygnus it would probably be good to be able to handle the native
599 package utility on each platform.  There are probably 3 or 4 of these
600 (sysv, solaris?, aix?)
602 tcl/unix/Makefile.in has some code to generate a Solaris package.
604 Automake probably can't do all of this on its own.  A new tool might
605 be a better idea
607 I have some notes from a Debian developer on how the integration
608 should work
610 ================================================================
612 A tool to guess what the local Makefile.am should look like:
613 (see Gord's Maint program!)
615 * Probably integrate with autoscan
616 * Use various simple rules to determine what to do:
617   * get name of top directory, sans version info
618   * search for .c files with 'main' in them
619     * if in main.c, use directory name for program
620     * if in more than one, generate multiple programs
621     * if not found, generate a library named after directory
622   * order subdir searches correctly: lib first, src last
623   * assume 'testsuite' dir means we are using dejagnu
624 * maybe be smart about reading existing Makefile.am, so tool
625   can be run for incremental changes?  You could imagine:
627         Makefile.am:
628                 autoproject --incremental
630 ================================================================
632 Stuff NOT to do, and why:
634 consider auto-including any file that matches "*.in".
635   [ no: po/Makefile.in shouldn't be included ]
637 must look at mkid to see how it works (for subdir usage)
638   [ right now, it doesn't.  i don't see a simple fix right now ]
640 if configure.in not found, move up a directory and try again?  This
641 could eliminate a common source of problems.
642   [ this is just a bad idea ]
644 * scripts are installed in $exec_prefix/bin, not $prefix/bin
645   Bug or feature?
646   [ the consensus on Gnits is that this isn't required.
647     doubters can work around it anyway ]
649 * make the auto-dep code crash if GNU make not in use?
650   (doesn't it already?)
652 Looked at a program called 'ezmake', which seems to do something
653 similar.  The only idea there that is possibly worth stealing is using
654 globs in definitions.  Also has negations.  Eg in a directory with
655 files a.c, b.c and c.c, the line:
656         foo_SOURCES = *.c ~c.c
657 would be equivalent to:
658         foo_SOURCES = a.c b.c
659 Is this worth implementing?
660   [ No... it is more reliable to spell everything out. ]
662 Scan source directories and warn about missing files, eg .c/.h files
663 that aren't mentioned?
664   [ distcheck makes this less useful ]
666 * quoting bugs
667   - how to install file with a space in its name?
668   [ don't bother with this -- make is just too losing ]