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