Skip to content

Commit

Permalink
Fix "make dist"
Browse files Browse the repository at this point in the history
  • Loading branch information
edolstra committed Feb 1, 2014
1 parent 0c6d62c commit 6ef32bd
Show file tree
Hide file tree
Showing 9 changed files with 19 additions and 15 deletions.
3 changes: 1 addition & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
makefiles = \
local.mk \
src/boost/format/local.mk \
src/libutil/local.mk \
src/libstore/local.mk \
Expand All @@ -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
5 changes: 5 additions & 0 deletions doc/manual/local.mk
Original file line number Diff line number Diff line change
Expand Up @@ -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, \
Expand Down Expand Up @@ -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
Expand All @@ -77,3 +81,4 @@ $(d)/manual.pdf: $(d)/manual.xml $(MANUAL_SRCS) $(d)/manual.is-valid
fi

clean-files += $(d)/manual.pdf

3 changes: 3 additions & 0 deletions local.mk
Original file line number Diff line number Diff line change
@@ -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
4 changes: 1 addition & 3 deletions perl/local.mk
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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)
5 changes: 2 additions & 3 deletions release.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand All @@ -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
Expand Down
2 changes: 0 additions & 2 deletions scripts/local.mk
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 0 additions & 2 deletions src/bsdiff-4.3/local.mk
Original file line number Diff line number Diff line change
Expand Up @@ -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/*
6 changes: 4 additions & 2 deletions src/libexpr/local.mk
Original file line number Diff line number Diff line change
Expand Up @@ -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
4 changes: 3 additions & 1 deletion src/libstore/local.mk
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 6ef32bd

Please sign in to comment.