aboutsummaryrefslogtreecommitdiff
path: root/Setup.hs
AgeCommit message (Collapse)AuthorFilesLines
2015-07-06Setup.hs: better version detection in older hsb2hs.John MacFarlane1-7/+11
If it returns an error with input `--version`, recover gracefully.
2015-07-05Make cabal require hsb2hs >= 0.3.1.John MacFarlane1-0/+17
This is done by adding `hookedPrograms` in `Setup.hs`, which allows us to include `hsb2hs` in Build-Tools in cabal.
2015-07-03Setup.hs: Don't require hsb2hs unless embed_data_files flag specified.John MacFarlane1-8/+15
2015-07-02Added pandoc.1 to repository. Don't build as part of cabal build.John MacFarlane1-19/+2
The process was too fragile. It made too many assumptions about available libraries (which failed sometimes when sandboxes were used). This is a low-tech solution. The only drawback is that `man/pandoc.1` is a generated file in the repository. It will need to be regenerated periodically when README changes.
2015-07-02Make copying of man pages respect --destdir.John MacFarlane1-12/+11
Closes #2262.
2015-07-02Setup.hs: ensure target directory is created when installing man page.John MacFarlane1-4/+3
2015-07-01Install man pages as part of cabal 'copy' phase.John MacFarlane1-7/+19
2015-07-01Generate man page in cabal build process and include in data/.John MacFarlane1-0/+17
The pandoc.1 man page is generated automatically after the cabal build process. It goes in `data/pandoc.1`. It can be obtained by the user who installs pandoc via cabal thus: pandoc --print-default-data-file pandoc.1 > pandoc.1
2015-06-28New method for producing man pages.John MacFarlane1-18/+0
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-05-28Better fix for #2187.John MacFarlane1-13/+2
* 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-04-26Updated copyright notices to -2015. Closes #2111.John MacFarlane1-1/+1
2015-03-28Always build man pages. Removed make-pandoc-man-pages flag.John MacFarlane1-1/+10
Updated INSTALL instructions. Makefile: removed man target, now that we generate man pages by default.
2015-03-28Create reference files from unpacked archives with helper programNikolay Yakimov1-5/+21
2014-08-13Setup.hs: ensure make-man-pages not installed in bindir.John MacFarlane1-1/+11
2014-08-13Simplified Setup.hs.John MacFarlane1-51/+3
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-13Removed special testHook from Setup.John MacFarlane1-4/+0
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-05-17no need to hide 'catch'Michael Thompson1-1/+0
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-09Update copyright notices for 2014, add missing noticesAlbert Krewinkel1-0/+17
2013-10-20Pass the buildDir as first argument to test suite.John MacFarlane1-2/+8
Allows test suite to work with cabal sandboxes. Previously we hard-coded the build directory.
2013-10-08Revert "Setup.hs: Better way of handling man page building."John MacFarlane1-9/+8
This reverts commit ed061b91c8e3247e1d3b1538eca24687adf0e575.
2013-10-06Setup.hs: Better way of handling man page building.John MacFarlane1-8/+9
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-01-23Use hsb2hs preprocessor instead of TH for embed_data_files.John MacFarlane1-1/+17
This should work on Windows, unlike the TH solution with file-embed.
2012-11-07Use LBI buildDir instead of hardcoded "dist" </> "build".Clint Adams1-2/+2
2012-10-15Moved man page creation out of Setup.hs.John MacFarlane1-56/+14
* 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-15Removed unneeded function from Setup.hs.John MacFarlane1-6/+0
2012-10-15WhitespaceJohn MacFarlane1-2/+2
2012-09-21Setup: getModificationTime returns UTCTime as of GHC 7.6Ben Gamari1-0/+7
2012-07-26Integrated test suite with cabal.John MacFarlane1-14/+1
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-24Use catch from Control.Exception to avoid warnings.John MacFarlane1-1/+2
2012-03-09Fixed permissions on installed man pages.John MacFarlane1-2/+2
Thanks to Magnus Therning for the patch.
2012-01-20Removed markdown2pdf and documentation.John MacFarlane1-19/+4
2011-12-19Setup: Making man pages now works with cabal-dev.John MacFarlane1-8/+24
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-02-04Setup.hs: Added a 5 second timeout for test cases.John MacFarlane1-1/+1
2011-01-31Setup.hs: Don't call MakeManPage.hs unless the man pages need making.John MacFarlane1-1/+10
2011-01-28Refactored man pages.John MacFarlane1-39/+14
* 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-16Setup.hs: Only make pandoc.1 if README modified, be more verbose.John MacFarlane1-3/+14
2011-01-12Merge branch 'master' into testsJohn MacFarlane1-3/+3
2011-01-12Improvements to test suite.John MacFarlane1-8/+3
+ 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-11Setup.hs: -Wall clean.John MacFarlane1-3/+3
2011-01-10Changed test-pandoc to use test-framework and HUnit.Nathan Gass1-1/+1
2010-12-15Added 'tests' Cabal flag.John MacFarlane1-9/+16
+ 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-07Improved process to create man page from README.John MacFarlane1-3/+5
Previously it relied on pandoc already being installed. Now it uses dist/package.conf.inplace.
2010-03-22Setup.hs: Don't assume that the build directory is "dist."John MacFarlane1-9/+10
Instead, get it from localBuildInfo.
2010-02-06Removed html2markdown and hsmarkdown.fiddlosopher1-2/+2
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-01-17Setup: Made man page building sensitive to build verbosity.fiddlosopher1-5/+6
git-svn-id: https://pandoc.googlecode.com/svn/trunk@1812 788f1e2b-df1e-0410-8736-df70ead52e1b
2010-01-17Setup.hs : -Wall and hlint cleanup.fiddlosopher1-10/+13
git-svn-id: https://pandoc.googlecode.com/svn/trunk@1811 788f1e2b-df1e-0410-8736-df70ead52e1b
2010-01-14Setup.hs: improved detection of highlighting support in test hook.fiddlosopher1-6/+4
git-svn-id: https://pandoc.googlecode.com/svn/trunk@1808 788f1e2b-df1e-0410-8736-df70ead52e1b
2010-01-12Setup.hs: Install wrapper scripts into cabal bin directory.fiddlosopher1-13/+23
Also simplified installManpages. git-svn-id: https://pandoc.googlecode.com/svn/trunk@1807 788f1e2b-df1e-0410-8736-df70ead52e1b
2010-01-12Setup.hs: install manpages to mandir.fiddlosopher1-4/+33
Code borrowed from darcs. git-svn-id: https://pandoc.googlecode.com/svn/trunk@1806 788f1e2b-df1e-0410-8736-df70ead52e1b
2009-12-31Changed Setup.hs so it can build man pages again.fiddlosopher1-1/+2
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