More bug fixes
[automake.git] / TODO
blobc7e808d3bfda66aa7e52c8ee53ec9252ddf15b4c
1 Priorities for release:
2 * Fix all mkinstalldirs invocations
3 * separate dist and distdir targets, so recursive uses of Automake work ok
4 * make the auto-dep code crash if GNU make not in use?
6 * Add no-remake option
7 * scripts are installed in $exec_prefix/bin, not $prefix/bin
8   Bug or feature?
10 * Should be a way to have "nobuild_PROGRAMS" which aren't even built,
11   but which could be by running the magic make command.
13 * Should have tool like "autoreconf" that only remakes Makefiles that
14   need it.  Probably autoreconf should be modified to handle automake
16 Other priorities:
17 * Must rewrite am_install_var.  Should break into multiple functions.
18   This will allow the callers to be a little smarter.
19 * Rewrite clean targets.
20 * Must rewrite error handling code.  Right now it is a real mess
21   Should fix up require_file junk at the same time
23 Things to finish libtool support:
24 * Handle grody compilation issue
25 * Handle install changes
26 * Handle clean changes
27 * New definition for LINK
29 Scan source directories and warn about missing files, eg .c/.h files
30 that aren't mentioned?
32 Gord Matzigkeit says:
33 > Can there be a way to specify that only object files be built?
34 > This is useful for testing dynamic linking (the dld library) and
35 > loadable kernel modules.
37 Currently gettext requires @INTLSUB@ and @POSUB@ in SUBDIRS.  In the
38 future this will be just intl and po.  When that happens, re-enable
39 warnings in handle_subdirs.
41 Need way to say there are no suffixes in a Makefile (Franc,ois'
42 "override" idea suffices here)
44 Check to make sure various scripts are executable (IE when looking for
45 them in a directory)
47 Testing: allow support for Cygnus-style dejagnu-based test suites via
48 an option
50 Think about ways to make automake fit better with Cygnus-style trees.
52 Use recode in dist target when MAINT_CHARSET specified.  Read caveats
53 in automake.in before doing this.  Note the same problem used to apply
54 to the no-dependencies option; maybe it still should?  Note also that
55 each Makefile.am must be rewritten at "make dist" time if
56 MAINT_CHARSET and DIST_CHARSET are not identical.  NOTE: gettext must
57 arrange for all .po files not to be recoded.  In the long term this
58 might be a problem (consider when some systems use Unicode but the
59 rest do not)
60   MAINT_CHARSET *must* be local to each Makefile.am, to enable
61         merged distributions.
62   DIST_CHARSET must be passed down to subdir makes during a "make dist"
64 Handle dist-zoo and dist-zip.  Generally add more DOS support.  Maybe
65 run "doschk" (why isn't this merged with "pathchk"?) when doing a
66 dist.  Do whatever else François says here...
68 Add support for html via an option.  Use texi2html.  Use
69 "html_TEXINFOS", and htmldir = .../html.  Include html files in
70 distribution.  Also allow "html_DATA", for raw .html files.
71   [ when will texinfo support html? ]
73 uninstall and pkg-dirs should rm -rf the dir.
75 a potential bug: configure puts "blah.o" into LIBOBJS, thus implying
76 these files can't be de-ansified.  Not a problem?
78 In general most .am files should be merged into automake.  For
79 instance all the "clean" targets could be merged by keeping lists of
80 things to be removed.  This would be a lot nicer looking.  Note that
81 the install targets probably should not be merged; it is sometimes
82 useful to only install a small part.
84 Clean up the output:
85 * Order rules sensibly
86 * Ensure every line has a purpose.  Omit unused stuff
87 * Eliminate extraneous rules when possible (eg 'install-am' stuff)
88 * Make sure vertical spacing is correct
89 * pretty-print targets
90 * regularize how backslash-newline is done.  Just one space between text
91   and backslash should be the rule.  Update makefile-mode to allow this.
92   (set column to 0, probably)
93 Omit program transform vars from header if no program installed.  This
94 is currently pretty hard to do.  (But with beautification code it
95 would probably be easy)
97 It should be possible to have ansi2knr in just one place in a package.
98 Jim Meyering says just rely on configure to make links as appropriate.
99 Maybe introduce syntax like this:
100         AUTOMAKE_OPTIONS = ../ansi2knr
101 ?  Consider putting it into AC_CONFIG_AUX_DIR
103 Lex, yacc support:
104 * It would be nice to automatically support using bison's better features
105   to rename the output files.  This requires autoconf support
106 * Consider supporting syntax from autoconf "derived:source", eg:
107         y.tab.c:perly.y
108   for yacc and lex source
109 * if AC_PROG_LEX used, ensure LEXLIB is in foo_LDADD
110 * require AC_DECL_YYTEXT for lex
112 require AC_PROG_CXX if any C++ source files found?
113 Better support for C++ all around
115 Write autoconf macro to do all work necessary for automake.  Eg define
116 PACKAGE, VERSION, etc.
118 'maintainer-clean' should "rm -rf .deps".  Ditto distclean
119 Should look for clean-local targets in Makefile.am.
121 It might be cool to generate .texi dependencies by grepping for
122 @include.  (If done, it should be done the same way C dependencies are
123 done)
125 It would be good to check some parts of GNU standards.  Already check
126 for install-sh and mkinstalldirs.  What else is required to be in
127 package by GNU standards or by automake?
128 Some things for --strictness=gnits:
129 * "cd $(foo); something" is an error in a rule.  Should be:
130   "cd $(foo) && something"
131 * Look for 'ln -s' and warn about using $(LN) and AC_PROG_LN_S
132 * Look for $(LN) and require AC_PROG_LN_S
134 automake.in: should ".cc" really -> "$o"?  This doesn't really seem
135 right, but maybe it is so names can be rewritten uniformly?  Must
136 check
138 Auto-distribute "ChangeLog.[0-9]+"?  "ChangeLog.[a-z]+"?
140 Internationalize. [ gettext doesn't have the necessary machinery yet ]
141 am_error should use printf-style arguments (for eventual gettext scheme)
143 François says the ordering of files in a distribution should be as follows:
144 * README
145 * source files
146 * derived files
147 I agree, but I don't see how to implement this yet.
148 It might be easier if "derived files" is limited to those that
149 Automake itself knows about, eg output of yacc.
151 Check all source files to make sure that FSF address is up-to-date.
152 --gnits or --gnu only.
154 Merge each -vars.am file with corresponding ".am" file.  Can do this
155 because of changes to &file_contents.
157 Looked at a program called 'ezmake', which seems to do something
158 similar.  The only idea there that is possibly worth stealing is using
159 globs in definitions.  Also has negations.  Eg in a directory with
160 files a.c, b.c and c.c, the line:
161         foo_SOURCES = *.c ~c.c
162 would be equivalent to:
163         foo_SOURCES = a.c b.c
164 Is this worth implementing?
166 Should libexec programs have the name transform done on them?
168 Order the output rules sensibly, so FOO_SOURCES and FOO_OBJECTS are
169 together and rules are in the usual order.
171 Make the output minimal: only output definitions for variables that
172 are used.
174 Look at dist's jmake for ideas.  dist is the name of the distribution
175 including Metaconfig.  Perl uses it.
177 Should handle directory hierarchies deeper than 2.  Right now there is
178 some support for this.  Here are some of the issues:
179 * Should handle AC_CONFIG_SUBDIRS, ie must handle configure.in in subdirs
180 * Must handle SUBDIRS in subdir Makefile.am's
182 These can both be handled via dist-local:
183 . Consider supporting guile-style PLUGIN directories automatically?
184 . Consider allowing eg "foo/bar" to appear in EXTRA_DIST, and generating
185   code to make directory foo at dist time
187 ================================================================
189 Document:
192 Defined variables, their meanings, and their effects:
194 DEFS           cpp definitions
195 INCLUDES       -I options to cpp
196 CPPFLAGS       more cpp flags
197 CFLAGS         flags to cc
198 COMPILE        how to compile a C program
199 LINK           how to link a C program
201 DIST_SUBDIRS   directories which are copied verbatim into the
202                distribution.  Used eg for directories holding
203                only example code (which don't have their own
204                makefile).  This variable might be a bad idea.
205   [ should just require a new Makefile.am.  They are supposed to be
206     easy to write ]
208 Document customary ordering of Makefile.am.  From François.
210 must document that @ALLOCA@ works in _LDADD
212 Must document BUILT_SOURCES variable.  See depend.am.
214 Should include extended version of diagram from Autoconf (suggested by
215 Greg Woods)
217 Must document macros which can be used when writing one's own rules.
218 Must document INCLUDES
220 Document gettext support
222 Make a definition of the term "source"
224 need xref to libtool in docs
226 document how to use Automake with CVS.  Idea from Mark Galassi.  Also
227 include Greg Woods' more sophisticated "cvs-dist" target.
229 ================================================================
231 Libraries:
233 * Should support standalone library along with subdir library in same
234   Makefile.am.  Maybe: turn off "standalone" mode if library's Makefile.am
235   is not only one specd? [ add an option for this ]
237 ================================================================
239 Have a program that generates a Makefile on stdout, passes it through
240 a "config.status"-style filter, and thence into make.  Why bother,
241 other than the gee-whiz factor?
243 Would it be useful to integrate in some way with the Debian package
244 building utility?  Must check.  maybe it would be possible to deal
245 with all the different package utilities somehow.  Lately I've been
246 hearing good things about the RedHat packaging utilities.  Why are
247 there so many of these?  Are they fun to write or something?
248 The RedHat package utility is called RPM; see
249         ftp://ftp.redhat.com/pub/code/rpm
250 It actually has problems, like no configure script and no documentation.
252 ================================================================
254 A tool to guess what the local Makefile.am should look like:
256 * Probably integrate with autoscan
257 * Use various simple rules to determine what to do:
258   * get name of top directory, sans version info
259   * search for .c files with 'main' in them
260     * if in main.c, use directory name for program
261     * if in more than one, generate multiple programs
262     * if not found, generate a library named after directory
263   * order subdir searches correctly: lib first, src last
264   * assume 'testsuite' dir means we are using dejagnu
265 * maybe be smart about reading existing Makefile.am, so tool
266   can be run for incremental changes?  You could imagine:
268         Makefile.am:
269                 autoproject --incremental
271 ================================================================
273 Stuff NOT to do, and why:
275 consider auto-including any file that matches "*.in".
276   [ no: po/Makefile.in shouldn't be included ]
278 must look at mkid to see how it works (for subdir usage)
279   [ right now, it doesn't.  i don't see a simple fix right now ]
281 if configure.in not found, move up a directory and try again?  This
282 could eliminate a common source of problems.
283   [ this is just a bad idea ]