1 check should depend on all
4 refactor handle_source_transform and handle_single_transform_list
5 we suffer combinatorial explosion here, but there's no need to
6 we could transform source variables one at a time
8 the new YFLAGS code doesn't correctly handle srcdir
10 allow foo_NAME to rename an object (library or program)
13 remove _LTLIBRARIES and just use _LIBRARIES
14 then use this for zip/jar as well
16 consider `sub am_unique_error', which only prints a given error
17 message once. Use eg in lang_c_rewrite for ansi2knr error
20 investigate problems with conditionally defined libraries
22 add an error if the user makefile.am violates our
25 have 'make check' print tests which are skipped
27 we need a document describing automake from the end user's point of view
28 eg describe INSTALL_HEADER there, among other things
34 > DISTCLEAN -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES)
36 > maintainer-clean-generic:
37 > +## FIXME: shouldn't we really print these messages before running
38 > +## the dependencies?
39 > + @echo "This command is intended for maintainers to use"
40 > + @echo "it deletes files that may require special tools to rebuild."
44 > I'd like to eventually fix the FIXME comment by having
45 > maintainer-clean look like:
51 > We're left with the question of whether we should repeat them in every
56 > Hmm... Interesting. It must have been a side effect of the enabling
57 > of forced `relink' on GNU/Linux/x86. Anyway, on platforms that
58 > actually require relinking, this problem remains, and I see no way to
59 > overcome it other than arranging for automake to install libraries
60 > before executables, as you suggest. This shouldn't be a big problem,
63 > A bigger problem could show up if two libraries in the same directory,
64 > one dependent on the other, are installed concurrently. If relinking
65 > is needed for the dependent library, we have a problem. It appears to
66 > me that user will have to live without `make -j install', in this
70 > Here's an Automake patch and changelog entry allow make -j install on
71 > such degenerate systems (and Linux with buggy libtool <g>)
73 > If you install to locations other that bin_ and lib_ then a larger fix
74 > is necessary, but this should fix the 90% case.
76 * think about how per-object flags should work. in particular:
77 * how should they be specified?
78 using the object name is confusing when .lo/.obj in use
79 however, the object name provides a nice interaction with
81 * how should they interact with per-executable flags?
82 [ this is probably a feature in search of a problem ]
84 * cross-compilation support:
85 programs built and used by the build process need to be
86 built for CC_FOR_BUILD
87 introduce a new prefxi for this, e.g. `build_PROGRAMS'
88 [ we can do this in an automatic way I think.
89 unfortunately it isn't that useful until autoconf has support
90 for this sort of thing as well ]
92 * distcheck should make sure that each file that uses _() is
95 # Verify that all source files using _() are listed in po/POTFILES.in.
97 grep -E -v '^(#|$$)' po/POTFILES.in | sort > $@-1
98 grep -E -l '\b_\(' lib/*.c src/*.c | sort > $@-2
102 * one performance enhancement would be to have autoconf write
103 a single file containing all the macro assignments.
104 then read this file via `include'
105 unfortunately this can't be done because of conditionals
106 -- but it could be made to work if we also changed:
107 * automake to rewrite @FOO@ to $(FOO), and
108 * the implementation of conditionals to rely on some new
111 * support prog_LIBS as override for LIBS
113 * Scan configure.in using traces as autoheader does.
114 This will be much more reliable.
116 * Test subdir-objects option with yacc, lex, ansi2knr
117 Our locking scheme won't prevent a parallel make from losing
118 if there are two `bar.o' files and the timing is just right
119 This only happens with parallel make and no-`-c -o' compiler,
120 so it probably isn't very important
121 `-c -o' when doing libtool
122 try to find a losing compiler and see if it really works.
123 (actually: hack config.cache and do it)
126 ** We're using `$<' in explicit rules when using per-exe flags
127 ** per-exe flags don't work for CPPFLAGS/YFLAGS/LFLAGS. Fix.
128 ** LIBOBJS shouldn't be used when there are per-exe flags (?)
130 * Test nodist_SOURCES with lex, yacc, etc.
132 * Support subdir-objects with fortran
134 * Allow creation of Java .zip/.jar files in natural way
135 If you are building a compiled Java library, then the .zip/.jar
136 ought to be made automatically.
138 * Run automake before libtool. It will report an error but
139 still won't put the file into the disty. This is wrong.
140 From Mark H Wilkinson <mhw@kremvax.demon.co.uk>
142 * CFLAGS only defined if C source seen
143 but really it should be a configure variable, shouldn't it?
144 There are other examples of this
145 [ moving to autoconf --trace ought to fix this ]
147 * in gnu/gnits mode, give error if Makefile.am overrides a user
148 variable like CFLAGS.
149 [ this is low priority because the package author can always
150 circumvent our check by redefining in configure.in
151 plus it is probably better to encourage good behavior than to
154 * If we see `foo.o' in LIBOBJS, and we've seen AC_OBJEXT, then complain.
155 [ how will we know that? it is better to handle this automatically
156 via an autoconf hook ]
158 * examine possibility of using any character in a macro name
159 and rewriting names automatically. this means we must rewrite
160 all references as well.
161 [ this is a 2.0-style feature ]
163 * AM_CONFIG_HEADER might generate the wrong stamp file names
164 when given multiple headers. Write a test.
166 * Currently don't correctly handle multiple inputs to a config header.
167 [ this should no matter in the future as acconfig.h and so on are
168 obsoleted by the AH series of macros.]
170 * header stamp files still in wrong dirs.
171 stamp-h.in must be in dir with h.in file
172 stamp-h must be in dir with output file
174 * conditionals and macros
175 Our current scheme cause combinatoric explosion.
177 In fact, to be honest, I no longer understand very well why we perform
178 such a closure. I mean, as is, Automake transforms (this is
181 | bin_PROGRAMS = targ
201 | targ_SOURCES = $(SONE) $(STWO) $(STHREE)
205 | @ONE_FALSE@@THREE_FALSE@@TWO_TRUE@am_targ_OBJECTS = two.$(OBJEXT)
206 | @ONE_FALSE@@THREE_FALSE@@TWO_FALSE@am_targ_OBJECTS =
207 | @ONE_FALSE@@THREE_TRUE@@TWO_TRUE@am_targ_OBJECTS = two.$(OBJEXT) \
208 | @ONE_FALSE@@THREE_TRUE@@TWO_TRUE@ three.$(OBJEXT)
209 | @ONE_FALSE@@THREE_TRUE@@TWO_FALSE@am_targ_OBJECTS = three.$(OBJEXT)
210 | @ONE_TRUE@@THREE_FALSE@@TWO_TRUE@am_targ_OBJECTS = one.$(OBJEXT) \
211 | @ONE_TRUE@@THREE_FALSE@@TWO_TRUE@ two.$(OBJEXT)
212 | @ONE_TRUE@@THREE_FALSE@@TWO_FALSE@am_targ_OBJECTS = one.$(OBJEXT)
213 | @ONE_TRUE@@THREE_TRUE@@TWO_TRUE@am_targ_OBJECTS = one.$(OBJEXT) \
214 | @ONE_TRUE@@THREE_TRUE@@TWO_TRUE@ two.$(OBJEXT) three.$(OBJEXT)
215 | @ONE_TRUE@@THREE_TRUE@@TWO_FALSE@am_targ_OBJECTS = one.$(OBJEXT) \
216 | @ONE_TRUE@@THREE_TRUE@@TWO_FALSE@ three.$(OBJEXT)
218 why don't we just output
220 | @ONE_TRUE@am_SONE_OBJECTS = one.$(OBJEXT)
221 | @ONE_FALSE@am_SONE_OBJECTS =
223 | @TWO_TRUE@am_STWO_OBJECTS = two.$(OBJEXT)
224 | @TWO_FALSE@am_STWO_OBJECTS =
226 | @THREE_TRUE@am_STHREE_OBJECTS = three.$(OBJEXT)
227 | @THREE_FALSE@am_STHREE_OBJECTS =
229 | am_targ_OBJECTS = $(am_SONE_OBJECTS) $(am_STWO_OBJECTS) $(am_STHREE_OBJECTS)
231 which means also, why do we look for the closure of PROGRAMS, instead
232 of just adding $(EXEEXT) to all its components and sub components
233 (i.e., inside sub vars such as $(SONE) above being a sub var of
237 Aaaaaaaaaaah! I think I know... Must be because of `+='.
239 Hm... No. Indeed we transform
248 | @BAR_TRUE@FOO = foo bar
249 | @BAR_FALSE@FOO = foo
251 but this seems good to me too?
253 | FOO = foo $(BAR_FOO)
254 | @BAR_TRUE@BAR_FOO = bar
255 | @BAR_FALSE@BAR_FOO =
262 ... this ought to work. The fix is probably complicated, but might
263 come for free when we rewrite the handling of conditionals.
265 * `distcheck' and `dist' should depend on `all'
267 * Add code to generate foo-config script like gnome, gtk
269 * `DEFS += foo' won't work.
270 That's because DEFS is defined in header-vars.am, which is read
271 after the user's Makefile.am.
272 This will be a problem for any macro defined internally
273 [ fixing this will probably fix the nasty `exeext redefines
274 foo_PROGRAMS' hack that is in there right now ]
275 [ we currently give an error when this occurs, so this is very low
278 * document user namespace for macro/target names
279 adopt some conventions and use uniformly
280 [ this is a good thing for the rewrite ]
282 * make distcheck uses directories like `=build'.
283 Some (very rare) POSIX systems don't support `=' in filenames.
284 If this ever becomes a problem, fix it
286 * distclean must remove config.status
287 can't this cause problems for maintainer-clean?
288 shouldn't maintainer-clean print the message before running
289 any part of the make? (just to slow things down long enough
290 for the user to stop it)
291 (maybe doesn't matter since people who even know about
292 maintainer-clean already have a clue)
294 * reintroduce AM_FUNC_FNMATCH which sets LIBOBJS
295 Then have automake know about fnmatch.h.
296 [ probably should wait for autoconf to get right functionality ]
298 * "make diff" capability
299 look at gcc's Makefile.in to see what to do
300 or look at maint program
302 * in --cygnus, clean-info not generated at top level
304 * what if an element of a scanned variable looks like
306 or some other arbitrary thing?
307 right now we try to cope, but not very well
308 [ this is only of theoretical interest for now ]
310 * make sure every variable that is used is also defined
311 [ we don't really look at variable uses in detail.
314 * make sure `missing' defines are generated
316 * missing should handle install -d and rmdir -p (for uninstall)
318 * notice when a .c file is a target somewhere, and auto-add it to
321 * NORMAL_INSTALL / NORMAL_UNINSTALL -vs- recursive rules
322 [ requires changes to the standard ]
324 * copyrights on m4 files, aclocal output
326 * should not put texiname_TEXINFOS into distribution
327 should rename this macro anyway, to foo_texi_DEPENDENCIES
329 * *all* installed scripts should support --version, --help
331 * For now I guess I'll just have automake give an error if it encounters
332 non-C source in a libtool library specification.
334 * must split $obj into two parts: one for libtool and one for
335 deansification. Otherwise .S files will be deansified!
337 * ansi2knr must currently appear in a directory that has some source
339 * if program has the same name as a target, do something sensible:
340 - if the target is internal, rename it
341 - if the target is mandated (eg, "info"), tell the user
342 consider auto-modifying the program name to work around this
344 * should separate actual options from strictness levels
345 strictness should only cover requirements
346 You should be able to pick and choose options
348 * rewrite in guile (RMS request)
349 at the same time, consider adding a GUI
350 could use the same parsing code for the GUI and the standalone version
351 that means figuring out a better representation of internal state
352 [ that's easy -- anything is better than what we have now ]
354 having just one Makefile for a project would give a big speed increase
355 for a project with many directories, eg glibc. ideally (?) you'd
356 still be able to have a Makefile.am in each directory somehow; this
357 might make editing conceptually easier.
359 * finish up TAGS work
361 * only remove libtool at top level?
363 * clean up source directory by moving stuff into subdirs
365 * consider adding pkglibexecdir, maybe others?
366 requests for pkg-dirs with version included
368 Avoid loops when installing; instead unroll them in automake
371 * completely handle multi-":" mode for AC_CONFIG_HEADER
372 * Scan multiple input files when Makefile is generated?
373 This would provide flexibility for large projects; subsumes
374 the "Makefile.tmpl" idea
376 [ can't do this. must explain why in manual.
377 basically, solving all the problems is too hard
378 like: how to remove redundancies between generated .in files
379 instead should implement `include' directive for Makefile.am ]
380 * for multi-":" mode and AC_OUTPUT, it might be good to pick the
381 first input file that has a corresponding .am file.
383 Some long-term projects:
384 * if $(FOO) is used somewhere, ensure FOO is defined, either by
385 user or by automake if possible
387 [ include, += support ]
388 * even better would be allowing targets in different included
389 fragments to be merged. e.g., `install-local'.
391 consider putting all check-* targets onto @check?
392 To support --help/--version checking?
394 take diff-n-query code from libit
397 Per> 1) Being able to build a set of non-source programs
398 Per> from source programs, without necessarily linking them together.
399 Per> I.e. one should be able to say something like:
400 Per> dummy_SOURCES=foo.c bar.c
401 Per> and automake should realize that it needs to build foo.o and bar.o.
402 Per> 2) Being intelligent about new kinds of suffixes.
404 Per> SUFFIXES = .class .java
405 Per> and a suffix rule of the form:
407 Per> then it should be able to realize it can build .class files from
408 Per> .java files, and thus be able to generate a list of
409 Per> .class files from a list of .java source files.
411 !! Must fix require_file stuff. It is really gross, and I don't
412 understand it any more.
414 Jim's idea: should look for @setfilename and warn if filenames too long
417 from joerg-martin schwarz:
418 -- If Makefile.am contains $(CC), $(COMPILE), $(YLWRAP), ....
419 in an explicitly written rule, you should emit the corresponding
420 Makefile variables automatically.
422 Configuring in the large:
423 * allow hierarchy of dirs to share one aclocal.m4
426 consider printing full file name of Makefile.am or configure.in when
427 giving error. This would help for very large trees with many
430 From the GNU Standards. These things could be checked, and probably
432 * Make sure that the directory into which the distribution unpacks (as
433 well as any subdirectories) are all world-writable (octal mode 777).
434 * Make sure that no file name in the distribution is more than 14
436 * Don't include any symbolic links in the distribution itself.
438 * Make sure that all the files in the distribution are world-readable.
439 ** also, check --help output and --version output. Idea from François
440 * standards no longer prohibit ANSI C. What does this imply
441 for the de-ansi-fication feature? [ must keep it -- some users rely on it ]
443 should be able to determine what is built by looking at rules (and
444 configure.in). Then built man pages (eg) could automatically be
445 omitted from the distribution.
447 Henrik Frystyk Nielsen says:
448 Henrik> 4) Flags like --include-deps are lost when you make changes to
449 Henrik> Makefile.am files and automake is run automatically. It would
450 Henrik> be nice to keep these flags as I now have to redo everything
452 ... what about other options here too?
454 Think about: maybe "make check" should just bomb if error occurs?
455 Then user must use "make -k check". This is probably more natural.
457 Consider: "cvs" option adds some cvs-specific rules?
459 Right now, targets generated internally (eg "install") are not
460 overridable by user code. This should probably be possible, even
461 though it isn't very important. This could be done by generating all
462 internal rules via a function call instead of just appending to
464 [ this will be harder to implement when scanning a rule like all-recursive
467 * Should be a way to have "nobuild_PROGRAMS" which aren't even built,
468 but which could be by running the magic make command.
471 * Must rewrite am_install_var. Should break into multiple functions.
472 This will allow the callers to be a little smarter.
473 * Rewrite clean targets.
474 * Must rewrite error handling code. Right now it is a real mess
475 Should fix up require_file junk at the same time
477 djm wants ``LINKS'' variable; list of things to link together after
478 install. In BSD environment, use:
479 LINKS = from1 to1 from2 to2 ...
481 Need way to say there are no suffixes in a Makefile (Franc,ois'
482 "override" idea suffices here)
484 Check to make sure various scripts are executable (IE when looking for
487 Handle dist-zoo. Generally add more DOS support. Maybe run "doschk"
488 (why isn't this merged with "pathchk"?) when doing a dist. Do
489 whatever else François says here...
491 Add support for html via an option. Use texi2html. Use
492 "html_TEXINFOS", and htmldir = .../html. Include html files in
493 distribution. Also allow "html_DATA", for raw .html files.
494 [ when will texinfo directly support html? ]
496 uninstall and pkg-dirs should rm -rf the dir.
498 a potential bug: configure puts "blah.o" into LIBOBJS, thus implying
499 these files can't be de-ansified. Not a problem?
500 [ fix by using ansi2knr wrapper program ]
502 In general most .am files should be merged into automake. For
503 instance all the "clean" targets could be merged by keeping lists of
504 things to be removed. This would be a lot nicer looking. Note that
505 the install targets probably should not be merged; it is sometimes
506 useful to only install a small part.
508 * Clean up the output:
509 ** Order rules sensibly
510 ** Ensure every line has a purpose. Omit unused stuff
511 ** Eliminate extraneous rules when possible (eg 'install-am' stuff)
512 ** Make sure vertical spacing is correct
513 Omit program transform vars from header if no program installed. This
514 is currently pretty hard to do. (But with beautification code it
515 would probably be easy)
518 ** It would be nice to automatically support using bison's better features
519 to rename the output files. This requires autoconf support
520 ** Consider supporting syntax from autoconf "derived:source", eg:
522 for yacc and lex source
523 ** what if you use flex and the option to avoid -lfl?
526 * Multi-language support:
527 ** should have mapping of file extensions to languages
528 ** should automatically handle the linking issue (special-case C++)
529 ** must get compile rules for various languages; FORTRAN probably
530 most important unimplemented language
531 This should be integrated in some way with Per's idea.
532 Eg .f.o rules should be recognized & auto-handled in _SOURCES
533 That way any random language can be treated with C/C++ on a first-class
536 It might be cool to generate .texi dependencies by grepping for
537 @include. (If done, it should be done the same way C dependencies are
540 It would be good to check some parts of GNU standards. Already check
541 for install-sh and mkinstalldirs. What else is required to be in
542 package by GNU standards or by automake?
543 Some things for --strictness=gnits:
544 * "cd $(foo); something" is an error in a rule. Should be:
545 "cd $(foo) && something"
546 * Look for 'ln -s' and warn about using $(LN) and AC_PROG_LN_S
547 * Look for $(LN) and require AC_PROG_LN_S
549 Auto-distribute "ChangeLog.[0-9]+"? "ChangeLog.[a-z]+"?
551 Internationalize. [ gettext doesn't have the necessary machinery yet ]
552 am_error should use printf-style arguments (for eventual gettext scheme)
554 François says the ordering of files in a distribution should be as follows:
558 I agree, but I don't see how to implement this yet.
559 It might be easier if "derived files" is limited to those that
560 Automake itself knows about, eg output of yacc.
562 Check all source files to make sure that FSF address is up-to-date.
563 --gnits or --gnu only.
565 Merge each -vars.am file with corresponding ".am" file. Can do this
566 because of changes to &file_contents.
568 Should libexec programs have the name transform done on them?
570 Order the output rules sensibly, so FOO_SOURCES and FOO_OBJECTS are
571 together and rules are in the usual order.
573 Make the output minimal: only output definitions for variables that
577 David> To avoid comments like the one about subdirs getting buried in
578 David> the middle of a Makefile.in, how about pushing comments that
579 David> start with ### to the top of the Makefile.in (in order)? Sort
580 David> of like how Autoconf uses diversions to force initialization
581 David> code to the top of configure.
584 Karl> 2) Your Makefile variable names are generally uppercase, but GNU
585 Karl> generally uses lowercase. Not that it matters :-).
587 ================================================================
591 probably should put each group of m4 files into a subdir owned by the
592 containing application.
594 ================================================================
600 how to use the generated makefiles
603 - NORMAL_INSTALL junk
605 what goes in AC_CONFIG_AUX_DIR
607 multi-":" mode in AC_OUTPUT -- automake only looks at the first file
608 also a note on how a .am file is found in this case
610 rationale for avoiding
611 make CFLAGS="$CFLAGS" ...
614 a package that installs its own aclocal macros
616 write example of using automake with dejagnu
617 follow calc example in dejagnu docs
619 document which variables are actually scanned and which are not.
621 Document customary ordering of Makefile.am. From François.
623 Should include extended version of diagram from Autoconf (suggested by
626 Make a definition of the term "source"
628 document how to use Automake with CVS. Idea from Mark Galassi. Also
629 include Greg Woods' more sophisticated "cvs-dist" target.
631 document rebuilding configure. CONFIGURE_DEPENDENCIES
632 CONFIG_STATUS_DEPENDENCIES
634 -- must document all variables that are supposed
635 to be public knowledge
637 must document the targets required for integration with
638 non-automake-using subdirs
640 document the "make SHELL='/bin/sh -x'" trick for debugging
642 section on relationship to GNU make. include notes on parallel makes
646 move discussion of cygwin32, etags, mkid under other gnu tools
650 ================================================================
652 Things to do for gcc:
654 Regularize dependency generation. Add new flags:
656 -MH Generate a dummy dependency for each header file mentioned.
660 Set name of output file
662 Then automake can use -MD -MH -MT 'foo.o foo.lo' -MF .deps/...
664 ================================================================
668 * Should support standalone library along with subdir library in same
669 Makefile.am. Maybe: turn off "standalone" mode if library's Makefile.am
670 is not only one specd? [ add an option for this ]
672 ================================================================
676 Would it be useful to integrate in some way with the Debian package
677 building utility? Must check. maybe it would be possible to deal
678 with all the different package utilities somehow. Lately I've been
679 hearing good things about the RedHat packaging utilities. Why are
680 there so many of these? Are they fun to write or something?
681 The RedHat package utility is called RPM; see
682 ftp://ftp.redhat.com/pub/code/rpm
683 It actually has problems, like no configure script and no documentation.
685 For Cygnus it would probably be good to be able to handle the native
686 package utility on each platform. There are probably 3 or 4 of these
687 (sysv, solaris?, aix?)
689 tcl/unix/Makefile.in has some code to generate a Solaris package.
691 Automake probably can't do all of this on its own. A new tool might
694 I have some notes from a Debian developer on how the integration
697 ================================================================
699 A tool to guess what the local Makefile.am should look like:
700 (see Gord's Maint program!)
702 * Probably integrate with autoscan
703 * Use various simple rules to determine what to do:
704 * get name of top directory, sans version info
705 * search for .c files with 'main' in them
706 * if in main.c, use directory name for program
707 * if in more than one, generate multiple programs
708 * if not found, generate a library named after directory
709 * order subdir searches correctly: lib first, src last
710 * assume 'testsuite' dir means we are using dejagnu
711 * maybe be smart about reading existing Makefile.am, so tool
712 can be run for incremental changes? You could imagine:
715 autoproject --incremental
717 ================================================================
719 Stuff NOT to do, and why:
721 consider auto-including any file that matches "*.in".
722 [ no: po/Makefile.in shouldn't be included ]
724 must look at mkid to see how it works (for subdir usage)
725 [ right now, it doesn't. i don't see a simple fix right now ]
727 if configure.in not found, move up a directory and try again? This
728 could eliminate a common source of problems.
729 [ this is just a bad idea ]
731 * scripts are installed in $exec_prefix/bin, not $prefix/bin
733 [ the consensus on Gnits is that this isn't required.
734 doubters can work around it anyway ]
736 Scan source directories and warn about missing files, eg .c/.h files
737 that aren't mentioned?
738 [ distcheck makes this less useful ]
741 - how to install file with a space in its name?
742 [ don't bother with this -- make is just too losing ]
746 Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 Free Software
749 This file is part of GNU Automake.
751 GNU Automake is free software; you can redistribute it and/or modify
752 it under the terms of the GNU General Public License as published by
753 the Free Software Foundation; either version 2, or (at your option)
756 GNU Automake is distributed in the hope that it will be useful,
757 but WITHOUT ANY WARRANTY; without even the implied warranty of
758 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
759 GNU General Public License for more details.
761 You should have received a copy of the GNU General Public License
762 along with autoconf; see the file COPYING. If not, write to
763 the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
764 Boston, MA 02111-1307, USA.