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