use class instead of twigils for builder
This commit is contained in:
parent
e810c3eb08
commit
2adee9ee8e
8 changed files with 140 additions and 155 deletions
|
@ -23,7 +23,7 @@ dependSingle yamlDir info prefix build nsfw =
|
|||
|
||||
dependSingle' :: FilePath -> Info -> FilePath -> FilePath -> Bool -> Builder
|
||||
dependSingle' yamlDir info prefix build nsfw =
|
||||
[b|$@page: $@deps $$(MAKEPAGES)|]
|
||||
[b|$page: $deps $$(MAKEPAGES)|]
|
||||
where
|
||||
images = if nsfw then #images info else #sfwImages info
|
||||
|
||||
|
@ -50,13 +50,13 @@ dependGallery' :: GalleryInfo -> FilePath -> [(FilePath, Info)]
|
|||
-> FilePath -> FilePath -> FilePath -> Builder
|
||||
dependGallery' (GalleryInfo {prefix, filters})
|
||||
indexFile infos' build data_ tmp = [b|@0
|
||||
$@index: $@gallery
|
||||
$index: $gallery
|
||||
|
||||
$@gallery: $@pages' $@files' $@rss $@indexFile $$(MAKEPAGES)
|
||||
$$(call gallery,$@indexFile,$@prefix)
|
||||
$gallery: $pages' $files' $rss $indexFile $$(MAKEPAGES)
|
||||
$$(call gallery,$indexFile,$prefix)
|
||||
|
||||
$@rss: $@files' $@indexFile $$(MAKEPAGES)
|
||||
$$(call rss,$@indexFile,$@prefix,$@data_)
|
||||
$rss: $files' $indexFile $$(MAKEPAGES)
|
||||
$$(call rss,$indexFile,$prefix,$data_)
|
||||
|
||||
$rules
|
||||
|
||||
|
@ -80,7 +80,7 @@ dependGallery' (GalleryInfo {prefix, filters})
|
|||
|
||||
inc d = tmp </> prefix </> takeDirectory d <.> "mk"
|
||||
incFiles = unwords $ map inc files
|
||||
incs = if null infos then "" else [b|include $@incFiles|]
|
||||
incs = if null infos then "" else [b|include $incFiles|]
|
||||
|
||||
makeRules :: FilePath -- ^ prefix
|
||||
-> GalleryFilters
|
||||
|
@ -89,16 +89,16 @@ makeRules :: FilePath -- ^ prefix
|
|||
-> FilePath -- ^ tmp dir
|
||||
-> Builder
|
||||
makeRules prefix filters build data_ tmp = [b|@0
|
||||
$@buildPrefix/%/index.html: $@data_/%/info.yaml $$(MAKEPAGES)
|
||||
$$(call single,$@data_,$@prefix,$flags)
|
||||
$buildPrefix/%/index.html: $data_/%/info.yaml $$(MAKEPAGES)
|
||||
$$(call single,$data_,$prefix,$flags)
|
||||
|
||||
$@tmpPrefix/%.mk: $@data_/%/info.yaml $$(MAKEPAGES)
|
||||
$$(call depend-single,$@prefix,$@build,$@data_,$flags)
|
||||
$tmpPrefix/%.mk: $data_/%/info.yaml $$(MAKEPAGES)
|
||||
$$(call depend-single,$prefix,$build,$data_,$flags)
|
||||
|
||||
$@buildPrefix/%: $@tmp/%
|
||||
$buildPrefix/%: $tmp/%
|
||||
$$(call copy,-l)
|
||||
|
||||
$@buildPrefix/%: $@data_/%
|
||||
$buildPrefix/%: $data_/%
|
||||
$$(call copy)
|
||||
|]
|
||||
where
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue