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