aboutsummaryrefslogtreecommitdiff
path: root/Setup.hs
AgeCommit message (Collapse)AuthorFilesLines
2017-04-03Removed unused imports from Setup.hs.John MacFarlane1-6/+2
2017-04-02Revert "Revert "Use file-embed instead of hsb2hs to embed data files.""John MacFarlane1-26/+2
This reverts commit 1fa15c225b515e1fa1c6566f90f1be363a4d770f.
2017-03-26Revert "Use file-embed instead of hsb2hs to embed data files."John MacFarlane1-2/+26
This reverts commit 10d91c147968d2e4d63b99b5b0342624827f416f.
2017-03-26Revert "Setup.hs - removed unneeded imports."John MacFarlane1-2/+6
This reverts commit 5354b441706b7c745efecb9174b00625c2d6bab3.
2017-03-26Setup.hs - removed unneeded imports.John MacFarlane1-6/+2
2017-03-26Use file-embed instead of hsb2hs to embed data files.John MacFarlane1-26/+2
I think template haskell is robust enough now across platforms that this will work. Motivation: file-embed gives us better dependency tracking: if a data file changes, ghc/stack/cabal know to recompile the Data module. This also removes hsb2hs as a build dependency.
2016-10-18Setup.hs - removed some unneeded imports.John MacFarlane1-5/+1
2015-10-09Setup.hs: rewrite so as not to use process, directory, filepath.John MacFarlane1-25/+10
Using anything outside base is dangerous, since older versions of ghc will link against two different versions. See e.g. - https://groups.google.com/forum/#!topic/pandoc-discuss/0r9Hhl730LY - https://www.reddit.com/r/haskell/comments/3634x2/cabal_is_giving_a_weird_error_when_attempting_to/ - jaspervdj/hakyll#356
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.