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