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