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