about summary refs log tree commit diff
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2014-02-01T13·28+0100
committerEelco Dolstra <eelco.dolstra@logicblox.com>2014-02-01T13·38+0100
commit6ef32bddc1f10034322966b3a5b85af7b9cdc4d8 (patch)
tree7cd959b794ae2a969b49434416bb9d6f3af6a859
parent0c6d62cf27b3b22fa60bddad16ea8e8d062e4a99 (diff)
Fix "make dist"
-rw-r--r--Makefile3
-rw-r--r--doc/manual/local.mk5
-rw-r--r--local.mk3
-rw-r--r--perl/local.mk4
-rw-r--r--release.nix5
-rw-r--r--scripts/local.mk2
-rw-r--r--src/bsdiff-4.3/local.mk2
-rw-r--r--src/libexpr/local.mk6
-rw-r--r--src/libstore/local.mk4
9 files changed, 19 insertions, 15 deletions
diff --git a/Makefile b/Makefile
index df72578cc54b..0ad6bb236c82 100644
--- a/Makefile
+++ b/Makefile
@@ -1,4 +1,5 @@
 makefiles = \
+  local.mk \
   src/boost/format/local.mk \
   src/libutil/local.mk \
   src/libstore/local.mk \
@@ -18,8 +19,6 @@ makefiles = \
   doc/manual/local.mk \
   tests/local.mk
 
-GLOBAL_CXXFLAGS = -I . -I src -I src/libutil -I src/libstore -I src/libmain -I src/libexpr
-
 include Makefile.config
 
 include mk/lib.mk
diff --git a/doc/manual/local.mk b/doc/manual/local.mk
index 8d49e1e4d5ae..92413eb7e2b2 100644
--- a/doc/manual/local.mk
+++ b/doc/manual/local.mk
@@ -28,6 +28,8 @@ $(d)/manual.is-valid: $(d)/manual.xmli
 
 clean-files += $(d)/manual.xmli $(d)/version.txt $(d)/manual.is-valid
 
+clean-files += $(d)/manual.xmli $(d)/version.txt $(d)/manual.is-valid
+
 
 # Generate man pages.
 man-pages := $(foreach n, \
@@ -64,6 +66,8 @@ all: $(d)/manual.html
 
 clean-files += $(d)/manual.html
 
+dist-files += $(d)/manual.html
+
 
 # Generate the PDF manual.
 $(d)/manual.pdf: $(d)/manual.xml $(MANUAL_SRCS) $(d)/manual.is-valid
@@ -77,3 +81,4 @@ $(d)/manual.pdf: $(d)/manual.xml $(MANUAL_SRCS) $(d)/manual.is-valid
 	fi
 
 clean-files += $(d)/manual.pdf
+
diff --git a/local.mk b/local.mk
new file mode 100644
index 000000000000..6c99ab233273
--- /dev/null
+++ b/local.mk
@@ -0,0 +1,3 @@
+dist-files += $(shell git ls-files) $(shell git ls-files)
+
+GLOBAL_CXXFLAGS = -I . -I src -I src/libutil -I src/libstore -I src/libmain -I src/libexpr
diff --git a/perl/local.mk b/perl/local.mk
index b5550cc9f87c..74c054e7133f 100644
--- a/perl/local.mk
+++ b/perl/local.mk
@@ -15,7 +15,7 @@ $(foreach x, $(nix_perl_modules), $(eval $(call install-data-in, $(x), $(perllib
 ifeq ($(perlbindings), yes)
 
   $(d)/lib/Nix/Store.cc: $(d)/lib/Nix/Store.xs
-	xsubpp $^ -output $@
+	$(trace-gen) xsubpp $^ -output $@
 
   libraries += Store
 
@@ -38,5 +38,3 @@ ifeq ($(perlbindings), yes)
 endif
 
 clean-files += $(d)/lib/Nix/Config.pm $(d)/lib/Nix/Store.cc
-
-dist-files += $(nix_perl_sources)
diff --git a/release.nix b/release.nix
index 67087190942f..29bceca7c722 100644
--- a/release.nix
+++ b/release.nix
@@ -30,7 +30,6 @@ let
         configureFlags = ''
           --with-docbook-rng=${docbook5}/xml/rng/docbook
           --with-docbook-xsl=${docbook5_xsl}/xml/xsl/docbook
-          --with-xml-flags=--nonet
           --with-dbi=${perlPackages.DBI}/${perl.libPrefix}
           --with-dbd-sqlite=${perlPackages.DBDSQLite}/${perl.libPrefix}
           --with-www-curl=${perlPackages.WWWCurl}/${perl.libPrefix}
@@ -56,9 +55,9 @@ let
           '';
 
         preDist = ''
-          make -C doc/manual install prefix=$out
+          make install prefix=$out makefiles=doc/manual/local.mk
 
-          make -C doc/manual manual.pdf prefix=$out
+          make doc/manual/manual.pdf
           cp doc/manual/manual.pdf $out/manual.pdf
 
           # The PDF containes filenames of included graphics (see
diff --git a/scripts/local.mk b/scripts/local.mk
index 606b73df6c74..f4c5e8097de4 100644
--- a/scripts/local.mk
+++ b/scripts/local.mk
@@ -35,5 +35,3 @@ $(foreach prog, $(nix_substituters), $(eval $(call install-program-in, $(prog),
 $(eval $(call install-symlink, nix-build, $(bindir)/nix-shell))
 
 clean-files += $(nix_bin_scripts) $(nix_noinst_scripts)
-
-dist-files += $(d)/*.in
diff --git a/src/bsdiff-4.3/local.mk b/src/bsdiff-4.3/local.mk
index 320795a94c1b..c957ceab0c0f 100644
--- a/src/bsdiff-4.3/local.mk
+++ b/src/bsdiff-4.3/local.mk
@@ -9,5 +9,3 @@ bspatch_DIR := $(d)
 bspatch_SOURCES := $(d)/bspatch.c
 bspatch_LDFLAGS = -lbz2 $(bsddiff_compat_include)
 bspatch_INSTALL_DIR = $(libexecdir)/nix
-
-dist-files += $(d)/compat-include/*
diff --git a/src/libexpr/local.mk b/src/libexpr/local.mk
index ff35155b1a96..85e476e39b21 100644
--- a/src/libexpr/local.mk
+++ b/src/libexpr/local.mk
@@ -14,7 +14,9 @@ libexpr_LIBS = libutil libstore libformat
 libexpr_LDFLAGS_PROPAGATED = $(BDW_GC_LIBS)
 
 $(d)/parser-tab.cc $(d)/parser-tab.hh: $(d)/parser.y
-	bison -v -o $(libexpr_DIR)/parser-tab.cc $< -d
+	$(trace-gen) bison -v -o $(libexpr_DIR)/parser-tab.cc $< -d
 
 $(d)/lexer-tab.cc $(d)/lexer-tab.hh: $(d)/lexer.l
-	flex --outfile $(libexpr_DIR)/lexer-tab.cc --header-file=$(libexpr_DIR)/lexer-tab.hh $<
+	$(trace-gen) flex --outfile $(libexpr_DIR)/lexer-tab.cc --header-file=$(libexpr_DIR)/lexer-tab.hh $<
+
+clean-files += $(d)/parser-tab.cc $(d)/parser-tab.hh $(d)/lexer-tab.cc $(d)/lexer-tab.hh
diff --git a/src/libstore/local.mk b/src/libstore/local.mk
index a9ae53270076..2dddce740dcc 100644
--- a/src/libstore/local.mk
+++ b/src/libstore/local.mk
@@ -23,4 +23,6 @@ libstore_CXXFLAGS = \
 $(d)/local-store.cc: $(d)/schema.sql.hh
 
 %.sql.hh: %.sql
-	sed -e 's/"/\\"/g' -e 's/\(.*\)/"\1\\n"/' < $< > $@ || (rm $@ && exit 1)
+	$(trace-gen) sed -e 's/"/\\"/g' -e 's/\(.*\)/"\1\\n"/' < $< > $@ || (rm $@ && exit 1)
+
+clean-files += $(d)/schema.sql.hh