* automake.in (handle_configure): Don't modify variable which
[automake.git] / TODO
blob5bb791751e0ad5970f83d9ccbb15641a2390c4d2
2     Alexandre Oliva:
3     > Hmm...  Interesting.  It must have been a side effect of the enabling
4     > of forced `relink' on GNU/Linux/x86.  Anyway, on platforms that
5     > actually require relinking, this problem remains, and I see no way to
6     > overcome it other than arranging for automake to install libraries
7     > before executables, as you suggest.  This shouldn't be a big problem,
8     > anyway.
9     >
10     > A bigger problem could show up if two libraries in the same directory,
11     > one dependent on the other, are installed concurrently.  If relinking
12     > is needed for the dependent library, we have a problem.  It appears to
13     > me that user will have to live without `make -j install', in this
14     > case.
16     Alex Hornby
17     > Here's an Automake patch and changelog entry allow make -j install on
18     > such degenerate systems (and Linux with buggy libtool <g>)
19     >
20     > If you install to locations other that bin_ and lib_ then a larger fix
21     > is necessary, but this should fix the 90% case.
23 * in depend2.am, in specialization case, what if @SOURCE@ is found
24   in srcdir?  We can't depend on $<!  We must search explicitly.
25   this is a very serious problem!
26   one solution would be to make built-source handling smarter and
27   a bit more strict.  For instance require that built sources
28   have an associated target.  In this case we must also handle suffix
29   rules and the like.
31 * Document why putting @FOO@ in _SOURCES doesn't work.
32   This must be done for 1.5
34 * think about how per-object flags should work.  in particular:
35   * how should they be specified?
36     using the object name is confusing when .lo/.obj in use
37     however, the object name provides a nice interaction with
38     per-exe flags
39   * how should they interact with per-executable flags?
41 * cross-compilation support:
42   programs built and used by the build process need to be
43   built for CC_FOR_BUILD
44   introduce a new variable for this
45   [ we can do this in an automatic way I think.
46     unfortunately it isn't that useful until autoconf has support
47     for this sort of thing as well ]
49 * distcheck should make sure that each file that uses _() is
50   listed in POTFILES.in
51   From Jim Meyering:
52     # Verify that all source files using _() are listed in po/POTFILES.in.
53     po-check:
54             grep -E -v '^(#|$$)' po/POTFILES.in | sort > $@-1
55             grep -E -l '\b_\(' lib/*.c src/*.c | sort > $@-2
56             diff -u $@-1 $@-2
57             rm -f $@-1 $@-2
59 * support prog_LIBS as override for LIBS
61 * Scan configure.in using the same trick that autoheader uses.
62   This will be much more reliable.
64 * Test subdir-objects option with yacc, lex, ansi2knr
65   Our locking scheme won't prevent a parallel make from losing
66   if there are two `bar.o' files and the timing is just right
67   This only happens with parallel make and no-`-c -o' compiler,
68   so it probably isn't very important
69   `-c -o' when doing libtool
70   try to find a losing compiler and see if it really works.
71   (actually: hack config.cache and do it)
73 * We're using `$<' in explicit rules when using per-exe flags
74   per-exe flags don't work for CPPFLAGS/YFLAGS/LFLAGS.  Fix.
75   LIBOBJS shouldn't be used when there are per-exe flags (?)
77 * Need a way to pass flags to makeinfo
78   esp --no-split
80 * test `make clean' with subdir-objects
82 * Test nodist_SOURCES with lex, yacc, etc.
84 * Support subdir-objects with fortran
86 * Allow creation of Java .zip/.jar files in natural way
87   If you are building a compiled Java library, then the .zip/.jar
88   ought to be made automatically.
90 * Run automake before libtool.  It will report an error but
91   still won't put the file into the disty.  This is wrong.
92   From Mark H Wilkinson <mhw@kremvax.demon.co.uk>
94 * CFLAGS only defined if C source seen
95   but really it should be a configure variable, shouldn't it?
96   There are other examples of this
97   [ moving to autoconf --trace ought to fix this ]
99 * in gnu/gnits mode, give error if Makefile.am overrides a user
100   variable like CFLAGS.
101   [ this is low priority because the package author can always
102     circumvent our check by redefining in configure.in
103     plus it is probably better to encourage good behavior than to
104     punish bad ]
106 * If we see `foo.o' in LIBOBJS, and we've seen AC_OBJEXT, then complain.
107   [ how will we know that?  it is better to handle this automatically
108     via an autoconf hook ]
110 * examine possibility of using any character in a macro name
111   and rewriting names automatically.  this means we must rewrite
112   all references as well.
113   [ this is a 2.0-style feature ]
115 * AM_CONFIG_HEADER might generate the wrong stamp file names
116   when given multiple headers.  Write a test.
118 * Currently don't correctly handle multiple inputs to a config header.
120 * header stamp files still in wrong dirs.
121   stamp-h.in must be in dir with h.in file
122   stamp-h must be in dir with output file
124 * foo=bar
125   if cond
126   foo += joe
127   endif
128   ... this ought to work.  The fix is probably complicated
130 * `distcheck' and `dist' should depend on `all'
132 * Add code to generate foo-config script like gnome, gtk
134 * `DEFS += foo' won't work.
135   That's because DEFS is defined in header-vars.am, which is read
136   after the user's Makefile.am.
137   This will be a problem for any macro defined internally
138     [ fixing this will probably fix the nasty `exeext redefines
139       foo_PROGRAMS' hack that is in there right now ]
140     [ we currently give an error when this occurs, so this is very low
141       priority ]
143 * document user namespace for macro/target names
144   adopt some conventions and use uniformly
145     [ this is a good thing for the rewrite ]
147 * make distcheck uses directories like `=build'.
148   Some (very rare) POSIX systems don't support `=' in filenames.
149   If this ever becomes a problem, fix it
151 * distclean must remove config.status
152   can't this cause problems for maintainer-clean?
153   shouldn't maintainer-clean print the message before running
154   any part of the make?  (just to slow things down long enough
155   for the user to stop it)
156   (maybe doesn't matter since people who even know about
157   maintainer-clean already have a clue)
159 * There are probably more bugs in variable_conditions_sub along
160   the lines of the one that caused cond4.test to fail.
162 * reintroduce AM_FUNC_FNMATCH which sets LIBOBJS
163   Then have automake know about fnmatch.h.
164     [ probably should wait for autoconf to get right functionality ]
166 * Allow per-object cflags:
167         bin_PROGRAMS = foo
168         foo_CFLAGS = -DFOO
169 * per-object compiler flags do not apply to libobjs
170   -> give error in this case
171 * At the same time, allow sources in subdirs:
172         foo_SOURCES = x/y.c
173   This requires `mkdir x' at build time
174  [ both of these require per-file rules, and not pattern rules ]
175  [ use user-written suffix rules to generate the per-file rules in
176    an automatic way -- this would be mucho cool ]
178 * Every program foo has FOOFLAGS right now.
179   It should also have AM_FOOFLAGS, which can be set in Makefile.am.
180 DONE: but needs to be documented
182 * "make diff" capability
183   look at gcc's Makefile.in to see what to do
184   or look at maint program
186 * BUILT_SOURCES should not be distributed, even when they appear in
187   another _SOURCES line. [? or maybe just leave this up to the
188   to-be-defined generic distribution method ]
189   must completely revisit the entire BUILT_SOURCES idea
191 * in --cygnus, clean-info not generated at top level
193 * what if an element of a scanned variable looks like
194         $(FOO).$(BAR)  ?
195   or some other arbitrary thing?
196   right now we try to cope, but not very well
197     [ this is only of theoretical interest for now ]
199 * make sure every variable that is used is also defined
200     [ we don't really look at variable uses in detail.
201       2.0 thing ]
203 * make sure `missing' defines are generated
204 * if no AM_INIT_AUTOMAKE, then don't handle `missing' stuff.
205   Yuck!
206 * missing should handle install -d and rmdir -p (for uninstall)
208 * a couple ways to be smarter:
209   - notice when a .c file is a target somewhere, and auto-add it to
210     BUILT_SOURCES
211   - notice a target of the form `.x.y:' and assume it is a suffix rule
213 * NORMAL_INSTALL / NORMAL_UNINSTALL -vs- recursive rules
214   [ requires changes to the standard ]
216 * copyrights on m4 files, aclocal output
218 * should not put texiname_TEXINFOS into distribution
219   should rename this macro anyway, to foo_texi_DEPENDENCIES
221 * *all* installed scripts should support --version, --help
223 For now I guess I'll just have automake give an error if it encounters
224 non-C source in a libtool library specification.
226 * must split $obj into two parts: one for libtool and one for
227   deansification.  Otherwise .S files will be deansified!
229 * ansi2knr must currently appear in a directory that has some source
231 * if program has the same name as a target, do something sensible:
232   - if the target is internal, rename it
233   - if the target is mandated (eg, "info"), tell the user
234     consider auto-modifying the program name to work around this
236 * should separate actual options from strictness levels
237   strictness should only cover requirements
238   You should be able to pick and choose options
240 should clean up texinfos.am; one rule is repeated 3 times, but
241 shouldn't be
243 should always use perl -w
245 rewrite in guile (RMS request)
246 at the same time, consider adding a GUI
247 could use the same parsing code for the GUI and the standalone version
248 that means figuring out a better representation of internal state
249 [ that's easy -- anything is better than what we have now ]
251 having just one Makefile for a project would give a big speed increase
252 for a project with many directories, eg glibc.  ideally (?) you'd
253 still be able to have a Makefile.am in each directory somehow; this
254 might make editing conceptually easier.
256 * finish up TAGS work
257 * `acinstall'
259 * only remove libtool at top level?
261 * clean up source directory by moving stuff into subdirs
263 * consider adding pkglibexecdir, maybe others?
264   requests for pkg-dirs with version included
266 Avoid loops when installing; instead unroll them in automake
268 * for new autoconf:
269   * completely handle multi-":" mode for AC_CONFIG_HEADER
270   * Scan multiple input files when Makefile is generated?
271     This would provide flexibility for large projects; subsumes
272     the "Makefile.tmpl" idea
274    [ can't do this.  must explain why in manual.
275      basically, solving all the problems is too hard
276      like: how to remove redundancies between generated .in files
277      instead should implement `include' directive for Makefile.am ]
278 * for multi-":" mode and AC_OUTPUT, it might be good to pick the
279   first input file that has a corresponding .am file.
281 Some long-term projects:
282 * if $(FOO) is used somewhere, ensure FOO is defined, either by
283   user or by automake if possible
285 [ include, += support ]
286 * even better would be allowing targets in different included
287   fragments to be merged.  e.g., `install-local'.
289 consider putting all check-* targets onto @check?
290 To support --help/--version checking?
292 take diff-n-query code from libit
294 Per Bothner says:
295 Per> 1) Being able to build a set of non-source programs
296 Per> from source programs, without necessarily linking them together.
297 Per> I.e. one should be able to say something like:
298 Per>    dummy_SOURCES=foo.c bar.c
299 Per> and automake should realize that it needs to build foo.o and bar.o.
300 Per> 2) Being intelligent about new kinds of suffixes.
301 Per> If it sees:
302 Per>    SUFFIXES = .class .java
303 Per> and a suffix rule of the form:
304 Per>    .java.class:
305 Per> then it should be able to realize it can build .class files from
306 Per> .java files, and thus be able to generate a list of
307 Per> .class files from a list of .java source files.
309 !! Must fix require_file stuff.  It is really gross, and I don't
310    understand it any more.
312 Jim's idea: should look for @setfilename and warn if filenames too long
313 * guess split size
315 ** many requests for a way to omit a file from the distribution.
316    Should be done like `!foo' or `~foo' in _SOURCES, etc.
317    Such files should be removed explicitly after the copy step!
318    Doing this requires rewriting macros before generating Makefile.in.
320 from joerg-martin schwarz:
321  -- If Makefile.am contains $(CC), $(COMPILE), $(YLWRAP), ....
322     in an explicitly written rule,  you should emit the corresponding
323     Makefile variables automatically.
325 Configuring in the large:
326 * allow hierarchy of dirs to share one aclocal.m4
327   How?
329 consider printing full file name of Makefile.am or configure.in when
330 giving error.  This would help for very large trees with many
331 configure.in scripts
333 From the GNU Standards.  These things could be checked, and probably
334 should be if --gnu.
335 *    Make sure that the directory into which the distribution unpacks (as
336 well as any subdirectories) are all world-writable (octal mode 777).
337 *   Make sure that no file name in the distribution is more than 14
338 characters long.
339 *    Don't include any symbolic links in the distribution itself.
340      (ditto hard links)
341 *    Make sure that all the files in the distribution are world-readable.
342 ** also, check --help output and --version output.  Idea from François
343 * standards no longer prohibit ANSI C.  What does this imply
344   for the de-ansi-fication feature? [ must keep it -- some users rely on it ]
346 should be able to determine what is built by looking at rules (and
347 configure.in).  Then built man pages (eg) could automatically be
348 omitted from the distribution.
350 Henrik Frystyk Nielsen says:
351 Henrik> 4) Flags like --include-deps are lost when you make changes to
352 Henrik> Makefile.am files and automake is run automatically. It would
353 Henrik> be nice to keep these flags as I now have to redo everything
354 Henrik> manually.
355 ... what about other options here too?
357 Think about: maybe "make check" should just bomb if error occurs?
358 Then user must use "make -k check".  This is probably more natural.
360 Consider: "cvs" option adds some cvs-specific rules?
362 Right now, targets generated internally (eg "install") are not
363 overridable by user code.  This should probably be possible, even
364 though it isn't very important.  This could be done by generating all
365 internal rules via a function call instead of just appending to
366 $output_rules.
367  [ this will be harder to implement when scanning a rule like all-recursive
368    from subdirs.am ]
370 * Should be a way to have "nobuild_PROGRAMS" which aren't even built,
371   but which could be by running the magic make command.
373 Other priorities:
374 * Must rewrite am_install_var.  Should break into multiple functions.
375   This will allow the callers to be a little smarter.
376 * Rewrite clean targets.
377 * Must rewrite error handling code.  Right now it is a real mess
378   Should fix up require_file junk at the same time
380 djm wants ``LINKS'' variable; list of things to link together after
381 install.  In BSD environment, use:
382         LINKS = from1 to1 from2 to2 ...
384 Need way to say there are no suffixes in a Makefile (Franc,ois'
385 "override" idea suffices here)
387 Check to make sure various scripts are executable (IE when looking for
388 them in a directory)
390 Use recode in dist target when MAINT_CHARSET specified.  Read caveats
391 in automake.in before doing this.  Note the same problem used to apply
392 to the no-dependencies option; maybe it still should?  Note also that
393 each Makefile.am must be rewritten at "make dist" time if
394 MAINT_CHARSET and DIST_CHARSET are not identical.  NOTE: gettext must
395 arrange for all .po files not to be recoded.  In the long term this
396 might be a problem (consider when some systems use Unicode but the
397 rest do not)
398   MAINT_CHARSET *must* be local to each Makefile.am, to enable
399         merged distributions.
400   DIST_CHARSET must be passed down to subdir makes during a "make dist"
402 Handle dist-zoo.  Generally add more DOS support.  Maybe run "doschk"
403 (why isn't this merged with "pathchk"?) when doing a dist.  Do
404 whatever else François says here...
406 Add support for html via an option.  Use texi2html.  Use
407 "html_TEXINFOS", and htmldir = .../html.  Include html files in
408 distribution.  Also allow "html_DATA", for raw .html files.
409   [ when will texinfo directly support html? ]
411 uninstall and pkg-dirs should rm -rf the dir.
413 a potential bug: configure puts "blah.o" into LIBOBJS, thus implying
414 these files can't be de-ansified.  Not a problem?
415   [ fix by using ansi2knr wrapper program ]
417 In general most .am files should be merged into automake.  For
418 instance all the "clean" targets could be merged by keeping lists of
419 things to be removed.  This would be a lot nicer looking.  Note that
420 the install targets probably should not be merged; it is sometimes
421 useful to only install a small part.
423 Clean up the output:
424 * Order rules sensibly
425 * Ensure every line has a purpose.  Omit unused stuff
426 * Eliminate extraneous rules when possible (eg 'install-am' stuff)
427 * Make sure vertical spacing is correct
428 Omit program transform vars from header if no program installed.  This
429 is currently pretty hard to do.  (But with beautification code it
430 would probably be easy)
432 Lex, yacc support:
433 * It would be nice to automatically support using bison's better features
434   to rename the output files.  This requires autoconf support
435 * Consider supporting syntax from autoconf "derived:source", eg:
436         y.tab.c:perly.y
437   for yacc and lex source
438 * what if you use flex and the option to avoid -lfl?
439   should support this?
441 Multi-language support:
442 * should have mapping of file extensions to languages
443 * should automatically handle the linking issue (special-case C++)
444 * must get compile rules for various languages; FORTRAN probably
445   most important unimplemented language
446 This should be integrated in some way with Per's idea.
447 Eg .f.o rules should be recognized & auto-handled in _SOURCES
448 That way any random language can be treated with C/C++ on a first-class
449 basis (maybe)
451 It might be cool to generate .texi dependencies by grepping for
452 @include.  (If done, it should be done the same way C dependencies are
453 done)
455 It would be good to check some parts of GNU standards.  Already check
456 for install-sh and mkinstalldirs.  What else is required to be in
457 package by GNU standards or by automake?
458 Some things for --strictness=gnits:
459 * "cd $(foo); something" is an error in a rule.  Should be:
460   "cd $(foo) && something"
461 * Look for 'ln -s' and warn about using $(LN) and AC_PROG_LN_S
462 * Look for $(LN) and require AC_PROG_LN_S
464 Auto-distribute "ChangeLog.[0-9]+"?  "ChangeLog.[a-z]+"?
466 Internationalize. [ gettext doesn't have the necessary machinery yet ]
467 am_error should use printf-style arguments (for eventual gettext scheme)
469 François says the ordering of files in a distribution should be as follows:
470 * README
471 * source files
472 * derived files
473 I agree, but I don't see how to implement this yet.
474 It might be easier if "derived files" is limited to those that
475 Automake itself knows about, eg output of yacc.
477 Check all source files to make sure that FSF address is up-to-date.
478 --gnits or --gnu only.
480 Merge each -vars.am file with corresponding ".am" file.  Can do this
481 because of changes to &file_contents.
483 Should libexec programs have the name transform done on them?
485 Order the output rules sensibly, so FOO_SOURCES and FOO_OBJECTS are
486 together and rules are in the usual order.
488 Make the output minimal: only output definitions for variables that
489 are used.
491 djm says:
492 David> To avoid comments like the one about subdirs getting buried in
493 David> the middle of a Makefile.in, how about pushing comments that
494 David> start with ### to the top of the Makefile.in (in order)?  Sort
495 David> of like how Autoconf uses diversions to force initialization
496 David> code to the top of configure.
498 Karl Berry says:
499 Karl> 2) Your Makefile variable names are generally uppercase, but GNU
500 Karl> generally uses lowercase. Not that it matters :-).
502 ================================================================
504 Stuff for aclocal:
506 probably should put each group of m4 files into a subdir owned by the
507 containing application.
509 ================================================================
511 Document:
513 AM_MISSING_PROG
515 how to use the generated makefiles
516  - standard targets
517  - required targets
518  - NORMAL_INSTALL junk
520 what goes in AC_CONFIG_AUX_DIR
522 multi-":" mode in AC_OUTPUT -- automake only looks at the first file
523     also a note on how a .am file is found in this case
525 rationale for avoiding
526         make CFLAGS="$CFLAGS" ...
527 in subdirs make rule
529 a package that installs its own aclocal macros
531 write example of using automake with dejagnu
532 follow calc example in dejagnu docs
534 document which variables are actually scanned and which are not.
536 Document customary ordering of Makefile.am.  From François.
538 Should include extended version of diagram from Autoconf (suggested by
539 Greg Woods)
541 Make a definition of the term "source"
543 document how to use Automake with CVS.  Idea from Mark Galassi.  Also
544 include Greg Woods' more sophisticated "cvs-dist" target.
546 document rebuilding configure.  CONFIGURE_DEPENDENCIES
547 CONFIG_STATUS_DEPENDENCIES
549 -- must document all variables that are supposed
550    to be public knowledge
552 must document the targets required for integration with
553 non-automake-using subdirs
555 document the "make SHELL='/bin/sh -x'" trick for debugging
557 section on relationship to GNU make.  include notes on parallel makes
559 add a concept index
561 move discussion of cygwin32, etags, mkid under other gnu tools
563 CCLD, CXXLD, FLD
565 ================================================================
567 Things to do for gcc:
569 Regularize dependency generation.  Add new flags:
571 -MH   Generate a dummy dependency for each header file mentioned.
572 -MT NAME
573       Set name of target
574 -MF NAME
575       Set name of output file
577 Then automake can use -MD -MH -MT 'foo.o foo.lo' -MF .deps/...
579 ================================================================
581 Things to do for autoconf:
583 * patch autoreconf to run automake and aclocal.  I've done this but it is
584   not really available.  It can't be made available until automake
585   is officially released
587 ================================================================
589 Libraries:
591 * Should support standalone library along with subdir library in same
592   Makefile.am.  Maybe: turn off "standalone" mode if library's Makefile.am
593   is not only one specd? [ add an option for this ]
595 ================================================================
597 Longer term:
599 Would it be useful to integrate in some way with the Debian package
600 building utility?  Must check.  maybe it would be possible to deal
601 with all the different package utilities somehow.  Lately I've been
602 hearing good things about the RedHat packaging utilities.  Why are
603 there so many of these?  Are they fun to write or something?
604 The RedHat package utility is called RPM; see
605         ftp://ftp.redhat.com/pub/code/rpm
606 It actually has problems, like no configure script and no documentation.
608 For Cygnus it would probably be good to be able to handle the native
609 package utility on each platform.  There are probably 3 or 4 of these
610 (sysv, solaris?, aix?)
612 tcl/unix/Makefile.in has some code to generate a Solaris package.
614 Automake probably can't do all of this on its own.  A new tool might
615 be a better idea
617 I have some notes from a Debian developer on how the integration
618 should work
620 ================================================================
622 A tool to guess what the local Makefile.am should look like:
623 (see Gord's Maint program!)
625 * Probably integrate with autoscan
626 * Use various simple rules to determine what to do:
627   * get name of top directory, sans version info
628   * search for .c files with 'main' in them
629     * if in main.c, use directory name for program
630     * if in more than one, generate multiple programs
631     * if not found, generate a library named after directory
632   * order subdir searches correctly: lib first, src last
633   * assume 'testsuite' dir means we are using dejagnu
634 * maybe be smart about reading existing Makefile.am, so tool
635   can be run for incremental changes?  You could imagine:
637         Makefile.am:
638                 autoproject --incremental
640 ================================================================
642 Stuff NOT to do, and why:
644 consider auto-including any file that matches "*.in".
645   [ no: po/Makefile.in shouldn't be included ]
647 must look at mkid to see how it works (for subdir usage)
648   [ right now, it doesn't.  i don't see a simple fix right now ]
650 if configure.in not found, move up a directory and try again?  This
651 could eliminate a common source of problems.
652   [ this is just a bad idea ]
654 * scripts are installed in $exec_prefix/bin, not $prefix/bin
655   Bug or feature?
656   [ the consensus on Gnits is that this isn't required.
657     doubters can work around it anyway ]
659 * make the auto-dep code crash if GNU make not in use?
660   (doesn't it already?)
662 Looked at a program called 'ezmake', which seems to do something
663 similar.  The only idea there that is possibly worth stealing is using
664 globs in definitions.  Also has negations.  Eg in a directory with
665 files a.c, b.c and c.c, the line:
666         foo_SOURCES = *.c ~c.c
667 would be equivalent to:
668         foo_SOURCES = a.c b.c
669 Is this worth implementing?
670   [ No... it is more reliable to spell everything out. ]
672 Scan source directories and warn about missing files, eg .c/.h files
673 that aren't mentioned?
674   [ distcheck makes this less useful ]
676 * quoting bugs
677   - how to install file with a space in its name?
678   [ don't bother with this -- make is just too losing ]