@@ -287,30 +287,36 @@ $(foreach exec,$(sbin_PROGRAMS), $(eval $(call LINK_RULE,$(exec),$(subst -,_,$(e
287
287
man1_DATA += beep.1
288
288
CLEANFILES += beep.1
289
289
290
- html_DATA += html/ CREDITS.html
291
- html_DATA += html/ NEWS.html
292
- html_DATA += html/ PERMISSIONS.html
293
- html_DATA += html/ README.html
290
+ CLEANFILES += CREDITS.html
291
+ CLEANFILES += NEWS.html
292
+ CLEANFILES += PERMISSIONS.html
293
+ CLEANFILES += README.html
294
294
295
- CLEANFILES += html/pandoc.css
296
- html_DATA += html/pandoc.css
295
+ CLEANFILES += DEVELOPMENT.html
296
+ CLEANFILES += INSTALL.html
297
+ CLEANFILES += PACKAGING.html
297
298
298
- noinst_html_DATA += html/DEVELOPMENT.html
299
- noinst_html_DATA += html/INSTALL.html
300
- noinst_html_DATA += html/PACKAGING.html
299
+ ifeq (yes,$(shell if $(PANDOC ) --version > /dev/null 2>&1; then echo yes; else echo no; fi) )
301
300
302
- .PHONY : html
303
- html : $(html_DATA ) $(noinst_html_DATA )
304
- @$(MKDIR_P ) html
301
+ html_DATA += pandoc.css
302
+
303
+ html_DATA += CREDITS.html
304
+ html_DATA += NEWS.html
305
+ html_DATA += PERMISSIONS.html
306
+ html_DATA += README.html
305
307
306
- html/ % .css : % .css
307
- $( MKDIR_P ) html
308
- $( INSTALL ) -p $< $@
308
+ noinst_html_DATA += DEVELOPMENT.html
309
+ noinst_html_DATA += INSTALL. html
310
+ noinst_html_DATA += PACKAGING.html
309
311
310
- html/% .html : % .md | html/pandoc.css
311
- @$(MKDIR_P ) html
312
+ % .html : % .md
312
313
@echo PANDOC $< -o $@
313
314
$(PANDOC ) --from gfm --to html --standalone -M pagetitle=" $$ ($( SED) -n 1p $<)" -M title=" " -c pandoc.css $< -o $@
315
+ endif
316
+
317
+ .PHONY : html
318
+ html : $(html_DATA ) $(noinst_html_DATA )
319
+ all-local : $(html_DATA ) $(noinst_html_DATA )
314
320
315
321
DEFAULT_FREQ = 440
316
322
DEFAULT_LENGTH = 200
@@ -389,16 +395,13 @@ check: tests/run-tests beep $(check_TARGETS)
389
395
390
396
.PHONY : clean
391
397
clean :
392
- rm -f $(bin_PROGRAMS )
393
- rm -f $(check_PROGRAMS )
394
- rm -f $(sbin_PROGRAMS )
398
+ rm -f $(bin_PROGRAMS ) $(sbin_PROGRAMS ) $(check_PROGRAMS )
395
399
rm -f $(CLEANFILES )
396
400
rm -f * .dep
397
401
rm -rf .deps
398
402
rm -f * .lst * .gcc-lst
399
403
rm -f tests/* .new tests/* .actual
400
404
rm -rf dox
401
- rm -rf html
402
405
rm -f * .o * .i * .s * .bc
403
406
404
407
.PHONY : doc
@@ -426,9 +429,9 @@ $(foreach dir,$(sort $(foreach d,$(dir-vars),$($(d)))),$(eval $(call make-instal
426
429
# Example:
427
430
# $(eval $(call install-file,installed-files-html,0644,htmldir,html/foobar.html))
428
431
define install-file
429
- $( 1 ) += $$(DESTDIR )$$($(3 ) ) /$$(notdir $(4 ) )
430
- $$(DESTDIR )$$($(3 ) ) /$$(notdir $(4 ) ) : $(4 ) | $$(DESTDIR )$$($(3 ) )
431
- $$(INSTALL ) -p -m $(2 ) $$< $$@
432
+ installed-files += $$(DESTDIR )$$($(2 ) ) /$$(notdir $(3 ) )
433
+ $$(DESTDIR )$$($(2 ) ) /$$(notdir $(3 ) ) : $(3 ) | $$(DESTDIR )$$($(2 ) )
434
+ $$(INSTALL ) -p -m $(1 ) $$< $$@
432
435
endef
433
436
434
437
@@ -439,7 +442,7 @@ endef
439
442
# $(eval $(call install-fileset,html_DATA,html))
440
443
define install-fileset
441
444
ifneq (,$$($(1 ) ) )
442
- $$(foreach f,$$($(1)),$$(eval $$(call install-file,installed-files$$(if $(2),-$(2)), $$(if $$(filter PROGRAMS SCRIPTS,$$(lastword $$(subst _, ,$(1)))),0755,0644),$$(firstword $$(subst _, ,$(1)))dir,$$(f))))
445
+ $$(foreach f,$$($(1)),$$(eval $$(call install-file,$$(if $$(filter PROGRAMS SCRIPTS,$$(lastword $$(subst _, ,$(1)))),0755,0644),$$(firstword $$(subst _, ,$(1)))dir,$$(f))))
443
446
endif
444
447
endef
445
448
@@ -448,21 +451,17 @@ $(eval $(call install-fileset,bin_PROGRAMS))
448
451
$(eval $(call install-fileset,sbin_PROGRAMS))
449
452
$(eval $(call install-fileset,man1_DATA))
450
453
$(eval $(call install-fileset,doc_DATA))
451
- $(eval $(call install-fileset,html_DATA,html ))
454
+ $(eval $(call install-fileset,html_DATA))
452
455
$(eval $(call install-fileset,contrib_DATA))
453
456
$(eval $(call install-fileset,contrib_SCRIPTS))
454
457
455
458
456
459
.PHONY : install
457
460
install : all $(installed-files )
458
461
459
- .PHONY : install-html
460
- install-html : html $(installed-files-html )
461
-
462
462
.PHONY : uninstall
463
463
uninstall :
464
464
rm -f $(installed-files )
465
- rm -f $(installed-files-html )
466
465
467
466
468
467
# #######################################################################
0 commit comments