aboutsummaryrefslogtreecommitdiff
path: root/src/nix-store
diff options
context:
space:
mode:
authorEelco Dolstra <e.dolstra@tudelft.nl>2003-11-18 12:06:07 +0000
committerEelco Dolstra <e.dolstra@tudelft.nl>2003-11-18 12:06:07 +0000
commitdfc9c64ead7f24d51ed1a232e4b3ecafa8384f2e (patch)
treeab0d5b381eb01bec46a66174b3b09b60ea439bb7 /src/nix-store
parentb1117ef29d35822647bda32f8cd3887f4f6eaede (diff)
* "Fix expression" -> "Nix expression".
* More refactoring.
Diffstat (limited to 'src/nix-store')
-rw-r--r--src/nix-store/Makefile.am8
-rw-r--r--src/nix-store/help.txt (renamed from src/nix-store/nix-help.txt)0
-rw-r--r--src/nix-store/main.cc (renamed from src/nix-store/nix.cc)7
3 files changed, 6 insertions, 9 deletions
diff --git a/src/nix-store/Makefile.am b/src/nix-store/Makefile.am
index a39d1e2ad..516d78efc 100644
--- a/src/nix-store/Makefile.am
+++ b/src/nix-store/Makefile.am
@@ -1,15 +1,13 @@
bin_PROGRAMS = nix-store
-nix_store_SOURCES = nix.cc dotgraph.cc
+nix_store_SOURCES = main.cc dotgraph.cc
nix_store_LDADD = ../libmain/libmain.a ../libstore/libstore.a ../libutil/libutil.a \
../boost/format/libformat.a -L../../externals/inst/lib -ldb_cxx -lATerm
-nix.o: nix-help.txt.hh
+main.o: help.txt.hh
%.hh: %
- echo -n '"' > $@
- sed 's|\(.*\)|\1\\n\\|' < $< >> $@
- echo '"' >> $@
+ ../bin2c/bin2c helpText < $< > $@ || (rm $@ && exit 1)
AM_CXXFLAGS = \
-I.. -I../../externals/inst/include -I../libutil -I../libstore -I../libmain
diff --git a/src/nix-store/nix-help.txt b/src/nix-store/help.txt
index d7f977025..d7f977025 100644
--- a/src/nix-store/nix-help.txt
+++ b/src/nix-store/help.txt
diff --git a/src/nix-store/nix.cc b/src/nix-store/main.cc
index d1766de39..0d87db9df 100644
--- a/src/nix-store/nix.cc
+++ b/src/nix-store/main.cc
@@ -6,6 +6,7 @@
#include "archive.hh"
#include "shared.hh"
#include "dotgraph.hh"
+#include "help.txt.hh"
typedef void (* Operation) (Strings opFlags, Strings opArgs);
@@ -13,9 +14,7 @@ typedef void (* Operation) (Strings opFlags, Strings opArgs);
static void printHelp()
{
- cout <<
-#include "nix-help.txt.hh"
- ;
+ cout << string((char *) helpText, sizeof helpText);
exit(0);
}
@@ -301,4 +300,4 @@ void run(Strings args)
}
-string programId = "nix";
+string programId = "nix-store";