Rules for making documentation.
@@ -74,6 +74,27 @@ depend:
$(CC) -MM $(CFLAGS) $(OBJS:.o=.c) | sed -e '1,$$s/ \/usr\/include\/[^ ]*//g' -e '1,$$s/ \/usr\/local\/include\/[^ ]*//g' >Dependencies
+# Generate documentation uaing codedoc (https://www.msweet.org/codedoc)
+doc:
+ echo Generating pappl.html...
+ codedoc pappl.xml $(HEADERS) $(OBJS:.o=.c) >../doc/pappl.html
+ echo Generating pappl.epub...
+ codedoc pappl.xml --epub ../doc/pappl.epub
+ $(RM) pappl.xml
+ echo Generating pappl-client.3...
+ codedoc --man pappl-client --section 3 client.h client*.c >../man/pappl-client.3
+ echo Generating pappl-device.3...
+ codedoc --man pappl-device --section 3 device.h device.c >../man/pappl-device.3
+ echo Generating pappl-job.3...
+ codedoc --man pappl-job --section 3 job.h job*.c >../man/pappl-job.3
+ echo Generating pappl-log.3...
+ codedoc --man pappl-log --section 3 log.h log.c >../man/pappl-log.3
+ echo Generating pappl-printer.3...
+ codedoc --man pappl-printer --section 3 printer.h printer*.c >../man/pappl-printer.3
+ echo Generating pappl-system.3...
+ codedoc --man pappl-system --section 3 system.h system*.c >../man/pappl-system.3
+
+
# Install everything
install: $(TARGETS)
echo Installing libpappl in $(BUILDROOT)$(libdir)...
