Next: Makefile.in in src/, Previous: config.h.in at top level, Up: Files You Must Create or Alter [Contents][Index]
Here are a few modifications you need to make to your main, top-level Makefile.in file.
PACKAGE = @PACKAGE@ VERSION = @VERSION@
If you are using Makefiles, either generated by automake, or hand-written so they carefully follow the GNU coding standards, the effected goals for which the new subdirectories must be handled include ‘installdirs’, ‘install’, ‘uninstall’, ‘clean’, ‘distclean’.
Here is an example of a canonical order of processing. In this
example, we also define SUBDIRS
in Makefile.in
for it
to be further used in the ‘dist:’ goal.
SUBDIRS = doc lib src po
distdir = $(PACKAGE)-$(VERSION) dist: Makefile rm -fr $(distdir) mkdir $(distdir) chmod 777 $(distdir) for file in $(DISTFILES); do \ ln $$file $(distdir) 2>/dev/null || cp -p $$file $(distdir); \ done for subdir in $(SUBDIRS); do \ mkdir $(distdir)/$$subdir || exit 1; \ chmod 777 $(distdir)/$$subdir; \ (cd $$subdir && $(MAKE) $@) || exit 1; \ done tar chozf $(distdir).tar.gz $(distdir) rm -fr $(distdir)
Note that if you are using GNU automake
, Makefile.in is
automatically generated from Makefile.am, and all needed changes
to Makefile.am are already made by running ‘gettextize’.
Next: Makefile.in in src/, Previous: config.h.in at top level, Up: Files You Must Create or Alter [Contents][Index]