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