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