Add depmode=msvcmsys for Microsoft Visual C++ on MSYS.
[platform/upstream/automake.git] / TODO
1 We should arrange so that install-%DIR%%PRIMARY% is run conditionally
2 when %DIR%_%PRIMARY% is defined conditionally.  Currently it is always
3 run, and that will therefore always create %DIR% (unless %DIR%dir is
4 also defined conditionally).  Likewise, installdirs should not
5 create %DIR% in conditions were no %DIR%_%PRIMARY% is enabled.
6
7 check should depend on all
8   from ben elliston
9
10 the new YFLAGS code doesn't correctly handle srcdir
11
12 allow foo_NAME to rename an object (library or program)
13 at build/install time
14
15 remove _LTLIBRARIES and just use _LIBRARIES
16 then use this for zip/jar as well
17
18 for 1.5
19 investigate problems with conditionally defined libraries
20
21 add an error if the user makefile.am violates our
22    namespace rules
23
24 we need a document describing automake from the end user's point of view
25 eg describe INSTALL_HEADER there, among other things
26
27 * maintainer-clean
28
29 Akim:
30 > @@ -31,5 +31,9 @@
31 >  DISTCLEAN    -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES)
32 >
33 >  maintainer-clean-generic:
34 > +## FIXME: shouldn't we really print these messages before running
35 > +## the dependencies?
36 > +     @echo "This command is intended for maintainers to use"
37 > +     @echo "it deletes files that may require special tools to rebuild."
38 >         -rm -f Makefile.in
39
40 Tom:
41 > I'd like to eventually fix the FIXME comment by having
42 > maintainer-clean look like:
43 >
44 >     maintainer-clean:
45 >         @echo ...
46 >         $(MAKE) whatever
47 >
48 > We're left with the question of whether we should repeat them in every
49 > subdir.
50
51 *
52 Alexandre Oliva:
53 > Hmm...  Interesting.  It must have been a side effect of the enabling
54 > of forced `relink' on GNU/Linux/x86.  Anyway, on platforms that
55 > actually require relinking, this problem remains, and I see no way to
56 > overcome it other than arranging for automake to install libraries
57 > before executables, as you suggest.  This shouldn't be a big problem,
58 > anyway.
59 >
60 > A bigger problem could show up if two libraries in the same directory,
61 > one dependent on the other, are installed concurrently.  If relinking
62 > is needed for the dependent library, we have a problem.  It appears to
63 > me that user will have to live without `make -j install', in this
64 > case.
65
66 Alex Hornby
67 > Here's an Automake patch and changelog entry allow make -j install on
68 > such degenerate systems (and Linux with buggy libtool <g>)
69 >
70 > If you install to locations other that bin_ and lib_ then a larger fix
71 > is necessary, but this should fix the 90% case.
72
73 * think about how per-object flags should work.  in particular:
74   * how should they be specified?
75     using the object name is confusing when .lo/.obj in use
76     however, the object name provides a nice interaction with
77     per-exe flags
78   * how should they interact with per-executable flags?
79   [ this is probably a feature in search of a problem ]
80
81 * cross-compilation support:
82   programs built and used by the build process need to be
83   built for CC_FOR_BUILD
84   introduce a new prefxi for this, e.g. `build_PROGRAMS'
85   [ we can do this in an automatic way I think.
86     unfortunately it isn't that useful until autoconf has support
87     for this sort of thing as well ]
88
89 * distcheck should make sure that each file that uses _() is
90   listed in POTFILES.in
91   From Jim Meyering:
92     # Verify that all source files using _() are listed in po/POTFILES.in.
93     po-check:
94             grep -E -v '^(#|$$)' po/POTFILES.in | sort > $@-1
95             grep -E -l '\b_\(' lib/*.c src/*.c | sort > $@-2
96             diff -u $@-1 $@-2
97             rm -f $@-1 $@-2
98
99 * one performance enhancement would be to have autoconf write
100   a single file containing all the macro assignments.
101   then read this file via `include'
102   unfortunately this can't be done because of conditionals
103   -- but it could be made to work if we also changed:
104     * automake to rewrite @FOO@ to $(FOO), and
105     * the implementation of conditionals to rely on some new
106       config.status magic
107
108 * support prog_LIBS as override for LIBS
109
110 * Test subdir-objects option with yacc, lex, ansi2knr
111   Our locking scheme won't prevent a parallel make from losing
112   if there are two `bar.o' files and the timing is just right
113   This only happens with parallel make and no-`-c -o' compiler,
114   so it probably isn't very important
115   `-c -o' when doing libtool
116   try to find a losing compiler and see if it really works.
117   (actually: hack config.cache and do it)
118
119 * per-exe flags
120 ** LIBOBJS shouldn't be used when there are per-exe flags (?)
121
122 * Allow creation of Java .zip/.jar files in natural way
123   If you are building a compiled Java library, then the .zip/.jar
124   ought to be made automatically.
125
126 * Run automake before libtool.  It will report an error but
127   still won't put the file into the disty.  This is wrong.
128   From Mark H Wilkinson <mhw@kremvax.demon.co.uk>
129
130 * examine possibility of using any character in a macro name
131   and rewriting names automatically.  this means we must rewrite
132   all references as well.
133   [ this is a 2.0-style feature ]
134
135 * `distcheck' and `dist' should depend on `all'
136
137 * Add code to generate foo-config script like gnome, gtk
138
139 * document user namespace for macro/target names
140   adopt some conventions and use uniformly
141     [ this is a good thing for the rewrite ]
142
143 * distclean must remove config.status
144   can't this cause problems for maintainer-clean?
145   shouldn't maintainer-clean print the message before running
146   any part of the make?  (just to slow things down long enough
147   for the user to stop it)
148   (maybe doesn't matter since people who even know about
149   maintainer-clean already have a clue)
150
151 * reintroduce AM_FUNC_FNMATCH which sets LIBOBJS
152   Then have automake know about fnmatch.h.
153     [ probably should wait for autoconf to get right functionality ]
154
155 * "make diff" capability
156   look at gcc's Makefile.in to see what to do
157   or look at maint program
158
159 * in --cygnus, clean-info not generated at top level
160
161 * what if an element of a scanned variable looks like
162         $(FOO).$(BAR)  ?
163   or some other arbitrary thing?
164   right now we try to cope, but not very well
165     [ this is only of theoretical interest for now ]
166     [ We now have an 'inner_expand' option to traverse_recursively,
167       but it is not yet used. ]
168
169 * make sure every variable that is used is also defined
170     [ we don't really look at variable uses in detail.
171       2.0 thing ]
172
173 * make sure `missing' defines are generated
174
175 * missing should handle install -d and rmdir -p (for uninstall)
176
177 * NORMAL_INSTALL / NORMAL_UNINSTALL -vs- recursive rules
178   [ requires changes to the standard ]
179
180 * should not put texiname_TEXINFOS into distribution
181   should rename this macro anyway, to foo_texi_DEPENDENCIES
182
183 * For now I guess I'll just have automake give an error if it encounters
184 non-C source in a libtool library specification.
185
186 * must split $obj into two parts: one for libtool and one for
187   deansification.  Otherwise .S files will be deansified!
188
189 * ansi2knr must currently appear in a directory that has some source
190
191 * if program has the same name as a target, do something sensible:
192   - if the target is internal, rename it
193   - if the target is mandated (eg, "info"), tell the user
194     consider auto-modifying the program name to work around this
195
196 * should separate actual options from strictness levels
197   strictness should only cover requirements
198   You should be able to pick and choose options
199
200 * rewrite in guile (RMS request)
201 at the same time, consider adding a GUI
202 could use the same parsing code for the GUI and the standalone version
203 that means figuring out a better representation of internal state
204 [ that's easy -- anything is better than what we have now ]
205
206 having just one Makefile for a project would give a big speed increase
207 for a project with many directories, eg glibc.  ideally (?) you'd
208 still be able to have a Makefile.am in each directory somehow; this
209 might make editing conceptually easier.
210
211 * finish up TAGS work
212
213 * only remove libtool at top level?
214
215 * clean up source directory by moving stuff into subdirs
216
217 * consider adding other variables similar to pkglibexecdir?
218   requests for pkg-dirs with version included
219
220 Avoid loops when installing; instead unroll them in automake
221 [ Impossible when @AC_SUBST@ values are used. ]
222
223 Some long-term projects:
224 * if $(FOO) is used somewhere, ensure FOO is defined, either by
225   user or by automake if possible
226
227 [ include, += support ]
228 * even better would be allowing targets in different included
229   fragments to be merged.  e.g., `install-local'.
230
231 consider putting all check-* targets onto @check?
232
233 take diff-n-query code from libit
234
235 Per Bothner says:
236 Per> 1) Being able to build a set of non-source programs
237 Per> from source programs, without necessarily linking them together.
238 Per> I.e. one should be able to say something like:
239 Per>    dummy_SOURCES=foo.c bar.c
240 Per> and automake should realize that it needs to build foo.o and bar.o.
241 Per> 2) Being intelligent about new kinds of suffixes.
242 Per> If it sees:
243 Per>    SUFFIXES = .class .java
244 Per> and a suffix rule of the form:
245 Per>    .java.class:
246 Per> then it should be able to realize it can build .class files from
247 Per> .java files, and thus be able to generate a list of
248 Per> .class files from a list of .java source files.
249 [What Per wanted here was a way to have automate automatically follow
250 suffix rules.  So for instance if you had a `.x.y:' rule, and automake
251 saw a `.x' file, it would automatically build and install the
252 corresponding `.y' file.]
253
254 Jim's idea: should look for @setfilename and warn if filenames too long
255 * guess split size
256
257 from joerg-martin schwarz:
258  -- If Makefile.am contains $(CC), $(COMPILE), $(YLWRAP), ....
259     in an explicitly written rule,  you should emit the corresponding
260     Makefile variables automatically.
261
262 Configuring in the large:
263 * allow hierarchy of dirs to share one aclocal.m4
264   How?
265
266 consider printing full file name of Makefile.am or configure.in when
267 giving error.  This would help for very large trees with many
268 configure.in scripts
269
270 From the GNU Standards.  These things could be checked, and probably
271 should be if --gnu.
272 *    Make sure that the directory into which the distribution unpacks (as
273 well as any subdirectories) are all world-writable (octal mode 777).
274 *   Make sure that no file name in the distribution is more than 14
275 characters long.
276 *    Don't include any symbolic links in the distribution itself.
277      (ditto hard links)
278 *    Make sure that all the files in the distribution are world-readable.
279 * standards no longer prohibit ANSI C.  What does this imply
280   for the de-ansi-fication feature? [ must keep it -- some users rely on it ]
281
282 should be able to determine what is built by looking at rules (and
283 configure.in).  Then built man pages (eg) could automatically be
284 omitted from the distribution.
285
286 Consider: "cvs" option adds some cvs-specific rules?
287
288 Right now, targets generated internally (eg "install") are not
289 overridable by user code.  This should probably be possible, even
290 though it isn't very important.  This could be done by generating all
291 internal rules via a function call instead of just appending to
292 $output_rules.
293  [ this will be harder to implement when scanning a rule like all-recursive
294    from subdirs.am ]
295
296 Other priorities:
297 * Must rewrite am_install_var.  Should break into multiple functions.
298   This will allow the callers to be a little smarter.
299 * Rewrite clean targets.
300 * Fix up require_file junk.
301
302 djm wants ``LINKS'' variable; list of things to link together after
303 install.  In BSD environment, use:
304         LINKS = from1 to1 from2 to2 ...
305
306 Need way to say there are no suffixes in a Makefile (Franc,ois'
307 "override" idea suffices here)
308
309 Check to make sure various scripts are executable (IE when looking for
310 them in a directory)
311
312 Handle dist-zoo.  Generally add more DOS support.  Maybe run "doschk"
313 (why isn't this merged with "pathchk"?) when doing a dist.  Do
314 whatever else François says here...
315
316 Add support for html via an option.  Use texi2html.  Use
317 "html_TEXINFOS", and htmldir = .../html.  Include html files in
318 distribution.  Also allow "html_DATA", for raw .html files.
319   [ when will texinfo directly support html? ]
320
321 uninstall and pkg-dirs should rm -rf the dir.
322
323 In general most .am files should be merged into automake.  For
324 instance all the "clean" targets could be merged by keeping lists of
325 things to be removed.  This would be a lot nicer looking.  Note that
326 the install targets probably should not be merged; it is sometimes
327 useful to only install a small part.
328
329 * Clean up the output:
330 ** Order rules sensibly
331 ** Ensure every line has a purpose.  Omit unused stuff
332 ** Eliminate extraneous rules when possible (eg 'install-am' stuff)
333 ** Make sure vertical spacing is correct
334 Omit program transform vars from header if no program installed.  This
335 is currently pretty hard to do.  (But with beautification code it
336 would probably be easy)
337
338 * Lex, yacc support:
339 ** It would be nice to automatically support using bison's better features
340   to rename the output files.  This requires autoconf support
341 ** Consider supporting syntax from autoconf "derived:source", eg:
342         y.tab.c:perly.y
343   for yacc and lex source
344 ** what if you use flex and the option to avoid -lfl?
345   should support this?
346
347 * Multi-language support:
348 ** should have mapping of file extensions to languages
349 ** should automatically handle the linking issue (special-case C++)
350 ** must get compile rules for various languages; FORTRAN probably
351   most important unimplemented language
352 This should be integrated in some way with Per's idea.
353 Eg .f.o rules should be recognized & auto-handled in _SOURCES
354 That way any random language can be treated with C/C++ on a first-class
355 basis (maybe)
356
357 It might be cool to generate .texi dependencies by grepping for
358 @include.  (If done, it should be done the same way C dependencies are
359 done)
360 [ Ask Karl Berry for a -M option to makeinfo and texi2dvi? ]
361
362 It would be good to check some parts of GNU standards.  Already check
363 for install-sh and mkinstalldirs.  What else is required to be in
364 package by GNU standards or by automake?
365 Some things for --strictness=gnits:
366 * "cd $(foo); something" is an error in a rule.  Should be:
367   "cd $(foo) && something"
368 * Look for 'ln -s' and warn about using $(LN_S) and AC_PROG_LN_S
369 * Look for $(LN_S) and require AC_PROG_LN_S
370
371 Auto-distribute "ChangeLog.[0-9]+"?  "ChangeLog.[a-z]+"?
372
373 Internationalize. [ gettext doesn't have the necessary machinery yet ]
374 am_error should use printf-style arguments (for eventual gettext scheme)
375
376 François says the ordering of files in a distribution should be as follows:
377 * README
378 * source files
379 * derived files
380 I agree, but I don't see how to implement this yet.
381 It might be easier if "derived files" is limited to those that
382 Automake itself knows about, eg output of yacc.
383
384 Check all source files to make sure that FSF address is up-to-date.
385 --gnits or --gnu only.
386
387 Merge each -vars.am file with corresponding ".am" file.  Can do this
388 because of changes to &file_contents.
389
390 Should libexec programs have the name transform done on them?
391
392 Order the output rules sensibly, so FOO_SOURCES and FOO_OBJECTS are
393 together and rules are in the usual order.
394
395 Make the output minimal: only output definitions for variables that
396 are used.
397
398 djm says:
399 David> To avoid comments like the one about subdirs getting buried in
400 David> the middle of a Makefile.in, how about pushing comments that
401 David> start with ### to the top of the Makefile.in (in order)?  Sort
402 David> of like how Autoconf uses diversions to force initialization
403 David> code to the top of configure.
404
405 Karl Berry says:
406 Karl> 2) Your Makefile variable names are generally uppercase, but GNU
407 Karl> generally uses lowercase. Not that it matters :-).
408
409 ================================================================
410
411 Stuff for aclocal:
412
413 probably should put each group of m4 files into a subdir owned by the
414 containing application.
415
416 ================================================================
417
418 Document:
419
420 AM_MISSING_PROG
421
422 how to use the generated makefiles
423  - standard targets
424  - required targets
425  - NORMAL_INSTALL junk
426
427 rationale for avoiding
428         make CFLAGS="$CFLAGS" ...
429 in subdirs make rule
430
431 write example of using automake with dejagnu
432 follow calc example in dejagnu docs
433
434 document which variables are actually scanned and which are not.
435
436 Document customary ordering of Makefile.am.  From François.
437
438 Should include extended version of diagram from Autoconf (suggested by
439 Greg Woods)
440
441 Make a definition of the term "source"
442
443 document how to use Automake with CVS.  Idea from Mark Galassi.  Also
444 include Greg Woods' more sophisticated "cvs-dist" target.
445
446 -- must document all variables that are supposed
447    to be public knowledge
448
449 must document the targets required for integration with
450 non-automake-using subdirs
451
452 document the "make SHELL='/bin/sh -x'" trick for debugging
453
454 section on relationship to GNU make.  include notes on parallel makes
455
456 add a concept index
457
458 move discussion of cygwin32, etags, mkid under other gnu tools
459
460 CCLD, CXXLD, FLD
461
462 ================================================================
463
464 Libraries:
465
466 * Should support standalone library along with subdir library in same
467   Makefile.am.  Maybe: turn off "standalone" mode if library's Makefile.am
468   is not only one specd? [ add an option for this ]
469
470 ================================================================
471
472 Longer term:
473
474 Would it be useful to integrate in some way with the Debian package
475 building utility?  Must check.  maybe it would be possible to deal
476 with all the different package utilities somehow.  Lately I've been
477 hearing good things about the RedHat packaging utilities.  Why are
478 there so many of these?  Are they fun to write or something?
479 The RedHat package utility is called RPM; see
480         ftp://ftp.redhat.com/pub/code/rpm
481 It actually has problems, like no configure script and no documentation.
482
483 For Cygnus it would probably be good to be able to handle the native
484 package utility on each platform.  There are probably 3 or 4 of these
485 (sysv, solaris?, aix?)
486
487 tcl/unix/Makefile.in has some code to generate a Solaris package.
488
489 Automake probably can't do all of this on its own.  A new tool might
490 be a better idea
491
492 I have some notes from a Debian developer on how the integration
493 should work
494
495 ================================================================
496
497 A tool to guess what the local Makefile.am should look like:
498 (see Gord's Maint program!)
499
500 * Probably integrate with autoscan
501 * Use various simple rules to determine what to do:
502   * get name of top directory, sans version info
503   * search for .c files with 'main' in them
504     * if in main.c, use directory name for program
505     * if in more than one, generate multiple programs
506     * if not found, generate a library named after directory
507   * order subdir searches correctly: lib first, src last
508   * assume 'testsuite' dir means we are using dejagnu
509 * maybe be smart about reading existing Makefile.am, so tool
510   can be run for incremental changes?  You could imagine:
511
512         Makefile.am:
513                 autoproject --incremental
514
515 ================================================================
516
517 Stuff NOT to do, and why:
518
519 consider auto-including any file that matches "*.in".
520   [ no: po/Makefile.in shouldn't be included ]
521
522 must look at mkid to see how it works (for subdir usage)
523   [ right now, it doesn't.  i don't see a simple fix right now ]
524
525 if configure.in not found, move up a directory and try again?  This
526 could eliminate a common source of problems.
527   [ this is just a bad idea ]
528
529 * scripts are installed in $exec_prefix/bin, not $prefix/bin
530   Bug or feature?
531   [ the consensus on Gnits is that this isn't required.
532     doubters can work around it anyway ]
533
534 Scan source directories and warn about missing files, eg .c/.h files
535 that aren't mentioned?
536   [ distcheck makes this less useful ]
537
538 * quoting bugs
539   - how to install file with a space in its name?
540   [ don't bother with this -- make is just too losing ]
541
542 * notice when a .c file is a target somewhere, and auto-add it to
543     BUILT_SOURCES
544   [ BUILT_SOURCES are for files that need to be built before anything
545     else because of hidden dependencies (something .c files are
546     unlikely to be) ]
547
548 * Scan multiple input files when Makefile is generated?
549   This would provide flexibility for large projects; subsumes
550   the "Makefile.tmpl" idea
551  [ can't do this.  must explain why in manual.
552    basically, solving all the problems is too hard
553    like: how to remove redundancies between generated .in files
554    instead should implement `include' directive for Makefile.am ]
555
556 * Should be a way to have "nobuild_PROGRAMS" which aren't even built,
557   but which could be by running the magic make command.
558   [ We already have EXTRA_PROGRAMS for this. ]
559
560
561 * copyright notice
562
563 Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
564 2007  Free Software Foundation, Inc.
565
566 This program is free software; you can redistribute it and/or modify
567 it under the terms of the GNU General Public License as published by
568 the Free Software Foundation; either version 3, or (at your option)
569 any later version.
570
571 This program is distributed in the hope that it will be useful,
572 but WITHOUT ANY WARRANTY; without even the implied warranty of
573 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
574 GNU General Public License for more details.
575
576 You should have received a copy of the GNU General Public License
577 along with this program.  If not, see <http://www.gnu.org/licenses/>.
578
579
580 Local Variables:
581 mode: outline
582 End: