summaryrefslogtreecommitdiff
path: root/TODO
blob: eb663a4a2986e7f189c55b0aa58b15c804d760e9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
Priorities for release:
??? targets for EXTRA_ should not be generated!!!
* Fix all mkinstalldirs invocations
* separate dist and distdir targets, so recursive uses of Automake work ok

* Add no-remake option
* scripts are installed in $exec_prefix/bin, not $prefix/bin
  Bug or feature?

* Add support for libtool
* At top level, config.h is not depended on...
* Must look for/enforce existence of stamp-h.in in srcdir?
   ... there is something broken here...
* Should be a way to have "nobuild_PROGRAMS" which aren't even built,
  but which could be by running the magic make command.

Other priorities:
* Must rewrite am_install_var.  Should break into multiple functions.
  This will allow the callers to be a little smarter.
* Rewrite clean targets.
* Must rewrite error handling code.  Right now it is a real mess
  Should fix up require_file junk at the same time

Things to finish libtool support:
* Handle grody compilation issue
* Handle install changes
* Handle clean changes
* New definition for LINK

* search for gnu tar and substitute in dist targets?

Scan source directories and warn about missing files, eg .c/.h files
that aren't mentioned?

Gord Matzigkeit says:
> Can there be a way to specify that only object files be built?
> This is useful for testing dynamic linking (the dld library) and
> loadable kernel modules.

Currently gettext requires @INTLSUB@ and @POSUB@ in SUBDIRS.  In the
future this will be just intl and po.  When that happens, re-enable
warnings in handle_subdirs.

Need way to say there are no suffixes in a Makefile

Check to make sure various scripts are executable (IE when looking for
them in a directory)

Testing: allow support for Cygnus-style dejagnu-based test suites via
an option

Think about ways to make automake fit better with Cygnus-style trees.

Use recode in dist target when MAINT_CHARSET specified.  Read caveats
in automake.in before doing this.  Note the same problem used to apply
to the no-dependencies option; maybe it still should?  Note also that
each Makefile.am must be rewritten at "make dist" time if
MAINT_CHARSET and DIST_CHARSET are not identical.  NOTE: gettext must
arrange for all .po files not to be recoded.  In the long term this
might be a problem (consider when some systems use Unicode but the
rest do not)

Handle dist-zoo and dist-zip.  Generally add more DOS support.  Maybe
run "doschk" (why isn't this merged with "pathchk"?) when doing a
dist.  Do whatever else François says here...

Add support for html via an option.  Use texi2html.  Use
"html_TEXINFOS", and htmldir = .../html.  Include html files in
distribution.  Also allow "html_DATA", for raw .html files.
  [ when will texinfo support html? ]

uninstall and pkg-dirs should rm -rf the dir.

a potential bug: configure puts "blah.o" into LIBOBJS, thus implying
these files can't be de-ansified.  Not a problem?

In general most .am files should be merged into automake.  For
instance all the "clean" targets could be merged by keeping lists of
things to be removed.  This would be a lot nicer looking.  Note that
the install targets probably should not be merged; it is sometimes
useful to only install a small part.

Clean up the output:
* Order rules sensibly
* Ensure every line has a purpose.  Omit unused stuff
* Eliminate extraneous rules when possible (eg 'install-am' stuff)
* Make sure vertical spacing is correct
* pretty-print targets
* regularize how backslash-newline is done.  Just one space between text
  and backslash should be the rule.  Update makefile-mode to allow this.
  (set column to 0, probably)
Omit program transform vars from header if no program installed.  This
is currently pretty hard to do.  (But with beautification code it
would probably be easy)

It should be possible to have ansi2knr in just one place in a package.
Jim Meyering says just rely on configure to make links as appropriate.
Maybe introduce syntax like this:
	AUTOMAKE_OPTIONS = ../ansi2knr
?  Consider putting it into AC_CONFIG_AUX_DIR

Lex, yacc support:
* It would be nice to automatically support using bison's better features
  to rename the output files.  This requires autoconf support
* Consider supporting syntax from autoconf "derived:source", eg:
	y.tab.c:perly.y
  for yacc and lex source
* if AC_PROG_LEX used, ensure LEXLIB is in foo_LDADD
* require AC_DECL_YYTEXT for lex

require AC_PROG_CXX if any C++ source files found?
Better support for C++ all around

Write autoconf macro to do all work necessary for automake.  Eg define
PACKAGE, VERSION, etc.

'maintainer-clean' should "rm -rf .deps".  Ditto distclean
Should look for clean-local targets in Makefile.am.

It might be cool to generate .texi dependencies by grepping for
@include.  (If done, it should be done the same way C dependencies are
done)

It would be good to check some parts of GNU standards.  Already check
for install-sh and mkinstalldirs.  What else is required to be in
package by GNU standards or by automake?
Some things for --strictness=gnits:
* "cd $(foo); something" is an error in a rule.  Should be:
  "cd $(foo) && something"
* Look for 'ln -s' and warn about using $(LN) and AC_PROG_LN_S
* Look for $(LN) and require AC_PROG_LN_S

automake.in: should ".cc" really -> "$o"?  This doesn't really seem
right, but maybe it is so names can be rewritten uniformly?  Must
check

Auto-distribute "ChangeLog.[0-9]+"?  "ChangeLog.[a-z]+"?

Internationalize. [ gettext doesn't have the necessary machinery yet ]
am_error should use printf-style arguments (for eventual gettext scheme)

François says the ordering of files in a distribution should be as follows:
* README
* source files
* derived files
I agree, but I don't see how to implement this yet.
It might be easier if "derived files" is limited to those that
Automake itself knows about, eg output of yacc.

Check all source files to make sure that FSF address is up-to-date.
--gnits or --gnu only.

Merge each -vars.am file with corresponding ".am" file.  Can do this
because of changes to &file_contents.

Looked at a program called 'ezmake', which seems to do something
similar.  The only idea there that is possibly worth stealing is using
globs in definitions.  Also has negations.  Eg in a directory with
files a.c, b.c and c.c, the line:
	foo_SOURCES = *.c ~c.c
would be equivalent to:
	foo_SOURCES = a.c b.c
Is this worth implementing?

Should libexec programs have the name transform done on them?

Order the output rules sensibly, so FOO_SOURCES and FOO_OBJECTS are
together and rules are in the usual order.

Make the output minimal: only output definitions for variables that
are used.

Look at dist's jmake for ideas.  dist is the name of the distribution
including Metaconfig.  Perl uses it.

Should handle directory hierarchies deeper than 2.  Right now there is
some support for this.  Here are some of the issues:
* Should handle AC_CONFIG_SUBDIRS, ie must handle configure.in in subdirs
* Must handle SUBDIRS in subdir Makefile.am's

These can both be handled via dist-local:
. Consider supporting guile-style PLUGIN directories automatically?
. Consider allowing eg "foo/bar" to appear in EXTRA_DIST, and generating
  code to make directory foo at dist time

================================================================

Document:


Defined variables, their meanings, and their effects:

DEFS           cpp definitions
INCLUDES       -I options to cpp
CPPFLAGS       more cpp flags
CFLAGS         flags to cc
COMPILE	       how to compile a C program
LINK           how to link a C program

DIST_SUBDIRS   directories which are copied verbatim into the
               distribution.  Used eg for directories holding
               only example code (which don't have their own
               makefile).  This variable might be a bad idea.
  [ should just require a new Makefile.am.  They are supposed to be
    easy to write ]

Document customary ordering of Makefile.am.  From François.

must document that @ALLOCA@ works in _LDADD

Must document BUILT_SOURCES variable.  See depend.am.

Should include extended version of diagram from Autoconf (suggested by
Greg Woods)

Must document macros which can be used when writing one's own rules.
Must document INCLUDES

Document gettext support

Make a definition of the term "source"

need xref to libtool in docs

================================================================

Libraries:

* Should support standalone library along with subdir library in same
  Makefile.am.  Maybe: turn off "standalone" mode if library's Makefile.am
  is not only one specd? [ add an option for this ]

================================================================

Have a program that generates a Makefile on stdout, passes it through
a "config.status"-style filter, and thence into make.  Why bother,
other than the gee-whiz factor?

Would it be useful to integrate in some way with the Debian package
building utility?  Must check.  maybe it would be possible to deal
with all the different package utilities somehow.  Lately I've been
hearing good things about the RedHat packaging utilities.  Why are
there so many of these?  Are they fun to write or something?
The RedHat package utility is called RPM; see
	ftp://ftp.redhat.com/pub/code/rpm
It actually has problems, like no configure script and no documentation.

================================================================

A tool to guess what the local Makefile.am should look like:

* Probably integrate with autoscan
* Use various simple rules to determine what to do:
  * get name of top directory, sans version info
  * search for .c files with 'main' in them
    * if in main.c, use directory name for program
    * if in more than one, generate multiple programs
    * if not found, generate a library named after directory
  * order subdir searches correctly: lib first, src last
  * assume 'testsuite' dir means we are using dejagnu
* maybe be smart about reading existing Makefile.am, so tool
  can be run for incremental changes?  You could imagine:

	Makefile.am:
		autoproject --incremental

================================================================

Stuff NOT to do, and why:

consider auto-including any file that matches "*.in".
  [ no: po/Makefile.in shouldn't be included ]

must look at mkid to see how it works (for subdir usage)
  [ right now, it doesn't.  i don't see a simple fix right now ]

if configure.in not found, move up a directory and try again?  This
could eliminate a common source of problems.
  [ this is just a bad idea ]