typo
[automake.git] / TODO
blob2f6aa2ac509a663392a200dee186b0995a182eb0
1 We should arrange so that install-%DIR%%PRIMARY% is run conditionally
2 when %DIR%_%PRIMARY% is defined conditionally.  Currently it is always
3 run, and that will therefore always create %DIR% (unless %DIR%dir is
4 also defined conditionally).  Likewise, installdirs should not
5 create %DIR% in conditions were no %DIR%_%PRIMARY% is enabled.
7 we can't seem to AC_SUBST(pkgdatadir)
8 the version from header-vars overrides
9 why is that?
11 check should depend on all
12   from ben elliston
14 the new YFLAGS code doesn't correctly handle srcdir
16 allow foo_NAME to rename an object (library or program)
17 at build/install time
19 remove _LTLIBRARIES and just use _LIBRARIES
20 then use this for zip/jar as well
22 for 1.5
23 investigate problems with conditionally defined libraries
25 add an error if the user makefile.am violates our
26    namespace rules
28 we need a document describing automake from the end user's point of view
29 eg describe INSTALL_HEADER there, among other things
31 * maintainer-clean
33 Akim:
34 > @@ -31,5 +31,9 @@
35 >  DISTCLEAN    -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES)
37 >  maintainer-clean-generic:
38 > +## FIXME: shouldn't we really print these messages before running
39 > +## the dependencies?
40 > +     @echo "This command is intended for maintainers to use"
41 > +     @echo "it deletes files that may require special tools to rebuild."
42 >         -rm -f Makefile.in
44 Tom:
45 > I'd like to eventually fix the FIXME comment by having
46 > maintainer-clean look like:
48 >     maintainer-clean:
49 >         @echo ...
50 >         $(MAKE) whatever
52 > We're left with the question of whether we should repeat them in every
53 > subdir.
56 Alexandre Oliva:
57 > Hmm...  Interesting.  It must have been a side effect of the enabling
58 > of forced `relink' on GNU/Linux/x86.  Anyway, on platforms that
59 > actually require relinking, this problem remains, and I see no way to
60 > overcome it other than arranging for automake to install libraries
61 > before executables, as you suggest.  This shouldn't be a big problem,
62 > anyway.
64 > A bigger problem could show up if two libraries in the same directory,
65 > one dependent on the other, are installed concurrently.  If relinking
66 > is needed for the dependent library, we have a problem.  It appears to
67 > me that user will have to live without `make -j install', in this
68 > case.
70 Alex Hornby
71 > Here's an Automake patch and changelog entry allow make -j install on
72 > such degenerate systems (and Linux with buggy libtool <g>)
74 > If you install to locations other that bin_ and lib_ then a larger fix
75 > is necessary, but this should fix the 90% case.
77 * think about how per-object flags should work.  in particular:
78   * how should they be specified?
79     using the object name is confusing when .lo/.obj in use
80     however, the object name provides a nice interaction with
81     per-exe flags
82   * how should they interact with per-executable flags?
83   [ this is probably a feature in search of a problem ]
85 * cross-compilation support:
86   programs built and used by the build process need to be
87   built for CC_FOR_BUILD
88   introduce a new prefxi for this, e.g. `build_PROGRAMS'
89   [ we can do this in an automatic way I think.
90     unfortunately it isn't that useful until autoconf has support
91     for this sort of thing as well ]
93 * distcheck should make sure that each file that uses _() is
94   listed in POTFILES.in
95   From Jim Meyering:
96     # Verify that all source files using _() are listed in po/POTFILES.in.
97     po-check:
98             grep -E -v '^(#|$$)' po/POTFILES.in | sort > $@-1
99             grep -E -l '\b_\(' lib/*.c src/*.c | sort > $@-2
100             diff -u $@-1 $@-2
101             rm -f $@-1 $@-2
103 * one performance enhancement would be to have autoconf write
104   a single file containing all the macro assignments.
105   then read this file via `include'
106   unfortunately this can't be done because of conditionals
107   -- but it could be made to work if we also changed:
108     * automake to rewrite @FOO@ to $(FOO), and
109     * the implementation of conditionals to rely on some new
110       config.status magic
112 * support prog_LIBS as override for LIBS
114 * Test subdir-objects option with yacc, lex, ansi2knr
115   Our locking scheme won't prevent a parallel make from losing
116   if there are two `bar.o' files and the timing is just right
117   This only happens with parallel make and no-`-c -o' compiler,
118   so it probably isn't very important
119   `-c -o' when doing libtool
120   try to find a losing compiler and see if it really works.
121   (actually: hack config.cache and do it)
123 * per-exe flags
124 ** LIBOBJS shouldn't be used when there are per-exe flags (?)
126 * Support subdir-objects with fortran
128 * Allow creation of Java .zip/.jar files in natural way
129   If you are building a compiled Java library, then the .zip/.jar
130   ought to be made automatically.
132 * Run automake before libtool.  It will report an error but
133   still won't put the file into the disty.  This is wrong.
134   From Mark H Wilkinson <mhw@kremvax.demon.co.uk>
136 * examine possibility of using any character in a macro name
137   and rewriting names automatically.  this means we must rewrite
138   all references as well.
139   [ this is a 2.0-style feature ]
141 * `distcheck' and `dist' should depend on `all'
143 * Add code to generate foo-config script like gnome, gtk
145 * document user namespace for macro/target names
146   adopt some conventions and use uniformly
147     [ this is a good thing for the rewrite ]
149 * distclean must remove config.status
150   can't this cause problems for maintainer-clean?
151   shouldn't maintainer-clean print the message before running
152   any part of the make?  (just to slow things down long enough
153   for the user to stop it)
154   (maybe doesn't matter since people who even know about
155   maintainer-clean already have a clue)
157 * reintroduce AM_FUNC_FNMATCH which sets LIBOBJS
158   Then have automake know about fnmatch.h.
159     [ probably should wait for autoconf to get right functionality ]
161 * "make diff" capability
162   look at gcc's Makefile.in to see what to do
163   or look at maint program
165 * in --cygnus, clean-info not generated at top level
167 * what if an element of a scanned variable looks like
168         $(FOO).$(BAR)  ?
169   or some other arbitrary thing?
170   right now we try to cope, but not very well
171     [ this is only of theoretical interest for now ]
172     [ We now have an 'inner_expand' option to traverse_recursively,
173       but it is not yet used. ]
175 * make sure every variable that is used is also defined
176     [ we don't really look at variable uses in detail.
177       2.0 thing ]
179 * make sure `missing' defines are generated
181 * missing should handle install -d and rmdir -p (for uninstall)
183 * NORMAL_INSTALL / NORMAL_UNINSTALL -vs- recursive rules
184   [ requires changes to the standard ]
186 * should not put texiname_TEXINFOS into distribution
187   should rename this macro anyway, to foo_texi_DEPENDENCIES
189 * For now I guess I'll just have automake give an error if it encounters
190 non-C source in a libtool library specification.
192 * must split $obj into two parts: one for libtool and one for
193   deansification.  Otherwise .S files will be deansified!
195 * ansi2knr must currently appear in a directory that has some source
197 * if program has the same name as a target, do something sensible:
198   - if the target is internal, rename it
199   - if the target is mandated (eg, "info"), tell the user
200     consider auto-modifying the program name to work around this
202 * should separate actual options from strictness levels
203   strictness should only cover requirements
204   You should be able to pick and choose options
206 * rewrite in guile (RMS request)
207 at the same time, consider adding a GUI
208 could use the same parsing code for the GUI and the standalone version
209 that means figuring out a better representation of internal state
210 [ that's easy -- anything is better than what we have now ]
212 having just one Makefile for a project would give a big speed increase
213 for a project with many directories, eg glibc.  ideally (?) you'd
214 still be able to have a Makefile.am in each directory somehow; this
215 might make editing conceptually easier.
217 * finish up TAGS work
219 * only remove libtool at top level?
221 * clean up source directory by moving stuff into subdirs
223 * consider adding pkglibexecdir, maybe others?
224   requests for pkg-dirs with version included
226 Avoid loops when installing; instead unroll them in automake
227 [ Impossible when @AC_SUBST@ values are used. ]
229 Some long-term projects:
230 * if $(FOO) is used somewhere, ensure FOO is defined, either by
231   user or by automake if possible
233 [ include, += support ]
234 * even better would be allowing targets in different included
235   fragments to be merged.  e.g., `install-local'.
237 consider putting all check-* targets onto @check?
239 take diff-n-query code from libit
241 Per Bothner says:
242 Per> 1) Being able to build a set of non-source programs
243 Per> from source programs, without necessarily linking them together.
244 Per> I.e. one should be able to say something like:
245 Per>    dummy_SOURCES=foo.c bar.c
246 Per> and automake should realize that it needs to build foo.o and bar.o.
247 Per> 2) Being intelligent about new kinds of suffixes.
248 Per> If it sees:
249 Per>    SUFFIXES = .class .java
250 Per> and a suffix rule of the form:
251 Per>    .java.class:
252 Per> then it should be able to realize it can build .class files from
253 Per> .java files, and thus be able to generate a list of
254 Per> .class files from a list of .java source files.
255 [What Per wanted here was a way to have automate automatically follow
256 suffix rules.  So for instance if you had a `.x.y:' rule, and automake
257 saw a `.x' file, it would automatically build and install the
258 corresponding `.y' file.]
260 Jim's idea: should look for @setfilename and warn if filenames too long
261 * guess split size
263 from joerg-martin schwarz:
264  -- If Makefile.am contains $(CC), $(COMPILE), $(YLWRAP), ....
265     in an explicitly written rule,  you should emit the corresponding
266     Makefile variables automatically.
268 Configuring in the large:
269 * allow hierarchy of dirs to share one aclocal.m4
270   How?
272 consider printing full file name of Makefile.am or configure.in when
273 giving error.  This would help for very large trees with many
274 configure.in scripts
276 From the GNU Standards.  These things could be checked, and probably
277 should be if --gnu.
278 *    Make sure that the directory into which the distribution unpacks (as
279 well as any subdirectories) are all world-writable (octal mode 777).
280 *   Make sure that no file name in the distribution is more than 14
281 characters long.
282 *    Don't include any symbolic links in the distribution itself.
283      (ditto hard links)
284 *    Make sure that all the files in the distribution are world-readable.
285 * standards no longer prohibit ANSI C.  What does this imply
286   for the de-ansi-fication feature? [ must keep it -- some users rely on it ]
288 should be able to determine what is built by looking at rules (and
289 configure.in).  Then built man pages (eg) could automatically be
290 omitted from the distribution.
292 Consider: "cvs" option adds some cvs-specific rules?
294 Right now, targets generated internally (eg "install") are not
295 overridable by user code.  This should probably be possible, even
296 though it isn't very important.  This could be done by generating all
297 internal rules via a function call instead of just appending to
298 $output_rules.
299  [ this will be harder to implement when scanning a rule like all-recursive
300    from subdirs.am ]
302 Other priorities:
303 * Must rewrite am_install_var.  Should break into multiple functions.
304   This will allow the callers to be a little smarter.
305 * Rewrite clean targets.
306 * Fix up require_file junk.
308 djm wants ``LINKS'' variable; list of things to link together after
309 install.  In BSD environment, use:
310         LINKS = from1 to1 from2 to2 ...
312 Need way to say there are no suffixes in a Makefile (Franc,ois'
313 "override" idea suffices here)
315 Check to make sure various scripts are executable (IE when looking for
316 them in a directory)
318 Handle dist-zoo.  Generally add more DOS support.  Maybe run "doschk"
319 (why isn't this merged with "pathchk"?) when doing a dist.  Do
320 whatever else François says here...
322 Add support for html via an option.  Use texi2html.  Use
323 "html_TEXINFOS", and htmldir = .../html.  Include html files in
324 distribution.  Also allow "html_DATA", for raw .html files.
325   [ when will texinfo directly support html? ]
327 uninstall and pkg-dirs should rm -rf the dir.
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.
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)
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?
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)
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 [ Ask Karl Berry for a -M option to makeinfo and texi2dvi? ]
368 It would be good to check some parts of GNU standards.  Already check
369 for install-sh and mkinstalldirs.  What else is required to be in
370 package by GNU standards or by automake?
371 Some things for --strictness=gnits:
372 * "cd $(foo); something" is an error in a rule.  Should be:
373   "cd $(foo) && something"
374 * Look for 'ln -s' and warn about using $(LN_S) and AC_PROG_LN_S
375 * Look for $(LN_S) and require AC_PROG_LN_S
377 Auto-distribute "ChangeLog.[0-9]+"?  "ChangeLog.[a-z]+"?
379 Internationalize. [ gettext doesn't have the necessary machinery yet ]
380 am_error should use printf-style arguments (for eventual gettext scheme)
382 François says the ordering of files in a distribution should be as follows:
383 * README
384 * source files
385 * derived files
386 I agree, but I don't see how to implement this yet.
387 It might be easier if "derived files" is limited to those that
388 Automake itself knows about, eg output of yacc.
390 Check all source files to make sure that FSF address is up-to-date.
391 --gnits or --gnu only.
393 Merge each -vars.am file with corresponding ".am" file.  Can do this
394 because of changes to &file_contents.
396 Should libexec programs have the name transform done on them?
398 Order the output rules sensibly, so FOO_SOURCES and FOO_OBJECTS are
399 together and rules are in the usual order.
401 Make the output minimal: only output definitions for variables that
402 are used.
404 djm says:
405 David> To avoid comments like the one about subdirs getting buried in
406 David> the middle of a Makefile.in, how about pushing comments that
407 David> start with ### to the top of the Makefile.in (in order)?  Sort
408 David> of like how Autoconf uses diversions to force initialization
409 David> code to the top of configure.
411 Karl Berry says:
412 Karl> 2) Your Makefile variable names are generally uppercase, but GNU
413 Karl> generally uses lowercase. Not that it matters :-).
415 ================================================================
417 Stuff for aclocal:
419 probably should put each group of m4 files into a subdir owned by the
420 containing application.
422 ================================================================
424 Document:
426 AM_MISSING_PROG
428 how to use the generated makefiles
429  - standard targets
430  - required targets
431  - NORMAL_INSTALL junk
433 rationale for avoiding
434         make CFLAGS="$CFLAGS" ...
435 in subdirs make rule
437 write example of using automake with dejagnu
438 follow calc example in dejagnu docs
440 document which variables are actually scanned and which are not.
442 Document customary ordering of Makefile.am.  From François.
444 Should include extended version of diagram from Autoconf (suggested by
445 Greg Woods)
447 Make a definition of the term "source"
449 document how to use Automake with CVS.  Idea from Mark Galassi.  Also
450 include Greg Woods' more sophisticated "cvs-dist" target.
452 -- must document all variables that are supposed
453    to be public knowledge
455 must document the targets required for integration with
456 non-automake-using subdirs
458 document the "make SHELL='/bin/sh -x'" trick for debugging
460 section on relationship to GNU make.  include notes on parallel makes
462 add a concept index
464 move discussion of cygwin32, etags, mkid under other gnu tools
466 CCLD, CXXLD, FLD
468 ================================================================
470 Libraries:
472 * Should support standalone library along with subdir library in same
473   Makefile.am.  Maybe: turn off "standalone" mode if library's Makefile.am
474   is not only one specd? [ add an option for this ]
476 ================================================================
478 Longer term:
480 Would it be useful to integrate in some way with the Debian package
481 building utility?  Must check.  maybe it would be possible to deal
482 with all the different package utilities somehow.  Lately I've been
483 hearing good things about the RedHat packaging utilities.  Why are
484 there so many of these?  Are they fun to write or something?
485 The RedHat package utility is called RPM; see
486         ftp://ftp.redhat.com/pub/code/rpm
487 It actually has problems, like no configure script and no documentation.
489 For Cygnus it would probably be good to be able to handle the native
490 package utility on each platform.  There are probably 3 or 4 of these
491 (sysv, solaris?, aix?)
493 tcl/unix/Makefile.in has some code to generate a Solaris package.
495 Automake probably can't do all of this on its own.  A new tool might
496 be a better idea
498 I have some notes from a Debian developer on how the integration
499 should work
501 ================================================================
503 A tool to guess what the local Makefile.am should look like:
504 (see Gord's Maint program!)
506 * Probably integrate with autoscan
507 * Use various simple rules to determine what to do:
508   * get name of top directory, sans version info
509   * search for .c files with 'main' in them
510     * if in main.c, use directory name for program
511     * if in more than one, generate multiple programs
512     * if not found, generate a library named after directory
513   * order subdir searches correctly: lib first, src last
514   * assume 'testsuite' dir means we are using dejagnu
515 * maybe be smart about reading existing Makefile.am, so tool
516   can be run for incremental changes?  You could imagine:
518         Makefile.am:
519                 autoproject --incremental
521 ================================================================
523 Stuff NOT to do, and why:
525 consider auto-including any file that matches "*.in".
526   [ no: po/Makefile.in shouldn't be included ]
528 must look at mkid to see how it works (for subdir usage)
529   [ right now, it doesn't.  i don't see a simple fix right now ]
531 if configure.in not found, move up a directory and try again?  This
532 could eliminate a common source of problems.
533   [ this is just a bad idea ]
535 * scripts are installed in $exec_prefix/bin, not $prefix/bin
536   Bug or feature?
537   [ the consensus on Gnits is that this isn't required.
538     doubters can work around it anyway ]
540 Scan source directories and warn about missing files, eg .c/.h files
541 that aren't mentioned?
542   [ distcheck makes this less useful ]
544 * quoting bugs
545   - how to install file with a space in its name?
546   [ don't bother with this -- make is just too losing ]
548 * notice when a .c file is a target somewhere, and auto-add it to
549     BUILT_SOURCES
550   [ BUILT_SOURCES are for files that need to be built before anything
551     else because of hidden dependencies (something .c files are
552     unlikely to be) ]
554 * Scan multiple input files when Makefile is generated?
555   This would provide flexibility for large projects; subsumes
556   the "Makefile.tmpl" idea
557  [ can't do this.  must explain why in manual.
558    basically, solving all the problems is too hard
559    like: how to remove redundancies between generated .in files
560    instead should implement `include' directive for Makefile.am ]
562 * Should be a way to have "nobuild_PROGRAMS" which aren't even built,
563   but which could be by running the magic make command.
564   [ We already have EXTRA_PROGRAMS for this. ]
567 * copyright notice
569 Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002 Free
570 Software Foundation, Inc.
572 This file is part of GNU Automake.
574 GNU Automake is free software; you can redistribute it and/or modify
575 it under the terms of the GNU General Public License as published by
576 the Free Software Foundation; either version 2, or (at your option)
577 any later version.
579 GNU Automake is distributed in the hope that it will be useful,
580 but WITHOUT ANY WARRANTY; without even the implied warranty of
581 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
582 GNU General Public License for more details.
584 You should have received a copy of the GNU General Public License
585 along with autoconf; see the file COPYING.  If not, write to
586 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
587 Boston, MA 02110-1301, USA.
590 Local Variables:
591 mode: outline
592 End: