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