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