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