New test.
[mono.git] / mcs / tools / security / Makefile
index feb1b8dcbe238ad57c7381f951c5bac42fabb3e4..898a17b7d909a51a9c1f1d67c342cedd3f038f0b 100644 (file)
@@ -3,47 +3,52 @@ SUBDIRS =
 DIST_ONLY_SUBDIRS = certview
 include ../../build/rules.make
 
-LOCAL_MCS_FLAGS = /r:$(topdir)/class/lib/Mono.Security.dll
-
-SECURITY_PROGRAMS = secutil.exe cert2spc.exe sn.exe MakeCert.exe chktrust.exe signcode.exe setreg.exe certmgr.exe
-
-DISTFILES = \
-       AssemblyInfo.cs \
-       cert2spc.cs     \
-       MakeCert.cs     \
-       README          \
-       secutil.cs      \
-       sn.cs           \
-       chktrust.cs     \
-       signcode.cs     \
-       setreg.cs       \
-       certmgr.cs      \
-       StrongNameManager.cs
+LOCAL_MCS_FLAGS = /lib:$(topdir)/class/lib/$(PROFILE) -r:Mono.Security.dll
 
+SECURITY_PROGRAMS = secutil.exe cert2spc.exe sn.exe makecert.exe chktrust.exe \
+       signcode.exe setreg.exe certmgr.exe caspol.exe permview.exe mozroots.exe
+SECURITY_SOURCES = AssemblyInfo.cs $(topdir)/build/common/Consts.cs StrongNameManager.cs $(SECURITY_PROGRAMS:.exe=.cs)
+
+PROGRAM_INSTALL_DIR = $(mono_libdir)/mono/$(FRAMEWORK_VERSION)
+
+DISTFILES = README TESTS $(SECURITY_SOURCES)
+
+ifeq (net_1_1_bootstrap, $(PROFILE))
+all-local: $(topdir)/class/lib/$(PROFILE)/sn.exe
+else
 all-local: $(SECURITY_PROGRAMS)
+endif
 
+install-local: all-local
+uninstall-local:
+
+ifndef NO_INSTALL
 install-local: $(SECURITY_PROGRAMS)
-       $(MKINSTALLDIRS) $(DESTDIR)$(prefix)/bin
+       $(MKINSTALLDIRS) $(DESTDIR)$(PROGRAM_INSTALL_DIR)
        for p in $(SECURITY_PROGRAMS) ; do \
-           $(INSTALL_BIN) $$p $(DESTDIR)$(prefix)/bin ; \
+           $(INSTALL_BIN) $$p $(DESTDIR)$(PROGRAM_INSTALL_DIR) ; \
+           test ! -f $$p.mdb || $(INSTALL_BIN) $$p.mdb $(DESTDIR)$(PROGRAM_INSTALL_DIR) ; \
        done
 
 uninstall-local:
        for p in $(SECURITY_PROGRAMS) ; do \
-           rm -f $(DESTDIR)$(prefix)/bin/$$p ; \
+           rm -f $(DESTDIR)$(PROGRAM_INSTALL_DIR)/$$p* ; \
        done
+endif
 
 test-local:
 
-run-test-local:
+run-test-local run-test-ondotnet-local:
 
 clean-local:
-       rm -f *.exe *.pdb
+       rm -f *.exe *.mdb *.pdb
+       rm -f $(topdir)/class/lib/$(PROFILE)/sn.exe*
 
 dist-local: dist-default
 
-sn.exe: sn.cs StrongNameManager.cs AssemblyInfo.cs
-       $(CSCOMPILE) $^
+sn_sources = sn.cs StrongNameManager.cs AssemblyInfo.cs $(topdir)/build/common/Consts.cs
+sn.exe $(topdir)/class/lib/$(PROFILE)/sn.exe: $(sn_sources)
+       $(CSCOMPILE) /out:$@ $(sn_sources)
 
-%.exe: %.cs AssemblyInfo.cs
+%.exe: %.cs AssemblyInfo.cs $(topdir)/build/common/Consts.cs
        $(CSCOMPILE) $^