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