From 6ef32bddc1f10034322966b3a5b85af7b9cdc4d8 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Sat, 1 Feb 2014 14:28:31 +0100 Subject: [PATCH] Fix "make dist" --- Makefile | 3 +-- doc/manual/local.mk | 5 +++++ local.mk | 3 +++ perl/local.mk | 4 +--- release.nix | 5 ++--- scripts/local.mk | 2 -- src/bsdiff-4.3/local.mk | 2 -- src/libexpr/local.mk | 6 ++++-- src/libstore/local.mk | 4 +++- 9 files changed, 19 insertions(+), 15 deletions(-) create mode 100644 local.mk diff --git a/Makefile b/Makefile index df72578cc..0ad6bb236 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 8d49e1e4d..92413eb7e 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 000000000..6c99ab233 --- /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 b5550cc9f..74c054e71 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 670871909..29bceca7c 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 606b73df6..f4c5e8097 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 320795a94..c957ceab0 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 ff35155b1..85e476e39 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 a9ae53270..2dddce740 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