-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Pouria Rezaei <[email protected]>
- Loading branch information
Showing
3 changed files
with
46 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
diff --git a/doc/manual/local.mk b/doc/manual/local.mk | ||
index 66a8cb7..d2db2b3 100644 | ||
index f43510b..1e1e62d 100644 | ||
--- a/doc/manual/local.mk | ||
+++ b/doc/manual/local.mk | ||
@@ -24,7 +24,7 @@ dummy-env = env -i \ | ||
|
@@ -11,19 +11,24 @@ index 66a8cb7..d2db2b3 100644 | |
|
||
$(d)/%.1: $(d)/src/command-ref/%.md | ||
@printf "Title: %s\n\n" "$$(basename $@ .1)" > $^.tmp | ||
@@ -48,31 +48,31 @@ $(d)/src/SUMMARY.md: $(d)/src/SUMMARY.md.in $(d)/src/command-ref/new-cli | ||
@@ -48,29 +48,29 @@ $(d)/src/SUMMARY.md: $(d)/src/SUMMARY.md.in $(d)/src/command-ref/new-cli | ||
$(trace-gen) cat doc/manual/src/SUMMARY.md.in | while IFS= read line; do if [[ $$line = @manpages@ ]]; then cat doc/manual/src/command-ref/new-cli/SUMMARY.md; else echo "$$line"; fi; done > [email protected] | ||
@mv [email protected] $@ | ||
|
||
-$(d)/src/command-ref/new-cli: $(d)/nix.json $(d)/generate-manpage.nix $(bindir)/nix | ||
+$(d)/src/command-ref/new-cli: $(d)/nix.json $(d)/generate-manpage.nix $(nix_DIR)/nix | ||
@rm -rf $@ | ||
$(trace-gen) $(nix-eval) --write-to $@ --expr 'import doc/manual/generate-manpage.nix { command = builtins.readFile $<; renderLinks = true; }' | ||
$(trace-gen) $(nix-eval) --write-to [email protected] --expr 'import doc/manual/generate-manpage.nix { toplevel = builtins.readFile $<; }' | ||
@# @docroot@: https://nixos.org/manual/nix/unstable/contributing/hacking.html#docroot-variable | ||
$(trace-gen) sed -i [email protected]/*.md -e 's^@docroot@^../..^g' | ||
@mv [email protected] $@ | ||
|
||
-$(d)/src/command-ref/conf-file.md: $(d)/conf-file.json $(d)/generate-options.nix $(d)/src/command-ref/conf-file-prefix.md $(bindir)/nix | ||
+$(d)/src/command-ref/conf-file.md: $(d)/conf-file.json $(d)/generate-options.nix $(d)/src/command-ref/conf-file-prefix.md $(nix_DIR)/nix | ||
@cat doc/manual/src/command-ref/conf-file-prefix.md > [email protected] | ||
$(trace-gen) $(nix-eval) --expr 'import doc/manual/generate-options.nix (builtins.fromJSON (builtins.readFile $<))' >> [email protected] | ||
@# @docroot@: https://nixos.org/manual/nix/unstable/contributing/hacking.html#docroot-variable | ||
$(trace-gen) $(nix-eval) --expr 'import doc/manual/generate-options.nix (builtins.fromJSON (builtins.readFile $<))' \ | ||
| sed -e 's^@docroot@^..^g'>> [email protected] | ||
@mv [email protected] $@ | ||
|
||
-$(d)/nix.json: $(bindir)/nix | ||
|
@@ -41,7 +46,9 @@ index 66a8cb7..d2db2b3 100644 | |
-$(d)/src/language/builtins.md: $(d)/builtins.json $(d)/generate-builtins.nix $(d)/src/language/builtins-prefix.md $(bindir)/nix | ||
+$(d)/src/language/builtins.md: $(d)/builtins.json $(d)/generate-builtins.nix $(d)/src/language/builtins-prefix.md $(nix_DIR)/nix | ||
@cat doc/manual/src/language/builtins-prefix.md > [email protected] | ||
$(trace-gen) $(nix-eval) --expr 'import doc/manual/generate-builtins.nix (builtins.fromJSON (builtins.readFile $<))' >> [email protected] | ||
@# @docroot@: https://nixos.org/manual/nix/unstable/contributing/hacking.html#docroot-variable | ||
$(trace-gen) $(nix-eval) --expr 'import doc/manual/generate-builtins.nix (builtins.fromJSON (builtins.readFile $<))' \ | ||
@@ -78,8 +78,8 @@ $(d)/src/language/builtins.md: $(d)/builtins.json $(d)/generate-builtins.nix $(d | ||
@cat doc/manual/src/language/builtins-suffix.md >> [email protected] | ||
@mv [email protected] $@ | ||
|
||
|
@@ -53,14 +60,39 @@ index 66a8cb7..d2db2b3 100644 | |
|
||
# Generate the HTML manual. | ||
diff --git a/doc/manual/local.mk b/doc/manual/local.mk | ||
index 66a8cb7..abf0d2c 100644 | ||
index 1e1e62d..3978847 100644 | ||
--- a/doc/manual/local.mk | ||
+++ b/doc/manual/local.mk | ||
@@ -102,6 +102,6 @@ doc/manual/generated/man1/nix3-manpages: $(d)/src/command-ref/new-cli | ||
@@ -109,12 +109,12 @@ doc/manual/generated/man1/nix3-manpages: $(d)/src/command-ref/new-cli | ||
@touch $@ | ||
|
||
$(docdir)/manual/index.html: $(MANUAL_SRCS) $(d)/book.toml $(d)/anchors.jq $(d)/custom.css $(d)/src/SUMMARY.md $(d)/src/command-ref/new-cli $(d)/src/command-ref/conf-file.md $(d)/src/language/builtins.md | ||
- $(trace-gen) RUST_LOG=warn mdbook build doc/manual -d $(DESTDIR)$(docdir)/manual | ||
+ # $(trace-gen) RUST_LOG=warn mdbook build doc/manual -d $(DESTDIR)$(docdir)/manual | ||
- $(trace-gen) \ | ||
- set -euo pipefail; \ | ||
- RUST_LOG=warn mdbook build doc/manual -d $(DESTDIR)$(docdir)/manual.tmp 2>&1 \ | ||
- | { grep -Fv "because fragment resolution isn't implemented" || :; } | ||
- @rm -rf $(DESTDIR)$(docdir)/manual | ||
- @mv $(DESTDIR)$(docdir)/manual.tmp/html $(DESTDIR)$(docdir)/manual | ||
- @rm -rf $(DESTDIR)$(docdir)/manual.tmp | ||
+ # $(trace-gen) \ | ||
+ # set -euo pipefail; \ | ||
+ # RUST_LOG=warn mdbook build doc/manual -d $(DESTDIR)$(docdir)/manual.tmp 2>&1 \ | ||
+ # | { grep -Fv "because fragment resolution isn't implemented" || :; } | ||
+ # @rm -rf $(DESTDIR)$(docdir)/manual | ||
+ # @mv $(DESTDIR)$(docdir)/manual.tmp/html $(DESTDIR)$(docdir)/manual | ||
+ # @rm -rf $(DESTDIR)$(docdir)/manual.tmp | ||
|
||
endif | ||
diff --git a/Makefile b/Makefile | ||
index 8675c99..12edef4 100644 | ||
--- a/Makefile | ||
+++ b/Makefile | ||
@@ -34,6 +34,8 @@ else | ||
GLOBAL_CXXFLAGS += -O0 -U_FORTIFY_SOURCE | ||
endif | ||
|
||
+GLOBAL_CFLAGS += $(CPPFLAGS) | ||
+ | ||
include mk/lib.mk | ||
|
||
GLOBAL_CXXFLAGS += -g -Wall -include config.h -std=c++2a -I src |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters