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