]> 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 ef7db610c48f234d514ebe495b3a8e31dab20584..58186af2d25218bb27bc95608b0d80baf74dbbba 100644 (file)
 #
 # Makefile for Cygwin installer
 
-AUTOMAKE_OPTIONS = dist-bzip2 subdir-objects 1.6
-DIST_SUBDIRS = bz2lib zlib libgetopt++
-SUBDIRS = bz2lib zlib libgetopt++ @RSYNC@
+DIST_SUBDIRS = libgetopt++ tests libgpg-error libgcrypt
+SUBDIRS = libgetopt++ tests libgpg-error libgcrypt
 
 ## DISTCLEANFILES = include/stamp-h include/stamp-h[0-9]*
 
-AM_CFLAGS      = -Werror -Winline -Wall -Wpointer-arith \
-  -Wcast-align -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes \
-  -Wmissing-declarations -Wcomments
-AM_CXXFLAGS    = $(AM_CFLAGS) 
+# We would like to use -Winline for C++ as well, but some STL code triggers
+# this warning. (Bug verified present in gcc-3.3)
+# -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)/bz2lib -I$(srcdir)/libgetopt++/include
-
-noinst_PROGRAMS = \
-  setup \
-  @INILINT@
+noinst_PROGRAMS = setup @INILINT@
 
 EXTRA_PROGRAMS = inilint
 ## noinst_PROGRAMS +=inilint
 
-# to avoid false errors that assembly generates
-WARNONLY_CFLAGS        = -Winline -Wall -Wpointer-arith -Wcast-align \
-       -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes \
-       -Wmissing-declarations -Wcomments $(INCLUDES)
-
 EXTRA_DIST = \
-  check-na.bmp \
-  check-no.bmp \
-  check-yes.bmp \
-  choose-rtarrow.bmp \
-  choose-spin.bmp \
-  cygwin.ico \
-  inilex.l \
-  iniparse.y
+       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
 
-if MINGWTARGET
-  inilint_extras = \
-       autoload.c \
-       mklink2.cc\
-       mklink2.cc
-else
-  inilint_extras =
-endif
+CLEANFILES = setup_version.c
 
-if ENABLERSYNC
-  rsync_source = \
-       io_stream_rsync.cc \
-       io_stream_rsync.h 
+if MINGWTARGET
+inilint_extras = \
+       autoload.c \
+       mklink2.cc
 else
-  rsync_source = 
+inilint_extras =
 endif
 
-inilint_LDADD = libgetopt++/libgetopt++.la -lstdc++ -luser32 -lkernel32 
+inilint_LDADD = \
+       libinilex.a libgetopt++/libgetopt++.la
 inilint_SOURCES = \
-  filemanip.cc \
-  filemanip.h \
-  LogSingleton.cc \
-  LogSingleton.h \
-  IniDBBuilder.cc \
-  IniDBBuilder.h \
-  inilex.cc \
-  inilintmain.cc \
-  iniparse.cc \
-  iniparse.h \
-  io_stream.h \
-  io_stream.cc \
-  io_stream_file.h \
-  io_stream_file.cc \
-  IOStreamProvider.h \
-  PackageTrust.h \
-  rfc1738.cc \
-  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)
 
-setup_LDADD = res.o zlib/libzcygw.a bz2lib/libbz2.a \
-       libgetopt++/libgetopt++.la \
-       @RSYNCLIB@ \
-       -lstdc++ -luser32 -lkernel32 \
-       -lcomctl32 -lole32 -lwsock32 -lnetapi32 -ladvapi32 -luuid 
-setup_LDFLAGS = -mwindows
+# workaround to allow omitting -Werror on inilex.cc.
+noinst_LIBRARIES = libinilex.a
+libinilex_a_SOURCES = inilex.ll
+libinilex_a_CXXFLAGS = $(BASECXXFLAGS)
+
+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 \
        archive.cc \
        archive.h \
        archive_tar.cc \
        archive_tar.h \
        archive_tar_file.cc \
        autoload.c \
-       category.cc \
-       category.h \
        choose.cc \
        choose.h \
-       cistring.cc \
-       cistring.h \
        compress.cc \
        compress.h \
        compress_bz.cc \
        compress_bz.h \
        compress_gz.cc \
        compress_gz.h \
-       concat.cc \
-       concat.h \
+       ConnectionSetting.cc \
+       ConnectionSetting.h \
+       ControlAdjuster.cc \
+       ControlAdjuster.h \
+       crypto.cc \
+       crypto.h \
+       cyg-pubkey.h \
        cygpackage.cc \
        cygpackage.h \
        desktop.cc \
@@ -146,19 +163,19 @@ setup_SOURCES = \
        filemanip.cc \
        filemanip.h \
        fromcwd.cc \
+       Generic.h \
        geturl.cc \
        geturl.h \
-       hash.cc \
-       hash.h \
+       gpg-packet.cc \
+       gpg-packet.h \
        ini.cc \
        ini.h \
-       IniDBBuilder.cc \
        IniDBBuilder.h \
        IniDBBuilderPackage.cc \
        IniDBBuilderPackage.h \
-       inilex.cc \
-       iniparse.cc \
-       iniparse.h \
+       iniparse.yy \
+       IniParseFeedback.cc \
+       IniParseFeedback.h \
        IniParseFindVisitor.cc \
        IniParseFindVisitor.h \
        install.cc \
@@ -171,20 +188,15 @@ setup_SOURCES = \
        io_stream_memory.cc \
        io_stream_memory.h \
        IOStreamProvider.h \
-       list.h \
+       KeysSetting.cc \
+       KeysSetting.h \
        localdir.cc \
        localdir.h \
-       log.cc \
-       log.h \
        LogFile.cc \
        LogFile.h \
        LogSingleton.cc \
        LogSingleton.h \
        main.cc \
-       md5.c \
-       md5.h \
-       MD5++.cc \
-       MD5++.h \
        mkdir.cc \
        mkdir.h \
        mklink2.cc \
@@ -213,31 +225,33 @@ setup_SOURCES = \
        package_source.h \
        package_version.cc \
        package_version.h \
+       PackageSpecification.cc \
+       PackageSpecification.h \
        PackageTrust.h \
        PickCategoryLine.cc \
        PickCategoryLine.h \
-       PickLine.cc \
        PickLine.h \
        PickPackageLine.cc \
        PickPackageLine.h \
        PickView.cc \
        PickView.h \
-       port.h \
        postinstall.cc \
+       prereq.cc \
+       prereq.h \
        proppage.cc \
        proppage.h \
        propsheet.cc \
        propsheet.h \
+       RECTWrapper.h \
        res.rc \
        resource.h \
-       rfc1738.cc \
-       rfc1738.h \
        root.cc \
        root.h \
        ScanFindVisitor.cc \
        ScanFindVisitor.h \
        script.cc \
        script.h \
+       setup_version.h \
        setup_version.c \
        simpsock.cc \
        simpsock.h \
@@ -245,6 +259,8 @@ setup_SOURCES = \
        site.h \
        source.cc \
        source.h \
+       SourceSetting.cc \
+       SourceSetting.h \
        splash.cc \
        splash.h \
        state.cc \
@@ -253,53 +269,48 @@ setup_SOURCES = \
        String++.h \
        threebar.cc \
        threebar.h \
-       version.cc \
-       version.h \
+       UserSetting.cc \
+       UserSetting.h \
+       UserSettings.cc \
+       UserSettings.h \
        win32.cc \
        win32.h \
        window.cc \
        window.h \
-       $(rsync_source)
-       
+       csu_util/MD5Sum.cc \
+       csu_util/MD5Sum.h \
+       csu_util/rfc1738.cc \
+       csu_util/rfc1738.h \
+       csu_util/version_compare.cc \
+       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=`grep '^\$$Revision.*' $(srcdir)/ChangeLog \
-       | sed -e 's/\$$Revision:* *//' \
-         -e 's/ *$$.*//'` ;\
        (echo '#define VERSION_PREFIX "%%% setup-version"';\
-        echo 'static const char version_store[] = VERSION_PREFIX " '$$V'";';\
-        echo 'const char *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
+.rc.o:
        $(WINDRES) --include-dir $(srcdir) -o $@ $<
 
-autoload.o: autoload.c
-@AMDEP_TRUE@   source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@   depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@
-@AMDEP_TRUE@   $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-       $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(WARNONLY_CFLAGS) $(CFLAGS) -c -o $@ $< -fno-inline-functions
-
-inilex.o: inilex.cc
-@AMDEP_TRUE@   source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@   depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@
-@AMDEP_TRUE@   $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-       $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
-       $(AM_CPPFLAGS) $(CPPFLAGS) $(WARNONLY_CFLAGS) $(CXXFLAGS) -c -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
+# 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
 
-# Make a distribution package and tarball
-release: setup$(EXEEXT) dist-all $(srcdir)/ChangeLog Makefile
-       $(STRIP) setup.exe && \
-       upx --best setup.exe && \
-       V=`grep '^\$$Revision.*' $(srcdir)/ChangeLog \
-       | sed -e 's/\$$Revision:* *//' \
-         -e 's/ *$$.*//'` ;\
-       mv setup-0.tar.bz2 setup-${V}.tar.bz2 && \
-       tar cjf setup-${V}-1-src.tar.bz2 setup-${V}.tar.bz2
+# Create a snapshot and upload it (requires write access)
+snapshot: release
+       scp -C setup-${VER}.exe setup-debug-${VER}.exe.gz setup-${VER}.tar.bz2 \
+           $${cygwinsite:-cygwin.com}:setup-snapshots/
This page took 0.033352 seconds and 5 git commands to generate.