FANDOM


Splitting the doc directory from the package sources Edit

These notes assume that we are splitting the package foobar, which has been unpacked in the home directory:

$ cd $ ls foobar-0.0.0.1

Remove the doc directory from the package sources Edit

$ cd foobar-0.0.0.1 $ mv doc ../

Remove doc page entries from the configure.ac file Edit

Edit the configure.ac file and remove any entries relating to the document subdirectory as follows:

AC_CONFIG_FILES

Locate the AC_CONFIG_FILES macros (Note that there may be more than one):

AC_CONFIG_FILES(

 Makefile
 intl/Makefile
 lib/Makefile
 man/Makefile
 po/Makefile.in
 src/Makefile
 tests/Makefile
 )

Remove the reference to doc/Makefile:

AC_CONFIG_FILES(

 Makefile
 bin/Makefile
 intl/Makefile
 lib/Makefile
 man/Makefile
 po/Makefile.in
 src/Makefile
 tests/Makefile
 )

Remove doc directory entries from Makefile.am in the project directory Edit

Edit the Makefile.am file and remove any entries relating to the manual page subdirectory as follows:

SUBDIRS

Locate the SUBDIRS variable:

SUBDIRS = bin . lib intl doc po src man tests

Remove the entry relating to the manual page subdirectory as follows:

SUBDIRS = bin . lib intl po src man tests


EXTRA_DIST

Locate the EXTRA_DIST variable:

EXTRA_DIST = maint.mk cfg.mk \

aux/gendocs.sh \ doc/doc-gen.sh \ man/man-gen.sh


Remove any references to the doc subdirectory from that list:

EXTRA_DIST = maint.mk cfg.mk \ aux/gendocs.sh \ man/man-gen.sh


Remove the document generation script gendocs.sh Edit

Remove the gendocs.sh script from the auxiliary component directory:

rm aux/gendocs.sh


Remove gendocs.sh from the EXTRA_DIST variable in the Makefile.am file:

EXTRA_DIST = maint.mk cfg.mk \ aux/gendocs.sh \ man/man-gen.sh


This now becomes:

EXTRA_DIST = maint.mk cfg.mk \ man/man-gen.sh


Fixup trailing slashes in the Makefile.am file Edit

Note that the trailing slash symbol is a continuation character in the Makefile.am file. If the last line of a definition is removed, the line above it will no longer require the continuation character, because that line is now the last line.

Removing the doc directory from build targets Edit

The Makefile.am file contains targets and rules separated by a colon symbol. It is necessary to locate any references to the doc directory and remove them:

MAINTAINERCLEANFILES = $(srcdir)/INSTALL $(srcdir)/INSTALL: $(top_srcdir)/doc/install.texi

       $(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) --plaintext -o $@ \
       $(top_srcdir)/doc/install.texi


In the above example, $(srcdir)/INSTALL is a target that depends on $(top_srcdir)/doc/install.texi. We no longer have $(top_srcdir)/doc/install.texi, because the doc directory is removed, so we remove this from the dependency list:

MAINTAINERCLEANFILES = $(srcdir)/INSTALL $(srcdir)/INSTALL:

       $(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) --plaintext -o $@


This now has caused a few issues that we need to resolve. First of all, the $(MAKEINFO) line no longer has a file list, so has become broken, so we need to remove this line:

MAINTAINERCLEANFILES = $(srcdir)/INSTALL $(srcdir)/INSTALL:


Also $(srcdir)/INSTALL: no longer has any rules for building, so this might as well be removed:

MAINTAINERCLEANFILES = $(srcdir)/INSTALL


Lastly, because $(srcdir)/INSTALL is removed, we can remove any references to it:

MAINTAINERCLEANFILES =


Finally, because the reference variable has become empty this can also be removed.

Tidying up Edit

We now need to repeat this process, tidying up references to any rules, targets or variables that we have removed.

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.