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