]> cygwin.com Git - cygwin-apps/setup.git/blobdiff - Makefile.am
Merged across diffs between setup_crypto_branch_branchpoint and
[cygwin-apps/setup.git] / Makefile.am
index 293956b593a0f8351e1945a6fc38e0396da99c94..58186af2d25218bb27bc95608b0d80baf74dbbba 100644 (file)
 #
 # Makefile for Cygwin installer
 
-AUTOMAKE_OPTIONS = dist-bzip2 subdir-objects 1.6 foreign
-DIST_SUBDIRS = libgetopt++ tests
-SUBDIRS =      libgetopt++ tests
+DIST_SUBDIRS = libgetopt++ tests libgpg-error libgcrypt
+SUBDIRS = libgetopt++ tests libgpg-error libgcrypt
 
 ## DISTCLEANFILES = include/stamp-h include/stamp-h[0-9]*
 
 # We would like to use -Winline for C++ as well, but some STL code triggers
 # this warning. (Bug verified present in gcc-3.3)
-BASECXXFLAGS   = -Wall -Wpointer-arith -Wcomments -Wcast-align -Wwrite-strings
-AM_CXXFLAGS    = -Werror $(BASECXXFLAGS)
-AM_CFLAGS      = $(AM_CXXFLAGS) -Wmissing-declarations -Winline \
-                 -Wstrict-prototypes -Wmissing-prototypes
+# -Wno-uninitialized added to deal with g++ 3.4.4's spurious STL warnings
+# (http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22207)
+BASECXXFLAGS = -Wall -Wno-uninitialized -Wpointer-arith -Wcomments \
+               -Wcast-align -Wwrite-strings
+AM_CXXFLAGS = -Werror $(BASECXXFLAGS)
+AM_CFLAGS = $(AM_CXXFLAGS) -Wmissing-declarations -Winline \
+            -Wstrict-prototypes -Wmissing-prototypes
+AM_YFLAGS = -d
+AM_LFLAGS = -8
+WINDRES = @WINDRES@
+AM_CPPFLAGS = -I$(srcdir)/libgetopt++/include -I$(top_builddir)/libgpg-error/src -I$(top_builddir)/libgcrypt/src -I$(srcdir)/libgcrypt/src
 
-WINDRES                := @WINDRES@
-
-INCLUDES       = -I$(srcdir)/libgetopt++/include -I/usr/include/mingw
-
-noinst_PROGRAMS = \
-  setup \
-  @INILINT@
+noinst_PROGRAMS = setup @INILINT@
 
 EXTRA_PROGRAMS = inilint
 ## noinst_PROGRAMS +=inilint
 
 EXTRA_DIST = \
-  CHANGES \
-  CONTRIBUTORS \
-  bootstrap.sh \
-  check-na.bmp \
-  check-no.bmp \
-  check-yes.bmp \
-  choose-rtarrow.bmp \
-  choose-spin.bmp \
-  cygwin.ico \
-  inilex.l \
-  iniparse.y \
-  libmd5-rfc/README \
-  libmd5-rfc/md5main.c \
-  setup.exe.manifest
+       CHANGES \
+       CONTRIBUTORS \
+       COPYING \
+       bootstrap.sh \
+       check-na.bmp \
+       check-no.bmp \
+       check-yes.bmp \
+       choose-rtarrow.bmp \
+       choose-spin.bmp \
+       cygwin.ico \
+       doconfigure \
+       libmd5-rfc/README \
+       libmd5-rfc/md5main.c \
+       setup.exe.manifest \
+       tree-minus.bmp \
+       tree-plus.bmp
 
-BUILT_SOURCES = setup_version.c \
-       inilex.cc \
-       iniparse.cc
+# iniparse.h is generated from iniparse.yy via bison -d, so it needs to be
+# included here for proper tracking (but not iniparse.cc, since automake
+# knows about that already)
+BUILT_SOURCES = \
+       setup_version.c \
+       iniparse.h
+
+CLEANFILES = setup_version.c
 
 if MINGWTARGET
-  inilint_extras = \
-       autoload.c \
-       mklink2.cc
+inilint_extras = \
+       autoload.c \
+       mklink2.cc
 else
-  inilint_extras =
+inilint_extras =
 endif
 
-inilint_LDADD = libgetopt++/libgetopt++.la -luser32 -lkernel32 
+inilint_LDADD = \
+       libinilex.a libgetopt++/libgetopt++.la
 inilint_SOURCES = \
-  filemanip.cc \
-  filemanip.h \
-  find.cc \
-  find.h \
-  FindVisitor.cc \
-  FindVisitor.h \
-  LogSingleton.cc \
-  LogSingleton.h \
-  IniDBBuilder.cc \
-  IniDBBuilder.h \
-  inilex.cc \
-  inilintmain.cc \
-  iniparse.cc \
-  iniparse.h \
-  IniParseFeedback.cc \
-  IniParseFeedback.h \
-  io_stream.h \
-  io_stream.cc \
-  io_stream_file.h \
-  io_stream_file.cc \
-  IOStreamProvider.h \
-  mkdir.cc \
-  mkdir.h \
-  PackageSpecification.cc \
-  PackageSpecification.h \
-  PackageTrust.h \
-  csu_util/rfc1738.cc \
-  csu_util/rfc1738.h \
-  String++.cc \
-  String++.h \
-  $(inilint_extras)
+       filemanip.cc \
+       filemanip.h \
+       find.cc \
+       find.h \
+       FindVisitor.cc \
+       FindVisitor.h \
+       LogSingleton.cc \
+       LogSingleton.h \
+       IniDBBuilder.h \
+       inilintmain.cc \
+       iniparse.yy \
+       IniParseFeedback.cc \
+       IniParseFeedback.h \
+       io_stream.h \
+       io_stream.cc \
+       io_stream_file.h \
+       io_stream_file.cc \
+       IOStreamProvider.h \
+       mkdir.cc \
+       mkdir.h \
+       PackageSpecification.cc \
+       PackageSpecification.h \
+       PackageTrust.h \
+       csu_util/rfc1738.cc \
+       csu_util/rfc1738.h \
+       String++.cc \
+       String++.h \
+       $(inilint_extras)
 
-# Obviously we are not really building a program called warnonly
-# However, this dance was the most non-invasive way I could find
-# of varying CFLAGS for a single file
-EXTRA_PROGRAMS += warnonly
-warnonly_CXXFLAGS = $(BASECXXFLAGS)
-warnonly_SOURCES = inilex.cc
-EXTRA_setup_SOURCES = $(warnonly_SOURCES)
+# workaround to allow omitting -Werror on inilex.cc.
+noinst_LIBRARIES = libinilex.a
+libinilex_a_SOURCES = inilex.ll
+libinilex_a_CXXFLAGS = $(BASECXXFLAGS)
 
-setup_LDADD = warnonly-inilex.o res.o \
-       libgetopt++/libgetopt++.la \
-       /usr/lib/mingw/libbz2.a \
-       /usr/lib/mingw/libz.a \
-       -luser32 -lkernel32 \
-       -lcomctl32 -lole32 -lwsock32 -lnetapi32 -ladvapi32 -luuid 
-setup_LDFLAGS = -mwindows
+setup_LDADD = \
+       libinilex.a libgetopt++/libgetopt++.la res.o \
+       libgcrypt/src/.libs/libgcrypt.a \
+       libgpg-error/src/.libs/libgpg-error.a \
+       -lcomctl32 -lole32 -lwsock32 -lnetapi32 -luuid -lbz2 -lz 
+setup_LDFLAGS = -mwindows -Wl,-static
 setup_SOURCES = \
        AntiVirus.cc \
        AntiVirus.h \
@@ -128,8 +129,6 @@ setup_SOURCES = \
        archive_tar.h \
        archive_tar_file.cc \
        autoload.c \
-       category.cc \
-       category.h \
        choose.cc \
        choose.h \
        compress.cc \
@@ -142,6 +141,9 @@ setup_SOURCES = \
        ConnectionSetting.h \
        ControlAdjuster.cc \
        ControlAdjuster.h \
+       crypto.cc \
+       crypto.h \
+       cyg-pubkey.h \
        cygpackage.cc \
        cygpackage.h \
        desktop.cc \
@@ -164,14 +166,14 @@ setup_SOURCES = \
        Generic.h \
        geturl.cc \
        geturl.h \
+       gpg-packet.cc \
+       gpg-packet.h \
        ini.cc \
        ini.h \
-       IniDBBuilder.cc \
        IniDBBuilder.h \
        IniDBBuilderPackage.cc \
        IniDBBuilderPackage.h \
-       iniparse.cc \
-       iniparse.h \
+       iniparse.yy \
        IniParseFeedback.cc \
        IniParseFeedback.h \
        IniParseFindVisitor.cc \
@@ -186,6 +188,8 @@ setup_SOURCES = \
        io_stream_memory.cc \
        io_stream_memory.h \
        IOStreamProvider.h \
+       KeysSetting.cc \
+       KeysSetting.h \
        localdir.cc \
        localdir.h \
        LogFile.cc \
@@ -232,6 +236,8 @@ setup_SOURCES = \
        PickView.cc \
        PickView.h \
        postinstall.cc \
+       prereq.cc \
+       prereq.h \
        proppage.cc \
        proppage.h \
        propsheet.cc \
@@ -267,6 +273,7 @@ setup_SOURCES = \
        UserSetting.h \
        UserSettings.cc \
        UserSettings.h \
+       win32.cc \
        win32.h \
        window.cc \
        window.h \
@@ -278,38 +285,32 @@ setup_SOURCES = \
        csu_util/version_compare.h \
        libmd5-rfc/md5.c \
        libmd5-rfc/md5.h
-       
+
+VER := $(shell sed -ne 's/^\$$Revi[s]ion: *\([^ ]*\) *$$.*/\1/p' \
+               $(srcdir)/ChangeLog)
+
 setup_version.c : $(srcdir)/ChangeLog Makefile
-       V=`sed -ne 's/^\$$Revi[s]ion: *\([^ ]*\) *$$.*/\1/p' \
-         $(srcdir)/ChangeLog` ;\
        (echo '#define VERSION_PREFIX "%%% setup-version"';\
-        echo 'static const char version_store[] = VERSION_PREFIX " '$$V'";';\
-        echo 'const char *setup_version = version_store + sizeof (VERSION_PREFIX);') > version.tmp;\
+       echo 'static const char version_store[] = VERSION_PREFIX " '${VER}'";';\
+       echo 'const char *setup_version = version_store + sizeof (VERSION_PREFIX);') > version.tmp
        mv version.tmp setup_version.c
 
-%.o: %.rc
-       $(WINDRES) --preprocessor "$(CC) -E -xc-header -DRC_INVOKED" --include-dir $(srcdir) -o $@ $<
-
-iniparse.cc iniparse.h : iniparse.y
-       bison -d -o iniparse.cc $(srcdir)/iniparse.y
-       @mv iniparse.cc.h iniparse.h 2>/dev/null || mv iniparse.hh iniparse.h
-
-inilex.cc : inilex.l iniparse.h
-       flex -8 $(srcdir)/inilex.l
-       mv lex.yy.c inilex.cc
+.rc.o:
+       $(WINDRES) --include-dir $(srcdir) -o $@ $<
 
-# Make a distribution package and tarball
-release: setup$(EXEEXT) dist-all $(srcdir)/ChangeLog Makefile
-       $(STRIP) setup.exe && \
-       upx --best setup.exe && \
-       V=`sed -ne 's/^\$$Revi[s]ion: *\([^ ]*\) *$$.*/\1/p' \
-         $(srcdir)/ChangeLog` ;\
-       mv setup.exe setup-$${V}.exe && \
-       mv setup-0.tar.bz2 setup-$${V}.tar.bz2 && \
-       tar cjf setup-$${V}-1-src.tar.bz2 setup-$${V}.tar.bz2
+# this target creates:
+#   setup-x.yyy.exe             (UPXed stripped exe)
+#   setup-debug-x.yyy.exe.gz    (gzipped unstripped exe)
+#   setup-x.yyy.tar.bz2         (source)
+release: setup.exe $(srcdir)/ChangeLog Makefile
+       $(MAKE) dist-bzip2 distdir=setup-${VER}
+       cp -pf setup.exe setup-debug-${VER}.exe
+       gzip -f9 setup-debug-${VER}.exe
+       cp -pf setup.exe setup-${VER}.exe
+       $(STRIP) setup-${VER}.exe
+       upx --best setup-${VER}.exe
 
 # Create a snapshot and upload it (requires write access)
 snapshot: release
-       V=`sed -ne 's/^\$$Revi[s]ion: *\([^ ]*\) *$$.*/\1/p' \
-         $(srcdir)/ChangeLog` ;\
-       scp -C setup-$${V}.exe setup-$${V}.tar.bz2 $${cygwinsite}:setup-snapshots/
+       scp -C setup-${VER}.exe setup-debug-${VER}.exe.gz setup-${VER}.tar.bz2 \
+           $${cygwinsite:-cygwin.com}:setup-snapshots/
This page took 0.028032 seconds and 5 git commands to generate.