Commit graph

70 commits

Author SHA1 Message Date
John MacFarlane
fe625e053d New method for producing man pages.
This change adds `--man1` and `--man5` options to pandoc, so
pandoc can generate its own man pages.

It removes the old overly complex method of building a separate
executable (but not installing it) just to create the man pages.

The man pages are no longer automatically created in the build
process.

The man/ directory has been removed.  The man page templates
have been moved to data/.

New unexported module:  Text.Pandoc.ManPages.

Text.Pandoc.Data now exports readmeFile, and `readDataFile`
knows how to find README.

Closes #2190.
2015-06-28 14:39:17 -07:00
John MacFarlane
b241472a90 Better fix for #2187.
* Reverted kludgy change to make-windows-installer.bat.
* Removed make-reference-fiels.hs.
* Moved the individual ingredients of reference.docx and
  reference.odt to the data directory.
* Removed reference.docx and reference.odt from data directory.
* We now build the reference archives from their ingredient pieces
  in the docx and odt writers, instead of having a reference.docx
  or reference.odt intermediary.

This should fix #2187.

It also simplifies the bulid procedure.

The one thing users may notice is different is that you can
no longer get the reference.docx or reference.odt using
`--print-default-data-file`.  Instead, simply generate a
docx or odt using pandoc with a blank or minimal input,
and use that (or a customized version) with `--reference-docx`
or `--reference-odt`.
2015-05-28 18:15:01 -07:00
John MacFarlane
1868cb5e42 Updated copyright notices to -2015. Closes #2111. 2015-04-26 10:18:29 -07:00
John MacFarlane
3f20fb3f9f Always build man pages. Removed make-pandoc-man-pages flag.
Updated INSTALL instructions.

Makefile:  removed man target, now that we generate man pages by default.
2015-03-28 15:40:50 -07:00
Nikolay Yakimov
d744b83b61 Create reference files from unpacked archives with helper program 2015-03-28 10:36:53 -07:00
John MacFarlane
0492ab868b Setup.hs: ensure make-man-pages not installed in bindir. 2014-08-13 12:20:01 -07:00
John MacFarlane
fa71a08ed3 Simplified Setup.hs.
It no longer builds and installs man pages.

All it does is hook the hsb preprocessor.

This should make the build process more robust over Cabal API
changes.  We'll add a Makefile to generate man pages.
2014-08-13 10:18:46 -07:00
John MacFarlane
1d6e1cf9f3 Removed special testHook from Setup.
This was just too fragile and dependent on a changing Cabal API
(see #1526).

Instead of passing the bulid directory to the test program, we
now let the test program find itself (using executable-path)
and then find the pandoc executable relative to itself.
2014-08-13 08:12:07 -07:00
Michael Thompson
4c6aaec565 no need to hide 'catch'
This doesn't normally cause a problem because of some ghc workaround special to this case, but I was able to trigger an error with a complicated mixture of sandboxing, directing `cabal` to a locally installed ghc, and something else. `catch` isn't actually used in the file, so it seems it might as well go.
2014-05-17 13:48:31 -04:00
Albert Krewinkel
8fdbef841d Update copyright notices for 2014, add missing notices 2014-05-09 00:46:08 +02:00
John MacFarlane
9d6bca06ee Pass the buildDir as first argument to test suite.
Allows test suite to work with cabal sandboxes.
Previously we hard-coded the build directory.
2013-10-20 12:36:26 -07:00
John MacFarlane
627c54011b Revert "Setup.hs: Better way of handling man page building."
This reverts commit ed061b91c8.
2013-10-08 20:52:56 -07:00
John MacFarlane
ed061b91c8 Setup.hs: Better way of handling man page building.
Previously we tried to remove make-pandoc-man-pages from the list
of packages to be haddocked, installed, copied, etc.

It works better to set 'Buildable: False' on make-pandoc-man-pages,
then have the buildHook temporarily set Buildable to True.  This
allows make-pandoc-man-pages to be built (and used in generating
the man pages), but not installed.
2013-10-06 18:04:18 -07:00
John MacFarlane
fe337b07f7 Use hsb2hs preprocessor instead of TH for embed_data_files.
This should work on Windows, unlike the TH solution with
file-embed.
2013-01-23 19:26:39 -08:00
Clint Adams
ff0061281f Use LBI buildDir instead of hardcoded "dist" </> "build". 2012-11-07 14:57:17 -05:00
John MacFarlane
b3ad94bde9 Moved man page creation out of Setup.hs.
* MakeManPage.hs has been transformed into
  man/make-pandoc-man-pages.hs.
* There is now a cabal stanza for this, so the dependencies are
  handled by cabal.
* Special treatment in Setup.hs ensures that this never gets installed;
  it is built and used to create the man pages.
* Setup.hs cleaned up.
2012-10-15 21:26:24 -07:00
John MacFarlane
b28630f577 Removed unneeded function from Setup.hs. 2012-10-15 19:53:57 -07:00
John MacFarlane
4cc3801fb0 Whitespace 2012-10-15 19:53:52 -07:00
Ben Gamari
a96982e701 Setup: getModificationTime returns UTCTime as of GHC 7.6 2012-09-21 15:43:26 -04:00
John MacFarlane
acbb4a5e46 Integrated test suite with cabal.
To run tests, configure with --enable-tests, then 'cabal test'.
You can specify particular tests using --test-options='-t markdown'.

No output is shown unless tests fail.  In the future, we can move
to the detailed-1.0 interface.
2012-07-26 09:43:27 -07:00
John MacFarlane
308436996e Use catch from Control.Exception to avoid warnings. 2012-07-24 19:38:16 -07:00
John MacFarlane
96274b2838 Fixed permissions on installed man pages.
Thanks to Magnus Therning for the patch.
2012-03-09 13:30:14 -08:00
John MacFarlane
1d615908c2 Removed markdown2pdf and documentation. 2012-01-20 21:22:51 -08:00
John MacFarlane
8bf890d7e4 Setup: Making man pages now works with cabal-dev.
In Setup.hs we now invoke 'runghc' in a way that points
it to the correct package databases, instead of always
falling back to the default user package db.

Thanks to Antoine Latter for the patch.
2011-12-19 22:09:08 -08:00
John MacFarlane
99677ac05d Setup.hs: Added a 5 second timeout for test cases. 2011-02-04 16:53:21 -08:00
John MacFarlane
f879b99ad1 Setup.hs: Don't call MakeManPage.hs unless the man pages need making. 2011-01-31 09:34:15 -08:00
John MacFarlane
8c435578d6 Refactored man pages.
* Markdown syntax description from README now goes in pandoc_markdown.5.
* Refactored man page construction functions, putting more of
  the work in MakeManPages.hs.
2011-01-28 12:02:26 -08:00
John MacFarlane
491eb00e40 Setup.hs: Only make pandoc.1 if README modified, be more verbose. 2011-01-16 09:27:54 -08:00
John MacFarlane
5da2d1e66c Merge branch 'master' into tests 2011-01-12 08:13:11 -08:00
John MacFarlane
eb1d014859 Improvements to test suite.
+ You can now specify glob patterns after 'cabal test';
  e.g. 'cabal test latex' will only run the latex tests.

+ Instead of detecting highlighting support in Setup.hs,
  we now detect it in test-pandoc, by looking to see if
  'languages' is null.

+ We now verify the lhs readers against the lhs-test.native,
  normalizing with 'normalize'.  This makes more sense than
  verifying against HTML, which also brings in the HTML writer.

+ Added lhsn-test.nohl.{html,html+lhs}, so we can do the lhs
  tests whether or not highlighting has been installed.
2011-01-12 11:35:10 +01:00
John MacFarlane
6b1407d209 Setup.hs: -Wall clean. 2011-01-11 20:34:49 -08:00
Nathan Gass
c0700987ba Changed test-pandoc to use test-framework and HUnit. 2011-01-10 00:37:46 +01:00
John MacFarlane
605648cbbf Added 'tests' Cabal flag.
+ This ensures that test-pandoc gets built.
+ 'cabal test' now runs this.
+ The old tests/RunTests.hs has been removed, and
  src/test-pandoc.hs added.
2010-12-15 17:54:51 -08:00
John MacFarlane
3b3387b4a3 Improved process to create man page from README.
Previously it relied on pandoc already being installed.
Now it uses dist/package.conf.inplace.
2010-12-07 12:29:43 -08:00
John MacFarlane
7689cacb5d Setup.hs: Don't assume that the build directory is "dist."
Instead, get it from localBuildInfo.
2010-03-22 18:43:38 -07:00
fiddlosopher
997ea5ea1d Removed html2markdown and hsmarkdown.
html2markdown is no longer needed, since you can pass URI arguments
to pandoc and directly convert web pages. (Note, however, that pandoc
assumes the pages are UTF8. html2markdown made an attempt to guess the
encoding and convert them.)

hsmarkdown is pointless -- a large executable that could be replaced
by 'pandoc --strict'.

git-svn-id: https://pandoc.googlecode.com/svn/trunk@1834 788f1e2b-df1e-0410-8736-df70ead52e1b
2010-02-06 18:55:28 +00:00
fiddlosopher
bd8ac75e51 Setup: Made man page building sensitive to build verbosity.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@1812 788f1e2b-df1e-0410-8736-df70ead52e1b
2010-01-17 00:28:42 +00:00
fiddlosopher
9b9c26c6e5 Setup.hs : -Wall and hlint cleanup.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@1811 788f1e2b-df1e-0410-8736-df70ead52e1b
2010-01-17 00:28:36 +00:00
fiddlosopher
385dcb116c Setup.hs: improved detection of highlighting support in test hook.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@1808 788f1e2b-df1e-0410-8736-df70ead52e1b
2010-01-14 05:54:24 +00:00
fiddlosopher
cc41e16285 Setup.hs: Install wrapper scripts into cabal bin directory.
Also simplified installManpages.

git-svn-id: https://pandoc.googlecode.com/svn/trunk@1807 788f1e2b-df1e-0410-8736-df70ead52e1b
2010-01-12 07:02:36 +00:00
fiddlosopher
48c240de2d Setup.hs: install manpages to mandir.
Code borrowed from darcs.

git-svn-id: https://pandoc.googlecode.com/svn/trunk@1806 788f1e2b-df1e-0410-8736-df70ead52e1b
2010-01-12 07:02:30 +00:00
fiddlosopher
c5735511eb Changed Setup.hs so it can build man pages again.
Problem was that it couldn't find the man template until
the data files were installed.  Fixed by using --template
to point it at the right file in the source directory.

git-svn-id: https://pandoc.googlecode.com/svn/trunk@1742 788f1e2b-df1e-0410-8736-df70ead52e1b
2009-12-31 01:47:00 +00:00
fiddlosopher
7e8ea0ae74 Fixed lhs test cases.
+ Changed Setup.hs in accord with change in '--version'
  output.
+ Changed lhs test cases in accord with change in
  the way HTML headers are written (they are now put
  in divs, and the id is put on the div rather than the
  header itself).

git-svn-id: https://pandoc.googlecode.com/svn/trunk@1588 788f1e2b-df1e-0410-8736-df70ead52e1b
2009-07-03 03:05:29 +00:00
fiddlosopher
29d2952a10 Setup.hs: replace readProcess with something more portable.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@1553 788f1e2b-df1e-0410-8736-df70ead52e1b
2009-02-27 07:23:06 +00:00
fiddlosopher
bdb84bab4e Made Setup.hs compatible with Cabal < 1.6.
Replaced a non-portable test for highlighting support with
a portable one.

git-svn-id: https://pandoc.googlecode.com/svn/trunk@1552 788f1e2b-df1e-0410-8736-df70ead52e1b
2009-02-26 16:47:43 +00:00
fiddlosopher
a39865af03 Check to see if highlighting supported and run lhs tests if it is.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@1542 788f1e2b-df1e-0410-8736-df70ead52e1b
2009-02-14 16:25:39 +00:00
fiddlosopher
096413b2f3 Fixed Setup.hs so correct status is returned after build.
Previously an error status was returned even after a normal
build. Resolves Issue #100.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@1471 788f1e2b-df1e-0410-8736-df70ead52e1b
2008-10-27 21:52:31 +00:00
fiddlosopher
d1d614b8ef Have "runhaskell Setup test" return an error status if tests fail.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@1456 788f1e2b-df1e-0410-8736-df70ead52e1b
2008-09-22 21:26:54 +00:00
fiddlosopher
4dca8f6e75 Reworked Text.Pandoc.ODT to use zip-archive instead of calling external 'zip'.
+ Removed utf8-string and xml-light modules, and unneeded content.xml.
+ Removed code for building reference.odt from Setup.hs.
  The ODT is now built using template haskell in Text.Pandoc.ODT.
+ Removed copyright statements for utf8-string and xml modules,
  since they are no longer included in the source.
+ README: Removed claim that 'zip' is needed for ODT production.
+ Removed dependency on 'zip' from debian/control.
+ Text.Pandoc.Shared: Removed withTempDir, added inDirectory.
+ Added makeZip to Text.Pandoc.TH.
+ pandoc.cabal: Added dependencies on old-time, zip-archive, and utf8-string.
  Added markdown2pdf files to extra-sources list.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@1417 788f1e2b-df1e-0410-8736-df70ead52e1b
2008-09-04 02:51:28 +00:00
fiddlosopher
3d2ff3d0a8 Removed PDF writer from core pandoc, restored markdown2pdf.
+ Added markdown2pdf.
+ Removed Text/Pandoc/PDF.hs.
+ Removed references to PDF writer from Main.hs.
+ Removed references to PDF writer from pandoc.cabal.
+ Added markdown2pdf.1 to list of man pages in Setup.hs.
+ Added markdown2pdf.1.md man page source.
+ Added reference to markdown2pdf(1) in pandoc man page.
+ Added markdown2pdf to WRAPPERS in Makefile.
+ Removed mention of pdf writer from README; added markdown2pdf.
+ Added remarks on markdown2pdf dependencies to README.Debian.
+ Added markdown2pdf to web/index.txt.in.
+ Use markdown2pdf for pdf web demos.
+ Put markdown2pdf back into debian control and rules.
+ Added markdown2pdf to macports Portfile.
+ Added markdown2pdf to freebsd package.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@1415 788f1e2b-df1e-0410-8736-df70ead52e1b
2008-08-27 05:50:26 +00:00