diff options
author | Eelco Dolstra <e.dolstra@tudelft.nl> | 2003-11-18T12·06+0000 |
---|---|---|
committer | Eelco Dolstra <e.dolstra@tudelft.nl> | 2003-11-18T12·06+0000 |
commit | dfc9c64ead7f24d51ed1a232e4b3ecafa8384f2e (patch) | |
tree | ab0d5b381eb01bec46a66174b3b09b60ea439bb7 /src/nix-store | |
parent | b1117ef29d35822647bda32f8cd3887f4f6eaede (diff) |
* "Fix expression" -> "Nix expression".
* More refactoring.
Diffstat (limited to 'src/nix-store')
-rw-r--r-- | src/nix-store/Makefile.am | 8 | ||||
-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 a39d1e2ad985..516d78efc5c2 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 d7f977025440..d7f977025440 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 d1766de39b7e..0d87db9dfbb9 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"; |