Allow all variables to be overridden
[platform/upstream/automake.git] / TODO
1 Priorities for release:
2 - Jim's macro updates
3 - yacc -vs- .h
4 - documentation
5
6 * test install-info
7   add install-info --remove
8
9 Further:
10 - texinfo/info changes
11 - Per's suggestion
12 - man page fixes
13
14 Avoid loops when installing; instead unroll them in automake
15
16 allow `EXTRA_DIST = foo/bar'; too many requests to ignore
17
18 Franc,ois> * ansi2knr was uselessly compiled, and it might be an
19 Franc,ois> Automake problem:
20
21 MUST look @ Franc,ois' run-time-replacement code
22
23 From David A Swierczek: automake should notice (eg) AC_CHECK_PROG and
24 auto-generate Makefile substitution:
25         AC_CHECK_PROG(AR, ...)
26     =>  AR = @AR@ in Makefile.in
27 Ditto AC_SUBST and other things that make sense.  Furthermore, other
28 macros (eg AC_PROG_CC) should be handled via a similar mechanism; many
29 special cases could be eliminated.
30
31 consider putting all check-* targets onto @check?
32 To support --help/--version checking?
33
34 must move CONFIG_HEADER from tags.am... allow it to work in subdir.
35
36 take diff-n-query code from libit
37
38 must at least partially rewrite dist system (to handle distributing
39 info files, which is currently somewhat broken).
40
41 Per Bothner says:
42 Per> 1) Being able to build a set of non-source programs
43 Per> from source programs, without necessarily linking them together.
44 Per> I.e. one should be able to say something like:
45 Per>    dummy_SOURCES=foo.c bar.c
46 Per> and automake should realize that it needs to build foo.o and bar.o.
47 Per> 2) Being intelligent about new kinds of suffixes.
48 Per> If it sees:
49 Per>    SUFFIXES = .class .java
50 Per> and a suffix rule of the form:
51 Per>    .java.class:
52 Per> then it should be able to realize it can build .class files from
53 Per> .java files, and thus be able to generate a list of
54 Per> .class files from a list of .java source files.
55
56 * fix this distribution to be fully standards compliant
57   * pathchk says we run over the limit
58   * must change aclocal's implementation somehow -- gross
59
60 * actually use acinstall program
61
62 !! Must fix require_file stuff.  It is really gross, and I don't
63    understand it any more.
64
65 * error messages should print ``[info blah blah]'' command when a
66   certain part of the standards apply.  saw idea in message from
67   Craig Burley.
68
69 * patch from Joel Weber about fixing yacc; in particular generating .h file
70
71 !! should write autoconf-style doc entries for each m4 macro
72
73 Jim's idea: should look for @setfilename and warn if filenames too long
74 * guess split size
75 * allow ".info" to be missing
76
77 should put inverse of @MAINT@ before `.PHONY: configure'.  This means
78 fixing configure target name (no $srcdir)
79
80 * must update GNU Hello
81
82 ** many requests for a way to omit a file from the distribution.
83    Should be done like `!foo' or `~foo' in _SOURCES, etc.
84    Such files should be removed explicitly after the copy step!
85    Doing this requires rewriting macros before generating Makefile.in.
86
87 add support for Makefile.tmpl that is auto-included in every
88 Makefile.am.  That makes it easier to do some non-std thing in every
89 subdirectory.
90
91 consider printing full file name of Makefile.am or configure.in when
92 giving error.  This would help for very large trees with many
93 configure.in scripts
94
95 From the GNU Standards.  These things could be checked, and probably
96 should be if --gnu.
97 *    Make sure that the directory into which the distribution unpacks (as
98 well as any subdirectories) are all world-writable (octal mode 777).
99 *   Make sure that no file name in the distribution is more than 14
100 characters long.
101 *    Don't include any symbolic links in the distribution itself.
102      (ditto hard links)
103 *    Make sure that all the files in the distribution are world-readable.
104 ** also, check --help output and --version output.  Idea from François
105
106 consider supporting "var+= stuff" syntax.  rewrite to just var=... on
107 output.  This is sometimes convenient when you want to write a
108 Makefile.am in more-or-less modular parts
109
110 should be able to determine what is built by looking at rules (and
111 configure.in).  Then built man pages (eg) could automatically be
112 omitted from the distribution.
113
114 Consider using libfoo_SOURCES, etc, for libraries.  From Gord
115 Matzigkeit.  There is a patch.
116
117 Idea from Joerg-Martin Schwarz: allow passing different -D flags to
118 different compiles.  This can be done, but with the restriction that a
119 .c cannot appear in 2 different "objects" (programs/libraries)
120 compiled with different -D options (because -c and -o do not always
121 work together and parallel makes must work).  This could be
122 implemented by noticing whenever a ".o" target with no rules is being
123 emitted, and adding the appropriate compilation rule as appropriate.
124 This should work with targets from Makefile.am as well as from .P
125 files, which means rewriting so that the Makefile.am contents aren't
126 copied into the output immediately.  This feature is probably required
127 to fully support libtool ("grody compilation issue")
128
129 Henrik Frystyk Nielsen says:
130 Henrik> 4) Flags like --include-deps are lost when you make changes to
131 Henrik> Makefile.am files and automake is run automatically. It would
132 Henrik> be nice to keep these flags as I now have to redo everything
133 Henrik> manually.
134 ... what about other options here too?
135
136 Think about: maybe "make check" should just bomb if error occurs?
137 Then user must use "make -k check".  This is probably more natural.
138
139 Consider: "cvs" option adds some cvs-specific rules?
140
141 "Cygnus"-specific features:
142 * An option that statically rewrites @MAINT@ to "#M#".
143 * Should look for certain tools in the build tree:
144   expect, dejagnu, makeinfo
145 * `no-installinfo' is the default
146 * always generate `info' and `install-info' targets
147 * Allow `texinfo.tex' to be missing
148
149 Automake: devo/inet/Makefile.am has "all-local".  "install" depends on
150 "all", but the local installs get run before the stuff in "all".  Gross.
151
152 Right now, targets generated internally (eg "install") are not
153 overridable by user code.  This should probably be possible, even
154 though it isn't very important.  This could be done by generating all
155 internal rules via a function call instead of just appending to
156 $output_rules.
157
158 * Should be a way to have "nobuild_PROGRAMS" which aren't even built,
159   but which could be by running the magic make command.
160
161 * Should have tool like "autoreconf" that only remakes Makefiles that
162   need it.  Probably autoreconf should be modified to handle automake
163
164 Other priorities:
165 * Must rewrite am_install_var.  Should break into multiple functions.
166   This will allow the callers to be a little smarter.
167 * Rewrite clean targets.
168 * Must rewrite error handling code.  Right now it is a real mess
169   Should fix up require_file junk at the same time
170
171 Things to finish libtool support:
172 * Handle grody compilation issue
173 * Handle install changes
174 * Handle clean changes
175 * New definition for LINK
176
177 Scan source directories and warn about missing files, eg .c/.h files
178 that aren't mentioned?
179
180 Need way to say there are no suffixes in a Makefile (Franc,ois'
181 "override" idea suffices here)
182
183 Check to make sure various scripts are executable (IE when looking for
184 them in a directory)
185
186 Use recode in dist target when MAINT_CHARSET specified.  Read caveats
187 in automake.in before doing this.  Note the same problem used to apply
188 to the no-dependencies option; maybe it still should?  Note also that
189 each Makefile.am must be rewritten at "make dist" time if
190 MAINT_CHARSET and DIST_CHARSET are not identical.  NOTE: gettext must
191 arrange for all .po files not to be recoded.  In the long term this
192 might be a problem (consider when some systems use Unicode but the
193 rest do not)
194   MAINT_CHARSET *must* be local to each Makefile.am, to enable
195         merged distributions.
196   DIST_CHARSET must be passed down to subdir makes during a "make dist"
197
198 Handle dist-zoo.  Generally add more DOS support.  Maybe run "doschk"
199 (why isn't this merged with "pathchk"?) when doing a dist.  Do
200 whatever else François says here...
201
202 Add support for html via an option.  Use texi2html.  Use
203 "html_TEXINFOS", and htmldir = .../html.  Include html files in
204 distribution.  Also allow "html_DATA", for raw .html files.
205   [ when will texinfo support html? ]
206   [ is there a texinfo.tex that supports texi2html extensions? ]
207
208 uninstall and pkg-dirs should rm -rf the dir.
209
210 a potential bug: configure puts "blah.o" into LIBOBJS, thus implying
211 these files can't be de-ansified.  Not a problem?
212
213 In general most .am files should be merged into automake.  For
214 instance all the "clean" targets could be merged by keeping lists of
215 things to be removed.  This would be a lot nicer looking.  Note that
216 the install targets probably should not be merged; it is sometimes
217 useful to only install a small part.
218
219 Clean up the output:
220 * Order rules sensibly
221 * Ensure every line has a purpose.  Omit unused stuff
222 * Eliminate extraneous rules when possible (eg 'install-am' stuff)
223 * Make sure vertical spacing is correct
224 * pretty-print targets
225 * regularize how backslash-newline is done.  Just one space between text
226   and backslash should be the rule.  Update makefile-mode to allow this.
227   (set column to 0, probably)
228 Omit program transform vars from header if no program installed.  This
229 is currently pretty hard to do.  (But with beautification code it
230 would probably be easy)
231
232 Lex, yacc support:
233 * It would be nice to automatically support using bison's better features
234   to rename the output files.  This requires autoconf support
235 * Consider supporting syntax from autoconf "derived:source", eg:
236         y.tab.c:perly.y
237   for yacc and lex source
238 * if AC_PROG_LEX used, ensure (no, *PUT*) LEXLIB in foo_LDADD
239
240 Multi-language support:
241 * should have mapping of file extensions to languages
242 * should automatically handle the linking issue (special-case C++)
243 * must get compile rules for various languages; FORTRAN probably
244   most important unimplemented language
245 This should be integrated in some way with Per's idea.
246 Eg .f.o rules should be recognized & auto-handled in _SOURCES
247 That way any random language can be treated with C/C++ on a first-class
248 basis (maybe)
249
250 Should 'distclean' "rm -rf .deps"?
251
252 It might be cool to generate .texi dependencies by grepping for
253 @include.  (If done, it should be done the same way C dependencies are
254 done)
255
256 It would be good to check some parts of GNU standards.  Already check
257 for install-sh and mkinstalldirs.  What else is required to be in
258 package by GNU standards or by automake?
259 Some things for --strictness=gnits:
260 * "cd $(foo); something" is an error in a rule.  Should be:
261   "cd $(foo) && something"
262 * Look for 'ln -s' and warn about using $(LN) and AC_PROG_LN_S
263 * Look for $(LN) and require AC_PROG_LN_S
264
265 automake.in: should ".cc" really -> "$o"?  This doesn't really seem
266 right, but maybe it is so names can be rewritten uniformly?  Must
267 check
268
269 Auto-distribute "ChangeLog.[0-9]+"?  "ChangeLog.[a-z]+"?
270
271 Internationalize. [ gettext doesn't have the necessary machinery yet ]
272 am_error should use printf-style arguments (for eventual gettext scheme)
273
274 François says the ordering of files in a distribution should be as follows:
275 * README
276 * source files
277 * derived files
278 I agree, but I don't see how to implement this yet.
279 It might be easier if "derived files" is limited to those that
280 Automake itself knows about, eg output of yacc.
281
282 Check all source files to make sure that FSF address is up-to-date.
283 --gnits or --gnu only.
284
285 Merge each -vars.am file with corresponding ".am" file.  Can do this
286 because of changes to &file_contents.
287
288 Looked at a program called 'ezmake', which seems to do something
289 similar.  The only idea there that is possibly worth stealing is using
290 globs in definitions.  Also has negations.  Eg in a directory with
291 files a.c, b.c and c.c, the line:
292         foo_SOURCES = *.c ~c.c
293 would be equivalent to:
294         foo_SOURCES = a.c b.c
295 Is this worth implementing?
296
297 Should libexec programs have the name transform done on them?
298
299 Order the output rules sensibly, so FOO_SOURCES and FOO_OBJECTS are
300 together and rules are in the usual order.
301
302 Make the output minimal: only output definitions for variables that
303 are used.
304
305 Look at dist's jmake for ideas.  dist is the name of the distribution
306 including Metaconfig.  Perl uses it.
307
308 Should handle directory hierarchies deeper than 2.  Right now there is
309 some support for this.  Here are some of the issues:
310 * Should handle AC_CONFIG_SUBDIRS, ie must handle configure.in in subdirs
311     * can do this by looking at subdirs, seeing configure.in
312       and auto-running Automake there
313
314 These can both be handled via dist-hook:
315 . Consider supporting guile-style PLUGIN directories automatically?
316 . Consider allowing eg "foo/bar" to appear in EXTRA_DIST, and generating
317   code to make directory foo at dist time
318
319 djm says:
320 David> To avoid comments like the one about subdirs getting buried in
321 David> the middle of a Makefile.in, how about pushing comments that
322 David> start with ### to the top of the Makefile.in (in order)?  Sort
323 David> of like how Autoconf uses diversions to force initialization
324 David> code to the top of configure.
325
326 Karl Berry says:
327 Karl> 2) Your Makefile variable names are generally uppercase, but GNU
328 Karl> generally uses lowercase. Not that it matters :-).
329
330 ================================================================
331
332 Stuff for aclocal:
333
334 probably should put each group of m4 files into a subdir owned by the
335 containing application.
336
337 must fill in definitions for some of the AC_FEATURE macros
338
339 consider including autosystem; that is the only way the AC_FEATURE
340 macros even make sense.  Or move the AC_FEATURE macros back into
341 autosystem...
342
343 ================================================================
344
345 Document:
346
347 document which variables are actually scanned and which are not.
348
349 finish yacc, lex
350
351 Document customary ordering of Makefile.am.  From François.
352
353 Should include extended version of diagram from Autoconf (suggested by
354 Greg Woods)
355
356 Make a definition of the term "source"
357
358 need xref to libtool in docs
359
360 document how to use Automake with CVS.  Idea from Mark Galassi.  Also
361 include Greg Woods' more sophisticated "cvs-dist" target.
362
363 document rebuilding configure.  CONFIGURE_DEPENDENCIES
364
365 -- must document all variables that are supposed
366    to be public knowledge
367
368 automake must be run in each directory with a configure.in
369 This is insufficiently clear
370
371 must document the targets required for integration with
372 non-automake-using subdirs
373
374 use of (eg) EXTRA_PROGRAMS is not very clear right now
375
376 ================================================================
377
378 Things to do for autoconf:
379
380 * allow random code to be inserted a la the 2nd arg to AC_OUTPUT:
381 Joel> I know that the following is needed at the end of configure.in:
382 Joel>         [test -z "$CONFIG_HEADERS" || echo timestamp >stamp-h])
383 Joel> However, if automake checked that this line is present, it would
384 Joel> help...this bit me for a while.
385
386 * patch autoreconf to run automake and aclocal (this is done but
387   not really available)
388
389 ================================================================
390
391 Libraries:
392
393 * Should support standalone library along with subdir library in same
394   Makefile.am.  Maybe: turn off "standalone" mode if library's Makefile.am
395   is not only one specd? [ add an option for this ]
396
397 ================================================================
398
399 Longer term:
400
401 Would it be useful to integrate in some way with the Debian package
402 building utility?  Must check.  maybe it would be possible to deal
403 with all the different package utilities somehow.  Lately I've been
404 hearing good things about the RedHat packaging utilities.  Why are
405 there so many of these?  Are they fun to write or something?
406 The RedHat package utility is called RPM; see
407         ftp://ftp.redhat.com/pub/code/rpm
408 It actually has problems, like no configure script and no documentation.
409
410 For Cygnus it would probably be good to be able to handle the native
411 package utility on each platform.  There are probably 3 or 4 of these
412 (sysv, solaris?, aix?)
413
414 ================================================================
415
416 A tool to guess what the local Makefile.am should look like:
417 (see Gord's Maint program!)
418
419 * Probably integrate with autoscan
420 * Use various simple rules to determine what to do:
421   * get name of top directory, sans version info
422   * search for .c files with 'main' in them
423     * if in main.c, use directory name for program
424     * if in more than one, generate multiple programs
425     * if not found, generate a library named after directory
426   * order subdir searches correctly: lib first, src last
427   * assume 'testsuite' dir means we are using dejagnu
428 * maybe be smart about reading existing Makefile.am, so tool
429   can be run for incremental changes?  You could imagine:
430
431         Makefile.am:
432                 autoproject --incremental
433
434 ================================================================
435
436 Stuff NOT to do, and why:
437
438 consider auto-including any file that matches "*.in".
439   [ no: po/Makefile.in shouldn't be included ]
440
441 must look at mkid to see how it works (for subdir usage)
442   [ right now, it doesn't.  i don't see a simple fix right now ]
443
444 if configure.in not found, move up a directory and try again?  This
445 could eliminate a common source of problems.
446   [ this is just a bad idea ]
447
448 * scripts are installed in $exec_prefix/bin, not $prefix/bin
449   Bug or feature?
450   [ the consensus on Gnits is that this isn't required.
451     doubters can work around it anyway ]
452
453 * make the auto-dep code crash if GNU make not in use?
454   (doesn't it already?)