Từ 1 tới 3 trên tổng số 3 kết quả

Đề tài: cách Viết file config.guess ???

  1. #1
    Ngày gia nhập
    07 2011
    Bài viết
    1

    Mặc định cách Viết file config.guess ???

    hi anh em, cho mình hỏi một số điều về lập trình C trên linux chút

    mình có 1 source code sẵn, được biên dịch bằng gcc,trong file source code của nó có file config.guess, file này có chứa rất nhiều thứ, mình không rõ file này là do tool sinh ra hay phải tự viết. cấu trúc của nó thế nào, và làm thế nào để hiểu được nó ???

    Bash Code:
    1. #! /bin/sh
    2.  
    3.  
    4. timestamp='2011-7-27'
    5.  
    6. me=`echo "$0" | sed -e 's,.*/,,'`
    7.  
    8. usage="\
    9. Usage: $0 [OPTION]
    10.  
    11. Output the configuration name of the system \`$me' is run on.
    12.  
    13. Operation modes:
    14.  -h, --help         print this help, then exit
    15.  -t, --time-stamp   print date of last modification, then exit
    16.  -v, --version      print version number, then exit
    17.  
    18. Report bugs and patches to <config-patches@gnu.org>."
    19.  
    20. version="\
    21. GNU config.guess ($timestamp)
    22.  
    23. Originally written by Per Bothner.
    24. Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
    25. 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free
    26. Software Foundation, Inc.
    27.  
    28. This is free software; see the source for copying conditions.  There is NO
    29. warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
    30.  
    31. help="
    32. Try \`$me --help' for more information."
    33.  
    34. # Parse command line
    35. while test $# -gt 0 ; do
    36.   case $1 in
    37.     --time-stamp | --time* | -t )
    38.        echo "$timestamp" ; exit ;;
    39.     --version | -v )
    40.        echo "$version" ; exit ;;
    41.     --help | --h* | -h )
    42.        echo "$usage"; exit ;;
    43.     -- )     # Stop option processing
    44.        shift; break ;;
    45.     - ) # Use stdin as input.
    46.        break ;;
    47.     -* )
    48.        echo "$me: invalid option $1$help" >&2
    49.        exit 1 ;;
    50.     * )
    51.        break ;;
    52.   esac
    53. done
    54.  
    55. if test $# != 0; then
    56.   echo "$me: too many arguments$help" >&2
    57.   exit 1
    58. fi
    59.  
    60. trap 'exit 1' 1 2 15
    61.  
    62.  
    63. set_cc_for_build='
    64. trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ;
    65. trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ;
    66. : ${TMPDIR=/tmp} ;
    67. { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
    68. { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } ||
    69. { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } ||
    70. { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ;
    71. dummy=$tmp/dummy ;
    72. tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ;
    73. case $CC_FOR_BUILD,$HOST_CC,$CC in
    74. ,,)    echo "int x;" > $dummy.c ;
    75.     for c in cc gcc c89 c99 ; do
    76.       if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then
    77.          CC_FOR_BUILD="$c"; break ;
    78.       fi ;
    79.     done ;
    80.     if test x"$CC_FOR_BUILD" = x ; then
    81.       CC_FOR_BUILD=no_compiler_found ;
    82.     fi
    83.     ;;
    84. ,,*)   CC_FOR_BUILD=$CC ;;
    85. ,*,*)  CC_FOR_BUILD=$HOST_CC ;;
    86. esac ; set_cc_for_build= ;'
    87.  
    88. # This is needed to find uname on a Pyramid OSx when run in the BSD universe.
    89. # (ghazi@noc.rutgers.edu 1994-08-24)
    90. if (test -f /.attbin/uname) >/dev/null 2>&1 ; then
    91.     PATH=$PATH:/.attbin ; export PATH
    92. fi
    93.  
    94. UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown
    95. UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
    96. UNAME_SYSTEM=`(uname -s) 2>/dev/null`  || UNAME_SYSTEM=unknown
    97. UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
    98.  
    99. # Note: order is significant - the case branches are not exclusive.
    100.  
    101. case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
    102.     *:NetBSD:*:*)
    103.     # NetBSD (nbsd) targets should (where applicable) match one or
    104.     # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*,
    105.     # *-*-netbsdecoff* and *-*-netbsd*.  For targets that recently
    106.     # switched to ELF, *-*-netbsd* would select the old
    107.     # object file format.  This provides both forward
    108.     # compatibility and a consistent mechanism for selecting the
    109.     # object file format.
    110.     #
    111.     # Note: NetBSD doesn't particularly care about the vendor
    112.     # portion of the name.  We always set it to "unknown".
    113.     sysctl="sysctl -n hw.machine_arch"
    114.     UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \
    115.         /usr/sbin/$sysctl 2>/dev/null || echo unknown)`
    116.     case "${UNAME_MACHINE_ARCH}" in
    117.         armeb) machine=armeb-unknown ;;
    118.         arm*) machine=arm-unknown ;;
    119.         sh3el) machine=shl-unknown ;;
    120.         sh3eb) machine=sh-unknown ;;
    121.         sh5el) machine=sh5le-unknown ;;
    122.         *) machine=${UNAME_MACHINE_ARCH}-unknown ;;
    123.     esac
    124.     # The Operating System including object format, if it has switched
    125.     # to ELF recently, or will in the future.
    126.     case "${UNAME_MACHINE_ARCH}" in
    127.         arm*|i386|m68k|ns32k|sh3*|sparc|vax)
    128.         eval $set_cc_for_build
    129.         if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
    130.             | grep -q __ELF__
    131.         then
    132.             # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout).
    133.             # Return netbsd for either.  FIX?
    134.             os=netbsd
    135.         else
    136.             os=netbsdelf
    137.         fi
    138.         ;;
    139.         *)
    140.             os=netbsd
    141.         ;;
    142.     esac
    143.     # The OS release
    144.     # Debian GNU/NetBSD machines have a different userland, and
    145.     # thus, need a distinct triplet. However, they do not need
    146.     # kernel version information, so it can be replaced with a
    147.     # suitable tag, in the style of linux-gnu.
    148.     case "${UNAME_VERSION}" in
    149.         Debian*)
    150.         release='-gnu'
    151.         ;;
    152.         *)
    153.         release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
    154.         ;;
    155.     esac
    156.     # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
    157.     # contains redundant information, the shorter form:
    158.     # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
    159.     echo "${machine}-${os}${release}"
    160.     exit ;;
    161.     *:OpenBSD:*:*)
    162.     UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
    163.     echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE}
    164.     exit ;;
    165.     *:ekkoBSD:*:*)
    166.     echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE}
    167.     exit ;;
    168.     *:SolidBSD:*:*)
    169.     echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE}
    170.     exit ;;
    171.     macppc:MirBSD:*:*)
    172.     echo powerpc-unknown-mirbsd${UNAME_RELEASE}
    173.     exit ;;
    174.     *:MirBSD:*:*)
    175.     echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE}
    176.     exit ;;
    177.     alpha:OSF1:*:*)
    178.     case $UNAME_RELEASE in
    179.     *4.0)
    180.         UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
    181.         ;;
    182.     *5.*)
    183.             UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
    184.         ;;
    185.     esac
    186.     # According to Compaq, /usr/sbin/psrinfo has been available on
    187.     # OSF/1 and Tru64 systems produced since 1995.  I hope that
    188.     # covers most systems running today.  This code pipes the CPU
    189.     # types through head -n 1, so we only detect the type of CPU 0.
    190.     ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^  The alpha \(.*\) processor.*$/\1/p' | head -n 1`
    191.     case "$ALPHA_CPU_TYPE" in
    192.         "EV4 (21064)")
    193.         UNAME_MACHINE="alpha" ;;
    194.         "EV4.5 (21064)")
    195.         UNAME_MACHINE="alpha" ;;
    196.         "LCA4 (21066/21068)")
    197.         UNAME_MACHINE="alpha" ;;
    198.         "EV5 (21164)")
    199.         UNAME_MACHINE="alphaev5" ;;
    200.         "EV5.6 (21164A)")
    201.         UNAME_MACHINE="alphaev56" ;;
    202.         "EV5.6 (21164PC)")
    203.         UNAME_MACHINE="alphapca56" ;;
    204.         "EV5.7 (21164PC)")
    205.         UNAME_MACHINE="alphapca57" ;;
    206.         "EV6 (21264)")
    207.         UNAME_MACHINE="alphaev6" ;;
    208.         "EV6.7 (21264A)")
    209.         UNAME_MACHINE="alphaev67" ;;
    210.         "EV6.8CB (21264C)")
    211.         UNAME_MACHINE="alphaev68" ;;
    212.         "EV6.8AL (21264B)")
    213.         UNAME_MACHINE="alphaev68" ;;
    214.         "EV6.8CX (21264D)")
    215.         UNAME_MACHINE="alphaev68" ;;
    216.         "EV6.9A (21264/EV69A)")
    217.         UNAME_MACHINE="alphaev69" ;;
    218.         "EV7 (21364)")
    219.         UNAME_MACHINE="alphaev7" ;;
    220.         "EV7.9 (21364A)")
    221.         UNAME_MACHINE="alphaev79" ;;
    222.     esac
    223.     # A Pn.n version is a patched version.
    224.     # A Vn.n version is a released version.
    225.     # A Tn.n version is a released field test version.
    226.     # A Xn.n version is an unreleased experimental baselevel.
    227.     # 1.2 uses "1.2" for uname -r.
    228.     echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
    229.     exit ;;
    230.     Alpha\ *:Windows_NT*:*)
    231.     # How do we know it's Interix rather than the generic POSIX subsystem?
    232.     # Should we change UNAME_MACHINE based on the output of uname instead
    233.     # of the specific Alpha model?
    234.     echo alpha-pc-interix
    235.     exit ;;
    236.     21064:Windows_NT:50:3)
    237.     echo alpha-dec-winnt3.5
    238.     exit ;;
    239.     Amiga*:UNIX_System_V:4.0:*)
    240.     echo m68k-unknown-sysv4
    241.     exit ;;
    242.     *:[Aa]miga[Oo][Ss]:*:*)
    243.     echo ${UNAME_MACHINE}-unknown-amigaos
    244.     exit ;;
    245.     *:[Mm]orph[Oo][Ss]:*:*)
    246.     echo ${UNAME_MACHINE}-unknown-morphos
    247.     exit ;;
    248.     *:OS/390:*:*)
    249.     echo i370-ibm-openedition
    250.     exit ;;
    251.     *:z/VM:*:*)
    252.     echo s390-ibm-zvmoe
    253.     exit ;;
    254.     *:OS400:*:*)
    255.         echo powerpc-ibm-os400
    256.     exit ;;
    257.     arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
    258.     echo arm-acorn-riscix${UNAME_RELEASE}
    259.     exit ;;
    260.     arm:riscos:*:*|arm:RISCOS:*:*)
    261.     echo arm-unknown-riscos
    262.     exit ;;
    263.     SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
    264.     echo hppa1.1-hitachi-hiuxmpp
    265.     exit ;;
    266.     Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*)
    267.     # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE.
    268.     if test "`(/bin/universe) 2>/dev/null`" = att ; then
    269.         echo pyramid-pyramid-sysv3
    270.     else
    271.         echo pyramid-pyramid-bsd
    272.     fi
    273.     exit ;;
    274.     NILE*:*:*:dcosx)
    275.     echo pyramid-pyramid-svr4
    276.     exit ;;
    277.     DRS?6000:unix:4.0:6*)
    278.     echo sparc-icl-nx6
    279.     exit ;;
    280.     DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*)
    281.     case `/usr/bin/uname -p` in
    282.         sparc) echo sparc-icl-nx7; exit ;;
    283.     esac ;;
    284.     s390x:SunOS:*:*)
    285.     echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
    286.     exit ;;
    287.     sun4H:SunOS:5.*:*)
    288.     echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
    289.     exit ;;
    290.     sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
    291.     echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
    292.     exit ;;
    293.     i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*)
    294.     echo i386-pc-auroraux${UNAME_RELEASE}
    295.     exit ;;
    296.     i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
    297.     eval $set_cc_for_build
    298.     SUN_ARCH="i386"
    299.     # If there is a compiler, see if it is configured for 64-bit objects.
    300.     # Note that the Sun cc does not turn __LP64__ into 1 like gcc does.
    301.     # This test works for both compilers.
    302.     if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
    303.         if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \
    304.         (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
    305.         grep IS_64BIT_ARCH >/dev/null
    306.         then
    307.         SUN_ARCH="x86_64"
    308.         fi
    309.     fi
    310.     echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
    311.     exit ;;
    312.     sun4*:SunOS:6*:*)
    313.     # According to config.sub, this is the proper way to canonicalize
    314.     # SunOS6.  Hard to guess exactly what SunOS6 will be like, but
    315.     # it's likely to be more like Solaris than SunOS4.
    316.     echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
    317.     exit ;;
    318.     sun4*:SunOS:*:*)
    319.     case "`/usr/bin/arch -k`" in
    320.         Series*|S4*)
    321.         UNAME_RELEASE=`uname -v`
    322.         ;;
    323.     esac
    324.     # Japanese Language versions have a version number like `4.1.3-JL'.
    325.     echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'`
    326.     exit ;;
    327.     sun3*:SunOS:*:*)
    328.     echo m68k-sun-sunos${UNAME_RELEASE}
    329.     exit ;;
    330.     sun*:*:4.2BSD:*)
    331.     UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
    332.     test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3
    333.     case "`/bin/arch`" in
    334.         sun3)
    335.         echo m68k-sun-sunos${UNAME_RELEASE}
    336.         ;;
    337.         sun4)
    338.         echo sparc-sun-sunos${UNAME_RELEASE}
    339.         ;;
    340.     esac
    341.     exit ;;
    342.     aushp:SunOS:*:*)
    343.     echo sparc-auspex-sunos${UNAME_RELEASE}
    344.     exit ;;
    345.     # The situation for MiNT is a little confusing.  The machine name
    346.     # can be virtually everything (everything which is not
    347.     # "atarist" or "atariste" at least should have a processor
    348.     # > m68000).  The system name ranges from "MiNT" over "FreeMiNT"
    349.     # to the lowercase version "mint" (or "freemint").  Finally
    350.     # the system name "TOS" denotes a system which is actually not
    351.     # MiNT.  But MiNT is downward compatible to TOS, so this should
    352.     # be no problem.
    353.     atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
    354.         echo m68k-atari-mint${UNAME_RELEASE}
    355.     exit ;;
    356.     atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
    357.     echo m68k-atari-mint${UNAME_RELEASE}
    358.         exit ;;
    359.     *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
    360.         echo m68k-atari-mint${UNAME_RELEASE}
    361.     exit ;;
    362.     milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
    363.         echo m68k-milan-mint${UNAME_RELEASE}
    364.         exit ;;
    365.     hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
    366.         echo m68k-hades-mint${UNAME_RELEASE}
    367.         exit ;;
    368.     *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
    369.         echo m68k-unknown-mint${UNAME_RELEASE}
    370.         exit ;;
    371.     m68k:machten:*:*)
    372.     echo m68k-apple-machten${UNAME_RELEASE}
    373.     exit ;;
    374.     powerpc:machten:*:*)
    375.     echo powerpc-apple-machten${UNAME_RELEASE}
    376.     exit ;;
    377.     RISC*:Mach:*:*)
    378.     echo mips-dec-mach_bsd4.3
    379.     exit ;;
    380.     RISC*:ULTRIX:*:*)
    381.     echo mips-dec-ultrix${UNAME_RELEASE}
    382.     exit ;;
    383.     VAX*:ULTRIX*:*:*)
    384.     echo vax-dec-ultrix${UNAME_RELEASE}
    385.     exit ;;
    386.     2020:CLIX:*:* | 2430:CLIX:*:*)
    387.     echo clipper-intergraph-clix${UNAME_RELEASE}
    388.     exit ;;
    389.     mips:*:*:UMIPS | mips:*:*:RISCos)
    390.     eval $set_cc_for_build
    391.     sed 's/^    //' << EOF >$dummy.c
    392. #ifdef __cplusplus
    393. #include <stdio.h>  /* for printf() prototype */
    394.     int main (int argc, char *argv[]) {
    395. #else
    396.     int main (argc, argv) int argc; char *argv[]; {
    397. #endif
    398.     #if defined (host_mips) && defined (MIPSEB)
    399.     #if defined (SYSTYPE_SYSV)
    400.       printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0);
    401.     #endif
    402.     #if defined (SYSTYPE_SVR4)
    403.       printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0);
    404.     #endif
    405.     #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD)
    406.       printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0);
    407.     #endif
    408.     #endif
    409.       exit (-1);
    410.     }
    411. EOF
    412.     $CC_FOR_BUILD -o $dummy $dummy.c &&
    413.       dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` &&
    414.       SYSTEM_NAME=`$dummy $dummyarg` &&
    415.         { echo "$SYSTEM_NAME"; exit; }
    416.     echo mips-mips-riscos${UNAME_RELEASE}
    417.     exit ;;
    418.     Motorola:PowerMAX_OS:*:*)
    419.     echo powerpc-motorola-powermax
    420.     exit ;;
    421.     Motorola:*:4.3:PL8-*)
    422.     echo powerpc-harris-powermax
    423.     exit ;;
    424.     Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*)
    425.     echo powerpc-harris-powermax
    426.     exit ;;
    427.     Night_Hawk:Power_UNIX:*:*)
    428.     echo powerpc-harris-powerunix
    429.     exit ;;
    430.     m88k:CX/UX:7*:*)
    431.     echo m88k-harris-cxux7
    432.     exit ;;
    433.     m88k:*:4*:R4*)
    434.     echo m88k-motorola-sysv4
    435.     exit ;;
    436.     m88k:*:3*:R3*)
    437.     echo m88k-motorola-sysv3
    438.     exit ;;
    439.     AViiON:dgux:*:*)
    440.         # DG/UX returns AViiON for all architectures
    441.         UNAME_PROCESSOR=`/usr/bin/uname -p`
    442.     if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ]
    443.     then
    444.         if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \
    445.            [ ${TARGET_BINARY_INTERFACE}x = x ]
    446.         then
    447.         echo m88k-dg-dgux${UNAME_RELEASE}
    448.         else
    449.         echo m88k-dg-dguxbcs${UNAME_RELEASE}
    450.         fi
    451.     else
    452.         echo i586-dg-dgux${UNAME_RELEASE}
    453.     fi
    454.     exit ;;
    455.     M88*:DolphinOS:*:*) # DolphinOS (SVR3)
    456.     echo m88k-dolphin-sysv3
    457.     exit ;;
    458.     M88*:*:R3*:*)
    459.     # Delta 88k system running SVR3
    460.     echo m88k-motorola-sysv3
    461.     exit ;;
    462.     XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3)
    463.     echo m88k-tektronix-sysv3
    464.     exit ;;
    465.     Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD)
    466.     echo m68k-tektronix-bsd
    467.     exit ;;
    468.     *:IRIX*:*:*)
    469.     echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'`
    470.     exit ;;
    471.     ????????:AIX?:[12].1:2)   # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
    472.     echo romp-ibm-aix     # uname -m gives an 8 hex-code CPU id
    473.     exit ;;               # Note that: echo "'`uname -s`'" gives 'AIX '
    474.     i*86:AIX:*:*)
    475.     echo i386-ibm-aix
    476.     exit ;;
    477.     ia64:AIX:*:*)
    478.     if [ -x /usr/bin/oslevel ] ; then
    479.         IBM_REV=`/usr/bin/oslevel`
    480.     else
    481.         IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
    482.     fi
    483.     echo ${UNAME_MACHINE}-ibm-aix${IBM_REV}
    484.     exit ;;
    485.     *:AIX:2:3)
    486.     if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
    487.         eval $set_cc_for_build
    488.         sed 's/^        //' << EOF >$dummy.c
    489.         #include <sys/systemcfg.h>
    490.  
    491.         main()
    492.             {
    493.             if (!__power_pc())
    494.                 exit(1);
    495.             puts("powerpc-ibm-aix3.2.5");
    496.             exit(0);
    497.             }
    498. EOF
    499.         if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy`
    500.         then
    501.             echo "$SYSTEM_NAME"
    502.         else
    503.             echo rs6000-ibm-aix3.2.5
    504.         fi
    505.     elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
    506.         echo rs6000-ibm-aix3.2.4
    507.     else
    508.         echo rs6000-ibm-aix3.2
    509.     fi
    510.     exit ;;
    511.     *:AIX:*:[456])
    512.     IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
    513.     if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
    514.         IBM_ARCH=rs6000
    515.     else
    516.         IBM_ARCH=powerpc
    517.     fi
    518.     if [ -x /usr/bin/oslevel ] ; then
    519.         IBM_REV=`/usr/bin/oslevel`
    520.     else
    521.         IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
    522.     fi
    523.     echo ${IBM_ARCH}-ibm-aix${IBM_REV}
    524.     exit ;;
    525.     *:AIX:*:*)
    526.     echo rs6000-ibm-aix
    527.     exit ;;
    528.     ibmrt:4.4BSD:*|romp-ibm:BSD:*)
    529.     echo romp-ibm-bsd4.4
    530.     exit ;;
    531.     ibmrt:*BSD:*|romp-ibm:BSD:*)            # covers RT/PC BSD and
    532.     echo romp-ibm-bsd${UNAME_RELEASE}   # 4.3 with uname added to
    533.     exit ;;                             # report: romp-ibm BSD 4.3
    534.     *:BOSX:*:*)
    535.     echo rs6000-bull-bosx
    536.     exit ;;
    537.     DPX/2?00:B.O.S.:*:*)
    538.     echo m68k-bull-sysv3
    539.     exit ;;
    540.     9000/[34]??:4.3bsd:1.*:*)
    541.     echo m68k-hp-bsd
    542.     exit ;;
    543.     hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*)
    544.     echo m68k-hp-bsd4.4
    545.     exit ;;
    546.     9000/[34678]??:HP-UX:*:*)
    547.     HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
    548.     case "${UNAME_MACHINE}" in
    549.         9000/31? )            HP_ARCH=m68000 ;;
    550.         9000/[34]?? )         HP_ARCH=m68k ;;
    551.         9000/[678][0-9][0-9])
    552.         if [ -x /usr/bin/getconf ]; then
    553.             sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
    554.                     sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
    555.                     case "${sc_cpu_version}" in
    556.                       523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
    557.                       528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
    558.                       532)                      # CPU_PA_RISC2_0
    559.                         case "${sc_kernel_bits}" in
    560.                           32) HP_ARCH="hppa2.0n" ;;
    561.                           64) HP_ARCH="hppa2.0w" ;;
    562.               '') HP_ARCH="hppa2.0" ;;   # HP-UX 10.20
    563.                         esac ;;
    564.                     esac
    565.         fi
    566.         if [ "${HP_ARCH}" = "" ]; then
    567.             eval $set_cc_for_build
    568.             sed 's/^              //' << EOF >$dummy.c
    569.  
    570.               #define _HPUX_SOURCE
    571.               #include <stdlib.h>
    572.               #include <unistd.h>
    573.  
    574.               int main ()
    575.               {
    576.               #if defined(_SC_KERNEL_BITS)
    577.                   long bits = sysconf(_SC_KERNEL_BITS);
    578.               #endif
    579.                   long cpu  = sysconf (_SC_CPU_VERSION);
    580.  
    581.                   switch (cpu)
    582.                 {
    583.                 case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
    584.                 case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
    585.                 case CPU_PA_RISC2_0:
    586.               #if defined(_SC_KERNEL_BITS)
    587.                     switch (bits)
    588.                     {
    589.                     case 64: puts ("hppa2.0w"); break;
    590.                     case 32: puts ("hppa2.0n"); break;
    591.                     default: puts ("hppa2.0"); break;
    592.                     } break;
    593.               #else  /* !defined(_SC_KERNEL_BITS) */
    594.                     puts ("hppa2.0"); break;
    595.               #endif
    596.                 default: puts ("hppa1.0"); break;
    597.                 }
    598.                   exit (0);
    599.               }
    600. EOF
    601.             (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
    602.             test -z "$HP_ARCH" && HP_ARCH=hppa
    603.         fi ;;
    604.     esac
    605.     if [ ${HP_ARCH} = "hppa2.0w" ]
    606.     then
    607.         eval $set_cc_for_build
    608.  
    609.         # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating
    610.         # 32-bit code.  hppa64-hp-hpux* has the same kernel and a compiler
    611.         # generating 64-bit code.  GNU and HP use different nomenclature:
    612.         #
    613.         # $ CC_FOR_BUILD=cc ./config.guess
    614.         # => hppa2.0w-hp-hpux11.23
    615.         # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess
    616.         # => hppa64-hp-hpux11.23
    617.  
    618.         if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) |
    619.         grep -q __LP64__
    620.         then
    621.         HP_ARCH="hppa2.0w"
    622.         else
    623.         HP_ARCH="hppa64"
    624.         fi
    625.     fi
    626.     echo ${HP_ARCH}-hp-hpux${HPUX_REV}
    627.     exit ;;
    628.     ia64:HP-UX:*:*)
    629.     HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
    630.     echo ia64-hp-hpux${HPUX_REV}
    631.     exit ;;
    632.     3050*:HI-UX:*:*)
    633.     eval $set_cc_for_build
    634.     sed 's/^    //' << EOF >$dummy.c
    635.     #include <unistd.h>
    636.     int
    637.     main ()
    638.     {
    639.       long cpu = sysconf (_SC_CPU_VERSION);
    640.       /* The order matters, because CPU_IS_HP_MC68K erroneously returns
    641.          true for CPU_PA_RISC1_0.  CPU_IS_PA_RISC returns correct
    642.          results, however.  */
    643.       if (CPU_IS_PA_RISC (cpu))
    644.         {
    645.           switch (cpu)
    646.         {
    647.           case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break;
    648.           case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break;
    649.           case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break;
    650.           default: puts ("hppa-hitachi-hiuxwe2"); break;
    651.         }
    652.         }
    653.       else if (CPU_IS_HP_MC68K (cpu))
    654.         puts ("m68k-hitachi-hiuxwe2");
    655.       else puts ("unknown-hitachi-hiuxwe2");
    656.       exit (0);
    657.     }
    658. EOF
    659.     $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` &&
    660.         { echo "$SYSTEM_NAME"; exit; }
    661.     echo unknown-hitachi-hiuxwe2
    662.     exit ;;
    663.     9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )
    664.     echo hppa1.1-hp-bsd
    665.     exit ;;
    666.     9000/8??:4.3bsd:*:*)
    667.     echo hppa1.0-hp-bsd
    668.     exit ;;
    669.     *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*)
    670.     echo hppa1.0-hp-mpeix
    671.     exit ;;
    672.     hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* )
    673.     echo hppa1.1-hp-osf
    674.     exit ;;
    675.     hp8??:OSF1:*:*)
    676.     echo hppa1.0-hp-osf
    677.     exit ;;
    678.     i*86:OSF1:*:*)
    679.     if [ -x /usr/sbin/sysversion ] ; then
    680.         echo ${UNAME_MACHINE}-unknown-osf1mk
    681.     else
    682.         echo ${UNAME_MACHINE}-unknown-osf1
    683.     fi
    684.     exit ;;
    685.     parisc*:Lites*:*:*)
    686.     echo hppa1.1-hp-lites
    687.     exit ;;
    688.     C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
    689.     echo c1-convex-bsd
    690.         exit ;;
    691.     C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
    692.     if getsysinfo -f scalar_acc
    693.     then echo c32-convex-bsd
    694.     else echo c2-convex-bsd
    695.     fi
    696.         exit ;;
    697.     C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
    698.     echo c34-convex-bsd
    699.         exit ;;
    700.     C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
    701.     echo c38-convex-bsd
    702.         exit ;;
    703.     C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
    704.     echo c4-convex-bsd
    705.         exit ;;
    706.     CRAY*Y-MP:*:*:*)
    707.     echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
    708.     exit ;;
    709.     CRAY*[A-Z]90:*:*:*)
    710.     echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \
    711.     | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \
    712.           -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \
    713.           -e 's/\.[^.]*$/.X/'
    714.     exit ;;
    715.     CRAY*TS:*:*:*)
    716.     echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
    717.     exit ;;
    718.     CRAY*T3E:*:*:*)
    719.     echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
    720.     exit ;;
    721.     CRAY*SV1:*:*:*)
    722.     echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
    723.     exit ;;
    724.     *:UNICOS/mp:*:*)
    725.     echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
    726.     exit ;;
    727.     F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
    728.     FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
    729.         FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
    730.         FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
    731.         echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
    732.         exit ;;
    733.     5000:UNIX_System_V:4.*:*)
    734.         FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
    735.         FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
    736.         echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
    737.     exit ;;
    738.     i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
    739.     echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
    740.     exit ;;
    741.     sparc*:BSD/OS:*:*)
    742.     echo sparc-unknown-bsdi${UNAME_RELEASE}
    743.     exit ;;
    744.     *:BSD/OS:*:*)
    745.     echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
    746.     exit ;;
    747.     *:FreeBSD:*:*)
    748.     case ${UNAME_MACHINE} in
    749.         pc98)
    750.         echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
    751.         amd64)
    752.         echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
    753.         *)
    754.         echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
    755.     esac
    756.     exit ;;
    757.     i*:CYGWIN*:*)
    758.     echo ${UNAME_MACHINE}-pc-cygwin
    759.     exit ;;
    760.     *:MINGW*:*)
    761.     echo ${UNAME_MACHINE}-pc-mingw32
    762.     exit ;;
    763.     i*:windows32*:*)
    764.         # uname -m includes "-pc" on this system.
    765.         echo ${UNAME_MACHINE}-mingw32
    766.     exit ;;
    767.     i*:PW*:*)
    768.     echo ${UNAME_MACHINE}-pc-pw32
    769.     exit ;;
    770.     *:Interix*:*)
    771.         case ${UNAME_MACHINE} in
    772.         x86)
    773.         echo i586-pc-interix${UNAME_RELEASE}
    774.         exit ;;
    775.         authenticamd | genuineintel | EM64T)
    776.         echo x86_64-unknown-interix${UNAME_RELEASE}
    777.         exit ;;
    778.         IA64)
    779.         echo ia64-unknown-interix${UNAME_RELEASE}
    780.         exit ;;
    781.     esac ;;
    782.     [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
    783.     echo i${UNAME_MACHINE}-pc-mks
    784.     exit ;;
    785.     8664:Windows_NT:*)
    786.     echo x86_64-pc-mks
    787.     exit ;;
    788.     i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
    789.     # How do we know it's Interix rather than the generic POSIX subsystem?
    790.     # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
    791.     # UNAME_MACHINE based on the output of uname instead of i386?
    792.     echo i586-pc-interix
    793.     exit ;;
    794.     i*:UWIN*:*)
    795.     echo ${UNAME_MACHINE}-pc-uwin
    796.     exit ;;
    797.     amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*)
    798.     echo x86_64-unknown-cygwin
    799.     exit ;;
    800.     p*:CYGWIN*:*)
    801.     echo powerpcle-unknown-cygwin
    802.     exit ;;
    803.     prep*:SunOS:5.*:*)
    804.     echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
    805.     exit ;;
    806.     *:GNU:*:*)
    807.     # the GNU system
    808.     echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
    809.     exit ;;
    810.     *:GNU/*:*:*)
    811.     # other systems with GNU libc and userland
    812.     echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu
    813.     exit ;;
    814.     i*86:Minix:*:*)
    815.     echo ${UNAME_MACHINE}-pc-minix
    816.     exit ;;
    817.     alpha:Linux:*:*)
    818.     case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
    819.       EV5)   UNAME_MACHINE=alphaev5 ;;
    820.       EV56)  UNAME_MACHINE=alphaev56 ;;
    821.       PCA56) UNAME_MACHINE=alphapca56 ;;
    822.       PCA57) UNAME_MACHINE=alphapca56 ;;
    823.       EV6)   UNAME_MACHINE=alphaev6 ;;
    824.       EV67)  UNAME_MACHINE=alphaev67 ;;
    825.       EV68*) UNAME_MACHINE=alphaev68 ;;
    826.         esac
    827.     objdump --private-headers /bin/sh | grep -q ld.so.1
    828.     if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
    829.     echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
    830.     exit ;;
    831.     arm*:Linux:*:*)
    832.     eval $set_cc_for_build
    833.     if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
    834.         | grep -q __ARM_EABI__
    835.     then
    836.         echo ${UNAME_MACHINE}-unknown-linux-gnu
    837.     else
    838.         echo ${UNAME_MACHINE}-unknown-linux-gnueabi
    839.     fi
    840.     exit ;;
    841.     avr32*:Linux:*:*)
    842.     echo ${UNAME_MACHINE}-unknown-linux-gnu
    843.     exit ;;
    844.     cris:Linux:*:*)
    845.     echo cris-axis-linux-gnu
    846.     exit ;;
    847.     crisv32:Linux:*:*)
    848.     echo crisv32-axis-linux-gnu
    849.     exit ;;
    850.     frv:Linux:*:*)
    851.         echo frv-unknown-linux-gnu
    852.     exit ;;
    853.     i*86:Linux:*:*)
    854.     LIBC=gnu
    855.     eval $set_cc_for_build
    856.     sed 's/^    //' << EOF >$dummy.c
    857.     #ifdef __dietlibc__
    858.     LIBC=dietlibc
    859.     #endif
    860. EOF
    861.     eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'`
    862.     echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
    863.     exit ;;
    864.     ia64:Linux:*:*)
    865.     echo ${UNAME_MACHINE}-unknown-linux-gnu
    866.     exit ;;
    867.     m32r*:Linux:*:*)
    868.     echo ${UNAME_MACHINE}-unknown-linux-gnu
    869.     exit ;;
    870.  
    871.  
    872. # Local variables:
    873. # eval: (add-hook 'write-file-hooks 'time-stamp)
    874. # time-stamp-start: "timestamp='"
    875. # time-stamp-format: "%:y-%02m-%02d"
    876. # time-stamp-end: "'"
    877. # End:

  2. #2
    Ngày gia nhập
    07 2006
    Nơi ở
    Hanoi, Vietnam
    Bài viết
    2,749

    Nó chỉ là file Shell Script mà thôi! File này có tác dụng xác định tên cấu hình hệ thống mà GNU Make sẽ chạy!

    Muốn viết được nó bạn cần làm 2 điều kiện cơ bản:
    1. Học cách viết shell script
    2. Tìm hiểu cơ bản về Linux, GNU là gì? Cấu hình để build một ứng dụng trên Linux bao gồm có những cấu hình nào?

    Đơn giản vậy thôi!
    Email: admin[@]congdongcviet.com | CC to: info[@]congdongcviet.com
    Phone: 0972 89 7667 (Office: 04 6329 2380)
    Yahoo & Skype: dreaminess_world (Vui lòng chỉ rõ mục đích ngay khi liên hệ, cảm ơn!)

    Một người nào đó coi thường ý thức kỷ luật cũng có nghĩa là người đó đã coi thường tương lai số phận của chính bản thân người đó. Những người coi thường ý thức kỷ luật sẽ không bao giờ có được sự thành công trong sự nghiệp!

  3. #3
    Ngày gia nhập
    11 2010
    Bài viết
    589

    Thông tin về file này có thể xem bằng man:
    Code:
    man config.guess
    File này thường là do tools tạo ra, bạn có thể copy file này từ các nguồn khác mà không cần phải viết lại cũng được. Nhưng tốt nhất là nên tìm hiểu cách tạo ra nó.

Các đề tài tương tự

  1. ADO.NET Lỗi entities model khi config file app.config
    Gửi bởi Arhi trong diễn đàn Thắc mắc lập trình C#
    Trả lời: 2
    Bài viết cuối: 06-05-2013, 03:27 PM
  2. Cấu hình file web.config để tăng quota khi gửi file qua webservice?
    Gửi bởi dailuong trong diễn đàn Thắc mắc lập trình ASP.NET
    Trả lời: 2
    Bài viết cuối: 12-01-2012, 07:39 PM
  3. Database Q-Thay đổi file appname.exe.config (app.config)?
    Gửi bởi mrvandai trong diễn đàn Thắc mắc lập trình C#
    Trả lời: 1
    Bài viết cuối: 30-05-2011, 10:46 PM
  4. cách đọc và ghi file app.config?
    Gửi bởi tuanngocpt trong diễn đàn Thắc mắc lập trình C#
    Trả lời: 2
    Bài viết cuối: 19-03-2011, 04:46 PM

Quyền hạn của bạn

  • Bạn không thể gửi đề tài mới
  • Bạn không thể gửi bài trả lời
  • Bạn không thể gửi các đính kèm
  • Bạn không thể chỉnh sửa bài viết của bạn