gettext: Makefile

1 
1 13.4.11 ‘Makefile.in’ at top level
1 ----------------------------------
1 
1    Here are a few modifications you need to make to your main, top-level
1 ‘Makefile.in’ file.
1 
1   1. Add the following lines near the beginning of your ‘Makefile.in’,
1      so the ‘dist:’ goal will work properly (as explained further down):
1 
1           PACKAGE = @PACKAGE@
1           VERSION = @VERSION@
1 
1   2. Add file ‘ABOUT-NLS’ to the ‘DISTFILES’ definition, so the file
1      gets distributed.
1 
1   3. Wherever you process subdirectories in your ‘Makefile.in’, be sure
1      you also process the subdirectories ‘intl’ and ‘po’.  Special rules
1      in the ‘Makefiles’ take care for the case where no
1      internationalization is wanted.
1 
1      If you are using Makefiles, either generated by automake, or
1      hand-written so they carefully follow the GNU coding standards, the
1      effected goals for which the new subdirectories must be handled
1      include ‘installdirs’, ‘install’, ‘uninstall’, ‘clean’,
1      ‘distclean’.
1 
1      Here is an example of a canonical order of processing.  In this
1      example, we also define ‘SUBDIRS’ in ‘Makefile.in’ for it to be
1      further used in the ‘dist:’ goal.
1 
1           SUBDIRS = doc intl lib src po
1 
1      Note that you must arrange for ‘make’ to descend into the ‘intl’
1      directory before descending into other directories containing code
1      which make use of the ‘libintl.h’ header file.  For this reason,
1      here we mention ‘intl’ before ‘lib’ and ‘src’.
1 
1   4. A delicate point is the ‘dist:’ goal, as both ‘intl/Makefile’ and
1      ‘po/Makefile’ will later assume that the proper directory has been
1      set up from the main ‘Makefile’.  Here is an example at what the
1      ‘dist:’ goal might look like:
1 
1           distdir = $(PACKAGE)-$(VERSION)
1           dist: Makefile
1           	rm -fr $(distdir)
1           	mkdir $(distdir)
1           	chmod 777 $(distdir)
1           	for file in $(DISTFILES); do \
1           	  ln $$file $(distdir) 2>/dev/null || cp -p $$file $(distdir); \
1           	done
1           	for subdir in $(SUBDIRS); do \
1           	  mkdir $(distdir)/$$subdir || exit 1; \
1           	  chmod 777 $(distdir)/$$subdir; \
1           	  (cd $$subdir && $(MAKE) $@) || exit 1; \
1           	done
1           	tar chozf $(distdir).tar.gz $(distdir)
1           	rm -fr $(distdir)
1 
1    Note that if you are using GNU ‘automake’, ‘Makefile.in’ is
1 automatically generated from ‘Makefile.am’, and all needed changes to
1 ‘Makefile.am’ are already made by running ‘gettextize’.
1