configure.mak 1.3 KB

123456789101112131415161718192021222324252627282930313233343536
  1. # -*- make -*-
  2. # This make fragment is included by the toplevel make to handle configure
  3. # and setup. It defines a target called startup that when run will init
  4. # the build directory, generate configure from configure.in, create aclocal
  5. # and has rules to run config.status should one of the .in files change.
  6. # Input
  7. # BUILDDIR - The build directory
  8. # CONVERTED - List of files output by configure $(BUILD) is prepended
  9. # The caller must provide depends for these files
  10. # It would be a fairly good idea to run this after a cvs checkout.
  11. BUILDDIR=build
  12. .PHONY: startup
  13. startup: configure $(BUILDDIR)/config.status $(addprefix $(BUILDDIR)/,$(CONVERTED))
  14. # use the files provided from the system instead of carry around
  15. # and use (most of the time outdated) copycats
  16. buildlib/config.sub:
  17. ln -sf /usr/share/misc/config.sub buildlib/config.sub
  18. buildlib/config.guess:
  19. ln -sf /usr/share/misc/config.guess buildlib/config.guess
  20. configure: aclocal.m4 configure.in buildlib/config.guess buildlib/config.sub
  21. autoconf
  22. aclocal.m4: $(wildcard buildlib/*.m4)
  23. aclocal -I buildlib
  24. $(BUILDDIR)/config.status: configure
  25. /usr/bin/test -e $(BUILDDIR) || mkdir $(BUILDDIR)
  26. (HERE=`pwd`; cd $(BUILDDIR) && $$HERE/configure)
  27. $(addprefix $(BUILDDIR)/,$(CONVERTED)):
  28. (cd $(BUILDDIR) && ./config.status)